Overview
Dokploy provides flexible deployment workflows that support multiple source types, build methods, and deployment strategies. Deploy from Git repositories, Docker registries, or direct file uploads with automated builds and rollback capabilities.Deployment Workflow
Every deployment in Dokploy follows a consistent lifecycle:Source Retrieval
Dokploy fetches your application code from:
- Git repository (GitHub, GitLab, Bitbucket, Gitea, or custom Git)
- Docker registry (pre-built images)
- Direct upload (ZIP file drop)
Build Phase
Your application is built using one of:
- Nixpacks - Auto-detect framework and build
- Dockerfile - Custom Docker build
- Heroku Buildpacks - Heroku-compatible builds
- Paketo Buildpacks - Cloud Native Buildpacks
- Railpack - Optimized for Ruby on Rails
- Static - Static site generation
Container Deployment
The image is deployed as a Docker Swarm service with:
- Environment variables
- Volume mounts
- Port mappings
- Resource limits
- Health checks
Deployment Types
Manual Deployment
Trigger deployments manually from the Dokploy dashboard.- Initial deployment
- Testing before automation
- Emergency hotfixes
- Rollback to specific version
Automatic Deployment
Deploy automatically when code changes are pushed to your repository. Trigger types:- Push - Deploy on every push to the configured branch
- Tag - Deploy only when new Git tags are created
- Pull Request - Create preview deployments for PRs
Automatic deployments require webhook configuration. See Git Integration for setup instructions.
Rebuild Deployment
Rebuild an application without fetching new code from the repository.- Environment variable changes
- Build configuration updates
- Clear cache and rebuild
- Apply new base image updates
Drop Deployment
Upload and deploy a ZIP file directly without Git integration.- Quick prototypes
- Closed-source applications
- Build artifacts from CI/CD
- Temporary deployments
Deployment States
Applications transition through different states during deployment:idle
No deployment in progress. Application is stopped or ready to deploy.
running
Deployment in progress. Building or starting the application.
done
Deployment completed successfully. Application is running.
error
Deployment failed. Check logs for error details.
Deployment History
Dokploy maintains a complete history of all deployments:Unique deployment identifier
Deployment title (e.g., commit message)
Additional deployment details (e.g., commit hash)
Deployment status:
running, done, error, cancelledPath to deployment logs for debugging
Deployment timestamp
Process ID of the deployment job (for cancellation)
Deployment Logs
All deployment output is streamed to logs in real-time:Queue Management
Dokploy uses a job queue to manage concurrent deployments:waiting- Job is queued but not startedactive- Job is currently executingcompleted- Job finished successfullyfailed- Job failed with errorsdelayed- Job is scheduled for later
Cancelling Deployments
Cancel a running deployment:Rollback Deployments
Dokploy supports rolling back to previous deployments:Enable Rollback
Perform Rollback
- Navigate to Deployments tab
- Find the previous successful deployment
- Click Rollback button
- Confirm rollback action
Rollback images are automatically tagged and stored in the configured rollback registry.
Multi-Server Deployments
Deploy applications across multiple servers:- Centralized builds - Build on powerful servers
- Edge deployment - Deploy close to users
- Resource isolation - Separate build and runtime
- Multi-region - Deploy globally
Multi-server deployments are available in Dokploy Cloud. Self-hosted instances support single-server deployments.
Build Caching
Speed up deployments with build caching:Enable Cache
Clear Cache
- Faster dependency installation
- Reduced network bandwidth
- Lower build times
- Improved consistency
Deployment Notifications
Receive notifications about deployment events:Build Success
Notify when deployments complete successfully
Build Failure
Alert when deployments fail with error details
Application Down
Warn when applications stop unexpectedly
Health Check Failed
Alert when health checks fail repeatedly
Best Practices
Build Configuration
Use Specific Base Images
Use Specific Base Images
Optimize Build Context
Optimize Build Context
Multi-Stage Builds
Multi-Stage Builds
Deployment Strategy
- Test in Staging - Always test deployments in staging before production
- Use Health Checks - Configure health checks for automatic recovery
- Monitor Resources - Watch CPU and memory usage during deployments
- Enable Rollback - Store previous images for quick rollback
- Review Logs - Check deployment logs after each deployment
Security
- Never Commit Secrets - Use environment variables for sensitive data
- Scan Images - Enable vulnerability scanning on registries
- Update Dependencies - Keep base images and packages updated
- Minimize Permissions - Run containers with minimal privileges
- Use Private Registries - Store proprietary images in private registries
Next Steps
Git Integration
Connect Git repositories and configure webhooks
Docker Registry
Configure registries for pulling and pushing images
Build Configuration
Customize build process and optimize builds
Environment Variables
Manage application configuration and secrets
First Deployment
Step-by-step deployment tutorial
Monitoring
Monitor deployments and application health
Troubleshooting
Deployment Stuck in Running State
Deployment Stuck in Running State
Symptoms: Deployment shows
running but never completesSolutions:- Check deployment logs for errors:
- Verify sufficient disk space:
- Kill stuck deployment process:
Build Fails with Network Errors
Build Fails with Network Errors
Symptoms: Timeouts or connection refused errors during buildSolutions:
- Check server internet connectivity
- Verify DNS resolution
- Configure HTTP proxy if behind firewall:
- Increase timeout limits in build configuration
Container Starts Then Immediately Stops
Container Starts Then Immediately Stops
Symptoms: Deployment completes but application status shows errorSolutions:
- Check application logs:
- Verify start command is correct
- Ensure port configuration matches application
- Check for missing environment variables
- Verify database connectivity