I D H A M .
Published

Docker on a VPS - Between Benefits and Burnout

Authors

3 min read

Honestly, I love the idea of Docker.

One command to run a Laravel project. One command to stop. Move it to another server? Just copy docker-compose.yml. No need to install PHP, nginx, PostgreSQL, supervisor, cron, and all that dependency drama. Everything is tidy, modular, and supposedly portable.

But once I started setting it up on a VPS… I began to wonder: is this a solution or a new source of stress?

The Benefits Are Clear

I’m building a system using Laravel and Next.js across multiple subdomains. Without Docker, I would have to:

  • Manually set PHP and Node versions.
  • Configure nginx manually.
  • Make sure database and queues are running.
  • Deal with crontab.
  • Back up config files, which I’d probably forget.

With Docker, I define everything once. For a new deployment, just run docker-compose up -d.

Using a reverse proxy like Traefik also makes SSL a breeze. Just add a label in docker-compose.yml, and boom — HTTPS.

But… Managing It Is a Headache

The problem isn’t Docker itself. It’s the ecosystem around it.

  • The shared proxy network must be attached to every project — easy to forget.
  • Volume permissions are painful.
  • Updating one service sometimes restarts the whole stack.
  • Debugging inside containers is more annoying than outside.
  • One typo in docker-compose.yml can bring everything down.

Sometimes I wonder, “Wouldn’t it be easier to just install things the old-school way?”

A Middle Ground

Eventually, I found a middle path: still using Docker, but with reduced complexity.

  • One folder per project, each with its own docker-compose.yml.
  • Use the shared proxy network, but only for projects with a custom domain.
  • Automate weekly backups for volumes and critical files.
  • Keep internal docs, even if it’s just a local README.

Not 100% seamless, but flexible and scalable enough for now.

Docker on a VPS feels like owning your own apartment. It’s nice to customize everything, but exhausting when you’re also the security guard, handyman, and janitor.

Still, as long as I keep overthinking every time I need to install PHP on a server... I think I’ll stick with Docker. At least until I burn out.