Overview
Dokploy integrates with major Git providers to enable automated deployments from your repositories. Connect once, deploy unlimited applications, and set up webhooks for continuous deployment.Supported Git Providers
Dokploy supports deployments from:GitHub
GitLab
Bitbucket
Gitea
Application Configuration
GitHub
Deploy from GitHub repositories using an authenticated Git provider.Connect Git Provider
- Navigate to Settings > Git Providers
- Click Add Provider > GitHub
- Complete OAuth authentication
Configure Application
Set Trigger Type
- Push - Deploy on every push to the branch
- Tag - Deploy only when tags are created
Watch Paths
Deploy only when specific files or directories change:Git Submodules
Enable submodule cloning for repositories with submodules:git submodule update --init --recursive during deployment.
GitLab
Deploy from GitLab repositories with OAuth integration.Bitbucket
Deploy from Bitbucket Cloud repositories.Gitea
Deploy from self-hosted Gitea instances.Custom Git
Deploy from any Git-compatible repository using SSH.Generate SSH Key
Add Public Key to Git Provider
Add Private Key to Dokploy
- Navigate to Settings > SSH Keys
- Click Add SSH Key
- Paste the private key:
- Save the SSH key ID
Configure Application
Webhook Configuration
Set up webhooks for automatic deployments when code is pushed.GitHub Webhooks
Get Webhook URL
- Go to Settings > Git
- Copy the webhook URL:
Add Webhook to GitHub
- Go to your GitHub repository
- Navigate to Settings > Webhooks
- Click Add webhook
- Configure:
- Click Add webhook
Verify Webhook
- Make a test push to your repository
- Check Recent Deliveries in GitHub webhook settings
- Verify deployment started in Dokploy
GitLab Webhooks
Get Webhook URL
Add Webhook to GitLab
- Go to your GitLab project
- Navigate to Settings > Webhooks
- Configure:
- Click Add webhook
Test Webhook
- Click Test > Push events
- Verify successful response
- Check deployment in Dokploy
Bitbucket Webhooks
Get Webhook URL
Add Webhook to Bitbucket
- Go to your Bitbucket repository
- Navigate to Repository settings > Webhooks
- Click Add webhook
- Configure:
- Click Save
Gitea Webhooks
Get Webhook URL
Add Webhook to Gitea
- Go to your Gitea repository
- Navigate to Settings > Webhooks
- Click Add Webhook > Gitea
- Configure:
- Click Add Webhook
Build Path Configuration
Specify the directory containing your application code.- Monorepo with multiple applications
- Separate frontend/backend directories
- Microservices architecture
Preview Deployments
Create temporary deployments for pull requests and branches.Enable Preview Deployments
How It Works
Open Pull Request
Automatic Updates
Comment Link
Automatic Cleanup
- PR is merged
- PR is closed
- Preview limit is reached (oldest deleted first)
Advanced Configuration
Patching Source Code
Apply patches to source code before building:Disconnecting Git Provider
Remove Git integration from an application:Deployment Source Priority
When multiple source types are configured, Dokploy uses this priority:- Drop - Direct ZIP upload (highest priority)
- Docker - Pre-built Docker image
- GitHub - GitHub repository
- GitLab - GitLab repository
- Gitea - Gitea repository
- Bitbucket - Bitbucket repository
- Git - Custom Git repository (lowest priority)
Best Practices
Repository Structure
Use Consistent Branch Names
Use Consistent Branch Names
Monorepo Structure
Monorepo Structure
buildPath to deploy different applications from the same repository.Environment-Specific Branches
Environment-Specific Branches
Security
- Protect Sensitive Branches - Enable branch protection on production branches
- Review Permissions - Grant minimal permissions to Git providers
- Rotate Tokens - Refresh access tokens regularly
- Secure Webhooks - Use HTTPS and verify webhook signatures
- Limit Preview Access - Enable
previewRequireCollaboratorPermissions
Performance
- Use Shallow Clones - Dokploy clones with
--depth 1by default - Cache Dependencies - Enable build caching for faster deployments
- Watch Specific Paths - Avoid unnecessary deployments with
watchPaths - Optimize Repository Size - Use
.gitattributesto exclude large files
Troubleshooting
Webhook Not Triggering Deployments
Webhook Not Triggering Deployments
- Go to repository webhook settings
- Check recent deliveries
- Look for error messages
- Incorrect webhook URL
- Firewall blocking requests
- Invalid refresh token
- Webhook disabled in repository
Repository Clone Failed
Repository Clone Failed
fatal: could not read from remote repositorySolutions:- Verify Git provider credentials:
- Check SSH key permissions (for custom Git):
- Verify repository exists and is accessible
- Ensure Git provider has repo access
Submodule Clone Failed
Submodule Clone Failed
- Enable submodule support:
- Verify submodule URLs are accessible
- Check Git provider has access to submodule repositories
- Test manual clone:
Wrong Branch Deployed
Wrong Branch Deployed
- Verify branch configuration:
- Check webhook branch filter
- Ensure branch exists in repository