Migrate to Self-Hosted PaaS: Dokploy & Traefik v3
Dokploy Production Docker Compose Configuration
To begin deploying Dokploy on Hostinger KVM VPS infrastructure (Hostinger KVM 2 or KVM 4 running Ubuntu 24.04 LTS is recommended), prepare your working directory and the docker-compose.yml file to secure the control plane.
Create the configuration file with the following structure:
version: '3.8' services: dokploy: image: dokploy/dokploy:latest container_name: dokploy restart: unless-stopped privileged: true ports: - "3000:3000" volumes: - /var/run/docker.sock:/var/run/docker.sock - /etc/dokploy:/etc/dokploy environment: - TZ=UTC networks: - dokploy-network etworks: dokploy-network: external: true
Execute the Docker network initialization command before spinning up the stack:
docker network create dokploy-network docker compose up -d
Once the container is running, access the Dokploy dashboard via port 3000 on your public VPS IP address to complete the initial administrator setup.
Zero-Downtime Deployment & Nixpacks Caching Strategy
Dokploy utilizes Nixpacks by default to detect programming languages and build application artifacts without requiring a manual Dockerfile from developers. To ensure efficient build processes on Hostinger’s NVMe storage, make sure caching layers are active:
- Buildpack Caching: Mount the Nixpacks cache directory (
/root/.cache/nixpacks) persistently so dependencies such asnode_modulesor Govendordirectories are not repeatedly downloaded on every commit iteration. - Traefik Rolling Updates: Ensure your Traefik v3 configuration validates new container health checks via Docker health probes before severing connections to older instances.
To further explore advanced edge routing integration, review the implementation guidelines on Traefik v3 API gateway architecture to optimize microservice traffic management.
Field Gotchas & Troubleshooting
- UFW Blocking Ports 80 and 443: Ensure your VPS firewall (UFW or iptables) permits public HTTP and HTTPS traffic before Traefik attempts to issue Let’s Encrypt SSL certificates.
sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw allow 3000/tcp sudo ufw reload
- Docker Socket Permissions: If Dokploy fails to detect or create new application containers, verify system permissions for
/var/run/docker.sockor execute the daemon under appropriate privileged parameters.
Transparency: Some links in this article are affiliate links that support our ongoing publication research at no additional cost to you.
Explore more in-depth system architecture blueprints, FinOps strategies, and enterprise implementations at Bijak Technology.
Fuente: Artículo original