Skip to main content

Application Deployment

Dokploy supports multiple application deployment strategies to fit your workflow.

Source Types

Deploy applications from various sources:
Connect to any Git provider for automatic deployments:
  • GitHub: OAuth integration with automatic webhook setup
  • GitLab: Support for self-hosted and GitLab.com
  • Bitbucket: Cloud and self-hosted Bitbucket
  • Gitea: Self-hosted Git service integration
  • Generic Git: Any Git repository via SSH or HTTPS
// Supported source types
sourceType: "github" | "gitlab" | "bitbucket" | "gitea" | "git"
Features include:
  • Automatic deployments on push
  • Branch selection and switching
  • Submodule support
  • Custom SSH key authentication
  • Watch paths for selective deployments
Pull and deploy pre-built images from:
  • Docker Hub
  • GitHub Container Registry (ghcr.io)
  • GitLab Container Registry
  • Private registries with authentication
  • Custom registry URLs
sourceType: "docker"
dockerImage: "nginx:latest"
Upload and deploy applications directly:
  • Drag-and-drop file upload
  • Archive extraction (zip, tar.gz)
  • Direct deployment without Git
sourceType: "drop"

Build Systems

Choose the right build system for your application:

Nixpacks

Automatic language detection and building. Zero configuration for most applications.
# Nixpacks automatically detects:
# - Node.js (package.json)
# - Python (requirements.txt)
# - Go (go.mod)
# - Ruby (Gemfile)
# - And more...

Heroku Buildpacks

Use the extensive Heroku buildpack ecosystem.
buildType: "heroku_buildpacks"
# Supports all official Heroku buildpacks

Paketo Buildpacks

Cloud Native Buildpacks for production deployments.
buildType: "paketo_buildpacks"
# Enterprise-grade builds

Dockerfile

Complete control with custom Dockerfiles.
# Use your own Dockerfile
FROM node:20-alpine
WORKDIR /app
COPY . .
RUN npm install
CMD ["npm", "start"]

Railpack

Optimized builds for Ruby on Rails applications.
buildType: "railpack"

Static Sites

Host static files with automatic web server.
buildType: "static"
# Serves HTML, CSS, JS with nginx

Application Configuration

Fine-tune your deployments with advanced options:
Manage environment variables securely:
# Set environment variables
NODE_ENV=production
DATABASE_URL=postgresql://user:pass@host:5432/db
API_KEY=secret-key

# Variables are injected at runtime
# Support for multi-line values
# Automatic escaping and validation

Database Management

Create and manage production-ready databases with automated setup.

Supported Databases

PostgreSQL

The world’s most advanced open source database.
{
  name: "production-db",
  databaseName: "myapp",
  databaseUser: "appuser",
  databasePassword: "secure-password",
  dockerImage: "postgres:16-alpine"
}
  • Automatic user and database creation
  • Multiple PostgreSQL versions
  • pgvector support for AI workloads

MySQL

Popular relational database system.
{
  name: "mysql-db",
  databaseName: "myapp",
  databaseUser: "appuser",
  databasePassword: "user-pass",
  databaseRootPassword: "root-pass",
  dockerImage: "mysql:8.0"
}
  • Root and user account setup
  • MySQL 5.7, 8.0, 8.4 support
  • Automatic configuration

MongoDB

Leading NoSQL document database.
{
  name: "mongo-db",
  databaseUser: "admin",
  databasePassword: "secure-pass",
  dockerImage: "mongo:7"
}
  • Replica set support
  • MongoDB 4.x, 5.x, 6.x, 7.x
  • Sharding capabilities

MariaDB

MySQL-compatible community database.
{
  name: "mariadb",
  databaseName: "myapp",
  databaseUser: "appuser",
  databasePassword: "pass",
  databaseRootPassword: "root-pass",
  dockerImage: "mariadb:11"
}
  • Drop-in MySQL replacement
  • Enhanced performance
  • Full compatibility

Redis

In-memory data structure store.
{
  name: "redis-cache",
  databasePassword: "redis-pass",
  dockerImage: "redis:7-alpine"
}
  • Cache layer for applications
  • Session storage
  • Message queuing

