Skip to main content

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.
Use strong passwords with a mix of uppercase, lowercase, numbers, and special characters.

Configuration Example

Managing Security Settings

Retrieve Security Configuration

Get the current security settings for an application:
Response:

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:
  1. User is authenticated
  2. Application belongs to user’s active organization
  3. 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:
  1. Creates a Traefik BasicAuth middleware
  2. Attaches it to the application’s router
  3. Updates the Traefik configuration

Password Hashing

Passwords are hashed using APR1 (Apache MD5) before storing in Traefik:
Never store passwords in plain text or in environment variables.

Removing Authentication

To remove authentication from an application:
  1. Delete all security credentials
  2. Traefik configuration is automatically updated
  3. Application becomes publicly accessible

Database Schema

Security credentials are stored in the security table:

Constraints

  • securityId is the primary key (auto-generated)
  • username + applicationId must be unique
  • Deleting an application cascades to its security credentials

Error Handling

Common Errors

API Reference

All security endpoints require authentication:

Request Headers

Example: Full Workflow