[{"data":1,"prerenderedAt":194},["ShallowReactive",2],{"seo-verification":3,"blog-docker-dev-stack-on-a-vps-an-environment-ready-for-coding-ma-en":6,"promo-bar-likely":145},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-docker-dev-stack-on-a-vps-an-environment-ready-for-coding-ma-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"noindex":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":28,"featuredImage":30,"bgImage":31,"posterImage":32,"relatedSolution":33,"intro":35,"sections":36,"ctaTitle":130,"ctaBody":131,"ctaButton":132,"ctaUrl":133,"relatedPosts":134},139,"docker-dev-stack-on-a-vps-an-environment-ready-for-coding",{"fr":12,"en":10,"ar":13,"es":14},"stack-dev-docker-vps","حزمة-تطوير-docker-على-خادم-vps-بيئة-جاهزة-للبرمجة","stack-dev-docker-en-vps","Docker Dev Stack on a VPS: an environment ready for coding","Set up a complete Docker dev stack on a VPS: Nginx, PHP-FPM, PostgreSQL, Redis, Mailpit, Adminer — detailed docker-compose.yml, SSH tunneling, troubleshooting.",10,1,false,"2026-02-06T00:00:00+00:00","2026-11-09T20:55:19+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},4,"Development","developpement","bg-warning\u002F10 text-warning","dev",[29],{"id":23,"name":24,"slug":25,"color":26,"icon":27},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fstack-dev-docker-vps-poster.svg",{"categorySlug":27,"appSlug":34},"docker-dev-stack","A remote development stack keeps your local machine from getting saturated and gives you a stable IP for webhooks, demos and integration tests. On a ServOrbit VPS, Docker Compose becomes a complete workshop: Nginx, PHP-FPM or Node, PostgreSQL, Redis, Mailpit and Adminer run together in isolated, persistent containers accessible via SSH from any workstation. This guide details the stack composition, service configuration and best practices for collaborative development without conflicts.",[37,41,51,54,57,79,82,85,88,92,122,125,127],{"type":38,"title":39,"body":40},"h2","Why host a Docker Dev Stack on a VPS?","A local development environment works, but it remains tied to a single machine: switching workstations, onboarding a new collaborator or accessing it from another country all become points of friction. By centralizing your Docker stack on a VPS, you have a shared development server, always on, accessible via SSH or browser from anywhere. You also gain in reproducibility: each service is defined in a `docker-compose.yml` file, which eliminates the notorious \"it works on my machine\" problem.",{"type":42,"title":43,"items":44},"ul","What you can do with a Docker Dev Stack",[45,46,47,48,49,50],"Run several services simultaneously (Nginx, MySQL, Redis, PHP-FPM, Node.js) in isolated containers without port or version conflicts","Share an identical development environment among all members of a team thanks to the docker-compose.yml file versioned in Git","Test database migrations or dependency updates in an ephemeral container without risking the main environment","Host a lightweight CI\u002FCD server (Gitea, Drone CI) directly on the same VPS to automate your internal deployments","Access your development services via subdomains or Traefik\u002FNginx reverse proxies without opening unnecessary ports","Back up and restore your entire stack in a few commands thanks to Docker volumes and VPS snapshots",{"type":38,"title":52,"body":53},"Prerequisites: recommended minimum configuration","A full stack with PostgreSQL, Redis, Nginx and an application uses **4 GB of RAM** at minimum in practice — below that, the Docker OOM killer interrupts PostgreSQL or Redis during a migration with no application-level error message. The VPS must run **Ubuntu 22.04 LTS** or Debian 12, with **Docker Engine 26+** and **Docker Compose v2.22+** installed (the command is written `docker compose`, without a hyphen). Check the version with `docker compose version`: the `watch` feature used later requires v2.22 at minimum, released in September 2023.",{"type":38,"title":55,"body":56},"Stack components: each service's role","The ServOrbit reference stack assembles six complementary services.\n\n**Nginx** acts as the front reverse proxy: it receives HTTP requests on port 80 and routes them to PHP-FPM (via FastCGI) or to a Node.js server. The `nginx\u002Fdefault.conf` configuration is mounted as a volume to remain editable without rebuilding the image.\n\n**PHP-FPM 8.3** (or Node.js 22 depending on the stack profile) runs the application code. Both variants are available in the ServOrbit Marketplace; the `docker-compose.yml` includes both services — disable the one you don't need with `profiles`.\n\n**PostgreSQL 16** stores persistent data. Port 5432 is not exposed on the host by default — only the internal Docker network `dev_net` has access, which prevents any accidental exposure on the VPS's public IP.\n\n**Redis 7** serves as cache and message broker. Like PostgreSQL, it stays on the internal network (port 6379) and is accessible from application code via the service name `redis`.\n\n**Mailpit 1.x** replaces a real SMTP server in development: it captures all outgoing emails and exposes them in a web interface on port 8025. No special SMTP configuration on the application side — simply point to `mailpit:1025`.\n\n**Adminer** (port 8080) provides a lightweight web interface to manage PostgreSQL or MySQL without a heavy client. It is accessible only from the machine itself or via SSH tunnel.",{"type":58,"title":59,"steps":60},"steps","Install a Docker Dev Stack on your ServOrbit VPS",[61,64,67,70,73,76],{"title":62,"body":63},"Order a ServOrbit Cloud VPS","Go to the \u002Fvps-cloud page and choose a plan suited to your usage. For a standard development stack (a few containers, database, reverse proxy), a VPS with 2 vCPU and 4 GB of RAM is a good starting point. Finalize the order: your VPS is provisioned in under 60 seconds on Ubuntu 22.04 LTS.",{"title":65,"body":66},"Access the Marketplace in your client area","Log in to your ServOrbit client area, then open the \"Marketplace\" section from your VPS dashboard. The Marketplace lists all the applications available for 1-click installation, organized by category. Select the \"Development\" category to filter dev-oriented stacks.",{"title":68,"body":69},"Start the Docker Dev Stack installation","Click the \"Docker Dev Stack\" card, then the \"Install\" button. The automation deploys Docker Engine, Docker Compose and a preconfigured docker-compose.yml file with the essential services (Nginx, PHP-FPM, PostgreSQL 16, Redis, Mailpit for email testing, Adminer). The full installation usually takes between 2 and 4 minutes depending on the VPS size.",{"title":71,"body":72},"Retrieve your credentials and access the interface","Once the installation is complete, the client area displays the automatically generated connection details: VPS IP address, PostgreSQL password, and the access URL for Mailpit (by default on port 8025). Connect via SSH with `ssh root@\u003CIP_VPS>` to check the container status via `docker compose ps` in the `\u002Fopt\u002Fdocker-dev-stack` directory.",{"title":74,"body":75},"Configure your first project and customize the stack","Copy your source code into `\u002Fopt\u002Fdocker-dev-stack\u002Fapp\u002F` or edit the `\u002Fopt\u002Fdocker-dev-stack\u002Fdocker-compose.yml` file to add or remove services according to your needs. Restart the stack with `docker compose up -d` to apply the changes. To expose your services on a domain name, configure a DNS record pointing to your VPS IP and adapt the Nginx configuration included in the `\u002Fopt\u002Fdocker-dev-stack\u002Fnginx\u002F` directory.",{"title":77,"body":78},"Logging in for the first time","There is no account to create: the URL opens the Mailpit test mailbox directly, with no password. PostgreSQL (5432) and Redis (6379) are reachable only from the machine itself; the Postgres credentials are in \u002Fopt\u002Fdocker-dev-stack\u002F.env.",{"type":38,"title":80,"body":81},"Service configuration: volumes, networks and environment variables","The stack's `docker-compose.yml` declares three named volumes — `postgres_data`, `redis_data` and `app_data` — mounted in `\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata`, `\u002Fdata` and `\u002Fvar\u002Fwww\u002Fhtml` respectively. These volumes survive a `docker compose down`: database data and uploaded files remain intact between restarts.\n\nAll services share the internal `dev_net` bridge network. Nginx is the only service exposing a port on the host (80); the others remain isolated and communicate by service name — `postgres`, `redis`, `mailpit`.\n\nSensitive variables (PostgreSQL password, application secret key) are never written directly in `docker-compose.yml`. They are read from `\u002Fopt\u002Fdocker-dev-stack\u002F.env` via the `env_file` directive. This file is excluded from the Git repository by `.gitignore`. Non-sensitive environment variables (port, PHP version, database name) can appear directly in the Compose file under the `environment` key, so they are visible during code review.",{"type":38,"title":83,"body":84},"Access from your laptop: SSH tunneling and reverse proxy","PostgreSQL, Adminer and Redis are not exposed on the VPS's public IP. To access them from your local workstation, open an SSH tunnel: `ssh -L 5432:localhost:5432 -L 8080:localhost:8080 root@\u003CIP_VPS>` creates two local forwards — your laptop's port 5432 points to PostgreSQL, and port 8080 to Adminer. Your usual SQL client then connects on `localhost:5432` as if the database were running locally.\n\nFor HTTP services (Nginx, Mailpit), two approaches are available. If you have a domain name, configure an `A` record pointing to the VPS IP and set up Nginx to serve `dev.yourdomain.com` over plain HTTP (no TLS needed for a development environment). If you work without a domain, an SSH tunnel is sufficient: `ssh -L 8025:localhost:8025 root@\u003CIP_VPS>` gives access to Mailpit on `localhost:8025`.",{"type":38,"title":86,"body":87},"Best practices: dev vs production","In development, the `.env` file centralizes all secrets. In production, Docker secrets (`docker secret`) or an external secrets manager (Vault, AWS Secrets Manager) replace the flat file — an accidentally versioned `.env` exposes credentials in the Git history.\n\nResource limits (`deploy.resources.limits`) are worth setting in dev: PostgreSQL can consume all available RAM if a query goes wrong. Start with `memory: 512m` on PostgreSQL, `memory: 256m` on Redis and `memory: 256m` on PHP-FPM, then adjust based on actual usage profiles.\n\nNever mount the Docker socket (`\u002Fvar\u002Frun\u002Fdocker.sock`) in an application container unless strictly necessary: a container with socket access can launch other containers with root privileges on the host. In development the risk is limited, but habits formed here tend to be reproduced in production.",{"type":89,"title":90,"body":91},"tip","Hot reload with docker compose watch","Docker Compose v2.22+ introduces `docker compose watch`, available since September 2023. Enable it by adding a `develop.watch` block in the `app` service of your `docker-compose.yml`: specify the paths to watch and the associated action (`sync` to copy files into the container without restarting it, `rebuild` to rebuild the image). Then run `docker compose watch` instead of `docker compose up -d`: file changes are propagated in real time into the container, with no manual restart. Check your version beforehand with `docker compose version`.",{"type":93,"title":94,"headers":95,"rows":100},"comparison","Stack variants by project type",[96,97,98,99],"Stack","Main services","Use case","Recommended RAM",[101,106,110,114,118],[102,103,104,105],"LAMP","Nginx + PHP-FPM 8.3, MariaDB 10.11, Redis","WordPress, OctoberCMS, Laravel","4 GB",[107,108,109,105],"MERN","Node.js 22, MongoDB 7, Redis","REST API + React\u002FVue SPA",[111,112,113,105],"Django \u002F PostgreSQL","Python 3.12, PostgreSQL 16, Redis, Celery","Python apps, ML, Django REST API",[115,116,117,105],"PHP + PostgreSQL","Nginx + PHP-FPM 8.3, PostgreSQL 16, Redis, Mailpit","Symfony, API Platform, Drupal",[119,120,121,105],"Full Node","Node.js 22, PostgreSQL 16, Redis, Mailpit","NestJS, Express, Fastify",{"type":38,"title":123,"body":124},"Troubleshooting: 4 common errors","**Port already in use.** The error `Bind for 0.0.0.0:80 failed: port is already allocated` means a host service (Apache, system nginx) is already listening on port 80. Stop the system service (`systemctl stop nginx` or `systemctl stop apache2`) or change the host port in `docker-compose.yml` (`\"8080:80\"`) and access the stack on port 8080.\n\n**Volume permissions.** The `Permission denied` error on a mounted volume often comes from a container uid\u002Fgid different from the host's. Add `user: \"1000:1000\"` in the affected service, or change the host directory permissions with `chown -R 1000:1000 \u002Fopt\u002Fdocker-dev-stack\u002Fapp`.\n\n**Bridge network not found.** The message `network dev_net declared as external, but could not be found` appears if you use `external: true` on a network not yet created. Remove `external: true`: Docker Compose creates the network automatically on the first `docker compose up`.\n\n**Insufficient RAM.** PostgreSQL displays `FATAL: out of memory` or keeps restarting if the VPS is undersized. Check with `free -m`: at least 4 GB must be available for the full stack. Reduce `shared_buffers` in the PostgreSQL configuration (`command: postgres -c shared_buffers=128MB`) or upgrade to a larger VPS plan.",{"type":89,"body":126},"Pro tip: take an on-demand snapshot of your ServOrbit VPS from the client area before making deep changes to the Docker configuration. A snapshot lets you revert to a stable state in one click if a container update or a Compose file change breaks your environment. Also remember to use a `.env` file to store your sensitive variables (passwords, API keys) and to exclude it from your Git repository via `.gitignore` — even on a development server, it is a good habit to anchor from the start.",{"type":89,"title":128,"body":129},"The official documentation","For advanced configuration, tool-specific options and version changes, refer to the \u003Ca href=\"https:\u002F\u002Fdocs.docker.com\u002Fcompose\u002F\" target=\"_blank\" rel=\"noopener noreferrer\">official Docker Compose documentation\u003C\u002Fa>. This guide covers going live on a ServOrbit VPS; the vendor documentation remains the reference for fine-tuning.","Deploy a Docker Dev Stack in minutes on a ServOrbit Cloud VPS","Enjoy a Cloud VPS with 1-click installation of your Docker environment, support included and a no-commitment monthly option.","Launch my Cloud VPS","\u002Fvps-cloud",[135,154,177],{"id":136,"slug":137,"slugs":138,"title":142,"excerpt":143,"readTime":144,"views":18,"isPinned":19,"noindex":145,"publishedAt":146,"updatedAt":147,"category":148,"categories":149,"featuredImage":30,"bgImage":31,"posterImage":151,"relatedSolution":152},136,"installing-docker-on-a-vps-a-clean-base-for-your-apps",{"fr":139,"en":137,"ar":140,"es":141},"demarrer-avec-docker-vps","تثبيت-docker-على-vps-قاعدة-نظيفة-لتطبيقاتك","instalar-docker-en-un-vps","Installing Docker on a VPS: A Clean Base for Your Apps","Set up a reliable Docker VPS: isolation, Compose, volumes, networking and best practices to deploy without improvising.",3,true,"2026-02-10T00:00:00+00:00","2026-09-07T11:26:10+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[150],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fdemarrer-avec-docker-vps-poster.svg",{"categorySlug":27,"appSlug":153},"docker-starter",{"id":155,"slug":156,"slugs":157,"title":161,"excerpt":162,"readTime":163,"views":164,"isPinned":19,"noindex":19,"publishedAt":165,"updatedAt":166,"category":167,"categories":171,"featuredImage":30,"bgImage":31,"posterImage":173,"relatedSolution":174},41,"deploy-your-applications-with-coolify-on-a-vps",{"fr":158,"en":156,"ar":159,"es":160},"deployer-avec-coolify","نشر-تطبيقاتك-باستخدام-coolify-على-vps","desplegar-aplicaciones-con-coolify-en-un-vps","Deploy Your Applications with Coolify on a VPS","Deploy Coolify on a VPS: installation, HTTPS configuration, Git connection, deploying your first application, databases, backups, and troubleshooting.",12,2,"2026-05-10T00:00:00+00:00","2026-10-31T01:54:10+00:00",{"id":144,"name":168,"slug":169,"color":170,"icon":169},"Deployment","deploiement","bg-success\u002F10 text-success",[172],{"id":144,"name":168,"slug":169,"color":170,"icon":169},"\u002Fblog\u002Fcovers\u002Fdeployer-avec-coolify-poster.svg",{"categorySlug":175,"appSlug":176},"application-deployment-devops","coolify",{"id":178,"slug":179,"slugs":180,"title":184,"excerpt":185,"readTime":17,"views":18,"isPinned":19,"noindex":19,"publishedAt":186,"updatedAt":187,"category":188,"categories":189,"featuredImage":30,"bgImage":31,"posterImage":191,"relatedSolution":192},35,"deploy-your-applications-with-portainer-on-a-vps",{"fr":181,"en":179,"ar":182,"es":183},"deployer-avec-portainer","انشر-تطبيقاتك-باستخدام-portainer-على-خادم-vps","desplegar-aplicaciones-con-portainer-en-un-vps","Deploy your applications with Portainer on a VPS","Manage Docker visually with Portainer on your VPS: containers, stacks, volumes and networks managed from a clear web interface.","2026-05-16T00:00:00+00:00","2026-11-04T16:30:25+00:00",{"id":144,"name":168,"slug":169,"color":170,"icon":169},[190],{"id":144,"name":168,"slug":169,"color":170,"icon":169},"\u002Fblog\u002Fcovers\u002Fdeployer-avec-portainer-poster.svg",{"categorySlug":175,"appSlug":193},"portainer",1794270396310]