Declarative PaaS: Nix + Dokploy

Managing a fleet of side projects became a nightmare of dependency drift and 'it-works-on-my-machine' syndrome. Existing PaaS solutions like Coolify were too resource-heavy for entry-level VPS hardware, while manual Docker-Compose setups lacked automated Git-to-Deploy workflows.

Implemented a deployment pipeline using Nix (via Nixpacks) for deterministic builds, orchestrated by Dokploy for automated lifecycle management.

Coolify

Pros
  • Full Open Source (Apache 2.0) license
  • Built-in Cloudflare Tunnel support
Cons
  • Higher idle CPU usage (~7-10%)
  • More abstract; harder to debug underlying Docker issues

Standard Docker Compose + Portainer

Pros
  • Zero abstraction; industry standard
  • Extremely lightweight
Cons
  • No automated Git-to-Deploy pipeline
  • Manual SSL and domain management

Dokploy provides the best performance-to-UX ratio, specifically beating Coolify in idle resource consumption. By leveraging Nixpacks as the default builder, I get 'Docker-less' reproducibility—Nix automatically detects the environment and builds a slim, optimized image without me having to write a 50-line Dockerfile for every microservice.

Additional Context

This project serves as the backbone for my Self-Hosted Infrastructure. By bridging the gap between a declarative package manager (Nix) and a modern, lightweight PaaS (Dokploy), the system transforms a standard VPS into a robust deployment engine.

The most significant technical hurdle was optimizing the Layered-Caching within Nixpacks. By fine-tuning the nixpacks.toml, I ensured that heavy dependencies like Node modules or Python wheels are cached independently of the application source code. This means a code change only triggers a few seconds of re-linking rather than a full environment rebuild.

This architecture ensures that the Deployment-Pipeline can scale to handle dozens of microservices without the ‘management-tax’ starving the apps themselves. It provides a seamless ‘set-it-and-forget-it’ experience that rivals expensive managed platforms like Vercel or Railway while maintaining total data sovereignty.