# Dokploy: Deploying Docker Containers with an Open-Source Platform
Dokploy is an open-source tool for automated deployment of applications in Docker containers and GitHub repositories. The platform uses Docker Swarm, Traefik for routing, and PostgreSQL/Redis databases. Installation requires a Linux server with at least 2 GB RAM and 30 GB disk space, and it checks the availability of ports 80, 443, 3000.
System Requirements and Preparation
Dokploy has been tested on the following distributions:
- Ubuntu 24.04 LTS, 23.10, 22.04 LTS, 20.04 LTS, 18.04 LTS
- Debian 12, 11, 10
- Fedora 40
- CentOS 9, 8
The server must have at least 2 GB of RAM for building Docker images and 30 GB of disk space. Ports 80 (HTTP Traefik), 443 (HTTPS Traefik), and 3000 (web interface) must be free—the installation script will fail if they are in use.
Preparation:
- Switch to root:
sudo -i. - Stop services on ports 80, 443, 3000.
- Ensure Docker is installed or the script will install version 28.5.0.
The script automatically detects the version (default latest, with support for canary/feature via DOKPLOY_VERSION), checks the environment (Linux, not a container, not macOS), and initializes Docker Swarm.
Installation Process via Script
The primary method is a one-liner command:
curl -sSL https://dokploy.com/install.sh | sh
The script performs the following steps:
- Checks root privileges and free ports with
ss -tulnp. - Installs Docker if missing.
- Detects Proxmox LXC containers and applies
--endpoint-mode dnsrrfor compatibility. - Determines the server's IP address (IPv4/IPv6 via ifconfig.io, icanhazip.com, ipecho.net) for
ADVERTISE_ADDR. - Initializes Docker Swarm:
docker swarm init --advertise-addr <ip>. - Creates the overlay network
dokploy-network.
Key Script Fragments:
# Opredelenie versii
detect_version() {
local version="${DOKPLOY_VERSION:-latest}"
echo "$version"
}
# Check Proxmox LXC
is_proxmox_lxc() {
if [ -n "$container" ] && [ "$container" = "lxc" ]; then
return 0
fi
if grep -q "container=lxc" /proc/1/environ 2>/dev/null; then
return 0
fi
return 1
}
After Swarm initialization, services are created:
docker service create \
--name dokploy-postgres \
--network dokploy-network \
--env POSTGRES_USER=dokploy \
--env POSTGRES_DB=dokploy \
--env POSTGRES_PASSWORD=amukds4wi9001583845717ad2 \
postgres:16
Similarly for Redis (redis:7) and the main Dokploy container with mounts for /var/run/docker.sock, /etc/dokploy, and port 3000 (host mode).
Traefik Setup and Launch
Traefik (v3.6.1) is launched separately:
docker run -d \
--name dokploy-traefik \
--restart always \
-v /etc/dokploy/traefik/traefik.yml:/etc/traefik/traefik.yml \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-p 80:80/tcp -p 443:443/tcp -p 443:443/udp \
traefik:v3.6.1
It connects to dokploy-network. After a 15-second wait, the interface is available at: http://<ip>:3000.
Possible Issues:
- Error on occupied ports—use
ss -tulnp | grep :80for diagnostics. - In LXC/Proxmox: automatic application of dnsrr mode.
- Swarm fails to initialize—set
ADVERTISE_ADDRmanually orDOCKER_SWARM_INIT_ARGSfor custom pools (e.g.,--default-addr-pool 172.20.0.0/16).
Functionality After Installation
The web interface on port 3000 allows deploying projects from GitHub, managing containers, and configuring Traefik routing. The platform is focused on self-hosted deployments without external dependencies and integrates with Docker Swarm for orchestration.
Advantages for Middle/Senior DevOps:
- Automatic IP handling (IPv4/IPv6).
- Support for custom Swarm arguments.
- Minimal resources compared to full PaaS solutions.
- Open-source alternative to Coolify with a focus on Docker.
Key Points
- Minimum Requirements: 2 GB RAM, 30 GB disk, Linux (Ubuntu/Debian/Fedora/CentOS).
- Required Ports: 80, 443, 3000—the script blocks installation if occupied.
- Docker Swarm: Auto-initialization with advertise-addr, LXC dnsrr support.
- Services: Postgres:16, Redis:7, Traefik:v3.6.1, Dokploy:latest/canary/feature.
- Access: http://<server-ip>:3000 after 15 seconds.
— Editorial Team
No comments yet.