Overview
Dokploy provides built-in HTTP Basic Authentication to protect your applications. Security settings are configured per application and stored securely in the database.Basic Authentication
HTTP Basic Authentication adds a username and password prompt before users can access your application.Creating Security Credentials
string
required
The ID of the application to protect
string
required
Username for authentication. Must be at least 1 character.
string
required
Password for authentication. Must be at least 1 character.
Configuration Example
Managing Security Settings
Retrieve Security Configuration
Get the current security settings for an application:Update Security Credentials
Delete Security Configuration
Remove authentication from an application:Authorization
Dokploy implements role-based access control (RBAC) to ensure users can only access their authorized resources.Organization-Level Access
- Users can only access applications within their active organization
- Each security configuration is scoped to an organization
- Cross-organization access is prevented automatically
Permission Checks
Before any security operation, Dokploy verifies:- User is authenticated
- Application belongs to user’s active organization
- User has permission to modify security settings
Multiple Credentials
Each application can have multiple username/password combinations:Username must be unique per application. You cannot create multiple credentials with the same username for one application.
Security Best Practices
Password Requirements
While Dokploy doesn’t enforce password complexity at the database level, follow these guidelines:- Minimum 12 characters
- Mix of uppercase and lowercase letters
- Include numbers and special characters
- Avoid common words or patterns
- Don’t reuse passwords across applications
Credential Rotation
Regularly update your credentials:Audit Logging
All security operations are logged with timestamps:- Credential creation
- Credential updates
- Credential deletion
- Failed authentication attempts (via Traefik logs)
Traefik Integration
Dokploy integrates with Traefik to enforce Basic Authentication:Middleware Configuration
When you create security credentials, Dokploy automatically:- Creates a Traefik BasicAuth middleware
- Attaches it to the application’s router
- Updates the Traefik configuration
Password Hashing
Passwords are hashed using APR1 (Apache MD5) before storing in Traefik:Removing Authentication
To remove authentication from an application:- Delete all security credentials
- Traefik configuration is automatically updated
- Application becomes publicly accessible
Database Schema
Security credentials are stored in thesecurity table:
Constraints
securityIdis the primary key (auto-generated)username+applicationIdmust be unique- Deleting an application cascades to its security credentials