Custom Databases

Deploy any database using Docker images.
// Examples:
- CouchDB
- Cassandra
- InfluxDB
- TimescaleDB
- And more...

Database Features

Schedule automatic backups to external storage:
{
  schedule: "0 2 * * *",  // Daily at 2 AM
  enabled: true,
  database: "myapp",
  prefix: "backup",
  destinationId: "s3-destination",
  keepLatestCount: 7      // Retain 7 backups
}
  • Destinations: S3, MinIO, local storage, any S3-compatible service
  • Retention: Automatic cleanup of old backups
  • Notifications: Alerts on backup success/failure
  • Scheduling: Flexible cron expressions
Databases use Docker volumes for data persistence:
// Automatic volume creation
mounts: [{
  type: "volume",
  volumeName: `${appName}-data`,
  mountPath: "/var/lib/postgresql/data"
}]
  • Survives container restarts
  • Can be backed up
  • Migratable across servers
Easy access to connection details:
# Internal connection (from applications)
DATABASE_URL=postgresql://user:pass@postgres-appname:5432/dbname

# External connection (from host)
Host: your-server-ip
Port: exposed-port
Database: dbname
User: user
Password: pass

Docker Compose Support

Deploy complex multi-container applications with full Docker Compose compatibility.

Compose Deployment

Deploy compose files from Git repositories:
# docker-compose.yml
version: '3.8'
services:
  web:
    image: nginx:alpine
    ports:
      - "80:80"
  app:
    build: .
    environment:
      - DATABASE_URL=${DATABASE_URL}
  db:
    image: postgres:16
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:
{
  sourceType: "github",
  repository: "myorg/myapp",
  branch: "main",
  composePath: "./docker-compose.yml"
}

Compose Features

Environment Variables

Inject variables into compose services:
# Set in Dokploy UI
DATABASE_URL=postgresql://...
API_KEY=secret

# Available to all services

Service Isolation

Isolated or shared networking:
isolatedDeployment: true
// Creates isolated network per deployment

Custom Commands

Pre/post deployment commands:
command: "docker compose exec app npm run migrate"

Auto Deploy

Automatic deployments on git push:
autoDeploy: true
triggerType: "push"

Domain Management & Routing

Dokploy integrates with Traefik for automatic routing and SSL certificates.

Domain Configuration

1

Add Domain

Configure custom domains for your applications:
{
  host: "app.example.com",
  port: 3000,
  https: true,
  path: "/",
  certificateType: "letsencrypt"
}
2

SSL Certificates

Automatic SSL with Let’s Encrypt:
  • Automatic certificate provisioning
  • Auto-renewal before expiration
  • Custom certificate resolvers
  • Wildcard certificate support
3

Routing Rules

Advanced Traefik routing:
# Automatic generation
http:
  routers:
    app-router:
      rule: "Host(`app.example.com`)"
      service: "app-service"
      tls:
        certResolver: "letsencrypt"

Advanced Routing

Route different paths to different services:
[
  { host: "api.example.com", path: "/v1", port: 3000 },
  { host: "api.example.com", path: "/v2", port: 4000 }
]
Configure HTTP to HTTPS and custom redirects:
{
  type: "www-to-non-www",
  target: "https://example.com"
}
Distribute traffic across multiple containers:
services:
  app-service:
    loadBalancer:
      servers:
        - url: "http://app-1:3000"
        - url: "http://app-2:3000"
      passHostHeader: true

Multi-Node & Docker Swarm

Scale applications across multiple servers for high availability.

Docker Swarm Integration

Multi-Server Setup

Connect multiple servers to form a cluster:
  • Manager and worker nodes
  • Automatic service distribution
  • Built-in load balancing
  • Failure recovery

Service Replication

Run multiple replicas of your application:
serviceModeSwarm: {
  mode: "replicated",
  replicas: 3
}

Placement Constraints

Control where services run:
placementSwarm: {
  constraints: [
    "node.role==worker",
    "node.labels.region==us-west"
  ]
}

Update Strategies

Zero-downtime rolling updates:
updateConfigSwarm: {
  parallelism: 1,
  delay: "10s",
  order: "start-first"
}

