Skip to main content

Overview

Dokploy supports multiple Git providers to deploy applications directly from your source code repositories. Connect your Git provider once and deploy unlimited applications.

Supported Providers

Dokploy integrates with:
  • GitHub - GitHub Cloud and GitHub Apps
  • GitLab - GitLab Cloud and self-hosted GitLab instances
  • Bitbucket - Bitbucket Cloud
  • Gitea - Self-hosted Gitea instances

GitHub

Connect GitHub using GitHub Apps for secure, fine-grained access control.

Configuration

string
required
Display name for this Git provider connection
string
Name of your GitHub App
number
GitHub App ID from your app settings
string
OAuth Client ID for the GitHub App
string
OAuth Client Secret for the GitHub App
Keep your client secret secure. Never commit it to version control.
string
Installation ID after installing the app to your account/organization
string
Private key for authenticating as the GitHub App
string
Webhook secret for securing webhook payloads

Creating a GitHub App

  1. Go to GitHub Settings > Developer settings > GitHub Apps
  2. Click “New GitHub App”
  3. Configure the app:
    • Homepage URL: https://your-dokploy-domain.com
    • Webhook URL: https://your-dokploy-domain.com/api/github/webhook
    • Webhook secret: Generate a secure random string
  4. Set permissions:
    • Repository contents: Read
    • Repository metadata: Read
    • Deployments: Read & write
    • Pull requests: Read & write (for preview deployments)
  5. Generate a private key and download it
  6. Install the app to your account/organization

Example Configuration

Fetching Branches

GitLab

Connect GitLab Cloud or self-hosted GitLab instances using OAuth.

Configuration

string
required
Display name for this Git provider connection
string
default:"https://gitlab.com"
required
GitLab instance URL
string
Internal URL for GitLab if different from external URL (useful for Docker networking)
string
OAuth Application ID from GitLab
string
OAuth Application Secret from GitLab
string
OAuth redirect URI
string
GitLab group name to restrict repository access
string
OAuth access token (obtained after authentication)
string
OAuth refresh token for renewing access
number
Access token expiration timestamp (Unix epoch)

Creating a GitLab OAuth Application

  1. Go to GitLab Settings > Applications
  2. Create a new application:
    • Name: Dokploy
    • Redirect URI: https://your-dokploy-domain.com/api/gitlab/callback
    • Scopes: api, read_user, read_repository
  3. Save the Application ID and Secret

Example Configuration

Testing Connection

Bitbucket

Connect Bitbucket Cloud using App Passwords or API tokens.

Configuration

string
required
Display name for this Git provider connection
string
Bitbucket username
string
Bitbucket account email
string
Bitbucket App PasswordCreate at: Bitbucket Settings > App passwords
string
Bitbucket API token (alternative to App Password)
string
Bitbucket workspace name

Creating a Bitbucket App Password

  1. Go to Bitbucket Settings > App passwords
  2. Create new app password with permissions:
    • Repositories: Read, Write
    • Webhooks: Read and write
    • Pull requests: Read
  3. Copy the generated password (shown only once)

Example Configuration

Testing Connection

Gitea

Connect self-hosted Gitea instances using OAuth.

Configuration

string
required
Display name for this Git provider connection
string
required
Gitea instance URL
string
Internal URL for Gitea if different from external URL
string
OAuth Client ID from Gitea
string
OAuth Client Secret from Gitea
string
OAuth redirect URI
string
OAuth access token (obtained after authentication)
string
OAuth refresh token for renewing access
number
Access token expiration timestamp (Unix epoch)
string
default:"repo,repo:status,read:user,read:org"
OAuth scopes

Creating a Gitea OAuth Application

  1. Go to Gitea Settings > Applications > OAuth2 Applications
  2. Create new OAuth2 application:
    • Application Name: Dokploy
    • Redirect URI: https://your-dokploy-domain.com/api/gitea/callback
  3. Save the Client ID and Client Secret

Example Configuration

Managing Git Providers

List All Providers

Response:

Remove Provider

Removing a Git provider will affect all applications using it for deployment.

Provider Types

The providerType field indicates which Git service is configured:

Database Schema

Authorization

  • Git providers are scoped to organizations
  • Users can only access providers in their active organization
  • Deleting an organization cascades to its Git providers

Best Practices

Security

  1. Rotate Tokens: Regularly rotate OAuth tokens and App Passwords
  2. Minimal Permissions: Grant only necessary permissions
  3. Separate Apps: Use different apps for development and production
  4. Audit Access: Review provider access regularly

Performance

  1. Internal URLs: Use internal URLs for faster Docker network communication
  2. Token Refresh: Implement automatic token refresh for OAuth providers
  3. Cache: Cache repository and branch lists when possible

Organization

  1. Naming: Use descriptive names (e.g., “GitHub Production”, “GitLab Dev”)
  2. Documentation: Document which apps use which providers
  3. Backup: Keep credentials backed up securely

Troubleshooting

Common Issues

  • Verify OAuth credentials are correct
  • Check token hasn’t expired
  • Ensure redirect URI matches exactly
  • Confirm required scopes are granted
  • Verify Git provider has access to repositories
  • Check group/workspace name is correct
  • Ensure proper permissions are granted
  • Confirm organization/workspace exists
  • Verify webhook URL is accessible from Git provider
  • Check webhook secret matches configuration
  • Ensure webhook events are configured
  • Review webhook delivery logs on Git provider

Example: Complete Setup