Swarm Configuration

// Complete swarm configuration example
{
  serviceModeSwarm: {
    mode: "replicated",
    replicas: 3
  },
  placementSwarm: {
    constraints: ["node.role==worker"],
    preferences: [{ spread: "node.id" }]
  },
  updateConfigSwarm: {
    parallelism: 1,
    delay: "10s",
    failureAction: "rollback",
    order: "start-first"
  },
  restartPolicySwarm: {
    condition: "on-failure",
    delay: "5s",
    maxAttempts: 3,
    window: "120s"
  }
}

Real-Time Monitoring

Built-in monitoring powered by a Go-based metrics service.

Server Metrics

Monitor your infrastructure in real-time:
{
  "timestamp": "2025-01-19T21:44:54.232164Z",
  "cpu": 24.57,
  "cpu_model": "Intel Xeon E5-2680",
  "cpu_cores": 8,
  "mem_used": 81.91,
  "mem_used_gb": 13.11,
  "mem_total": 16.0,
  "disk_used": 89.34,
  "total_disk": 460.43,
  "network_in": 54.78,
  "network_out": 31.72
}

Monitoring Features

  • Historical Data: Store metrics for up to 30 days
  • Custom Refresh Rates: Configure collection intervals (default: 25 seconds)
  • Threshold Alerts: Receive notifications when limits are exceeded
  • Container Filtering: Monitor specific services or all containers
  • API Access: Query metrics programmatically via REST API

Notifications & Alerts

Stay informed about deployments, backups, and system events.

Notification Channels

Slack

Send alerts to Slack channels

Discord

Discord webhook integration

Telegram

Telegram bot notifications

Email (SMTP)

Standard email alerts

Resend

Modern email API

Teams

Microsoft Teams webhooks

Gotify

Self-hosted notification server

Ntfy

Simple HTTP notifications

Pushover

Mobile push notifications

Notification Events

Configure which events trigger notifications:
{
  appDeploy: true,           // Application deployed successfully
  appBuildError: true,       // Build/deployment failed
  databaseBackup: true,      // Database backup completed
  volumeBackup: true,        // Volume backup completed
  dokployRestart: true,      // Dokploy system restarted
  dockerCleanup: true,       // Docker cleanup executed
  serverThreshold: true      // CPU/memory threshold exceeded
}

CLI & API Access

Manage Dokploy programmatically for automation and CI/CD integration.

API Features

Full REST API

Complete API for all Dokploy operations
  • Application management
  • Database operations
  • Deployments
  • Monitoring data
  • Server administration

OpenAPI Specification

Auto-generated API documentation
  • Interactive API explorer
  • Type definitions
  • Code generation support

CLI Tool

Command-line interface for server management:
# Deploy application
dokploy deploy --app myapp

# View logs
dokploy logs myapp --follow

# Scale service
dokploy scale myapp --replicas 3

# Backup database
dokploy backup create mydb

Security Features

  • User account system
  • Organization support
  • Role-based access control
  • API token authentication
  • Automatic Let’s Encrypt certificates
  • Custom certificate upload
  • Wildcard certificate support
  • HTTP to HTTPS redirect
  • Isolated Docker networks
  • Firewall rule management
  • Private network support
  • Security headers configuration
  • Encrypted environment variables
  • Build secrets (not in image layers)
  • Database credential management
  • Registry authentication storage

Additional Features

Templates

One-click deployment of popular applications:
  • Plausible Analytics
  • Pocketbase
  • Cal.com
  • n8n
  • And more…

Git Provider Integration

OAuth integration with:
  • GitHub
  • GitLab
  • Bitbucket
  • Self-hosted instances

Preview Deployments

Automatic preview environments:
  • Per pull request
  • Isolated environments
  • Automatic cleanup

Rollbacks

Easy rollback to previous versions:
  • One-click rollback
  • Deployment history
  • Image registry integration

Next Steps

Get Started

Install Dokploy and deploy your first app

Core Concepts

Learn the fundamental concepts

API Reference

Explore the API documentation

Join Community

Get help and share feedback

Build docs developers (and LLMs) love