[{"data":1,"prerenderedAt":185},["ShallowReactive",2],{"seo-verification":3,"blog-self-host-coder-vps-cloud-development-environments-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-self-host-coder-vps-cloud-development-environments-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":27,"featuredImage":29,"bgImage":30,"posterImage":31,"relatedSolution":32,"intro":35,"sections":36,"ctaTitle":120,"ctaBody":121,"ctaButton":122,"ctaUrl":123,"relatedPosts":124},571,"self-host-coder-vps-cloud-development-environments",{"fr":12,"en":10,"ar":13,"es":14},"self-host-coder-vps","استضافة-coder-على-vps-بيئات-تطوير-سحابية","autoalojar-coder-vps-entornos-de-desarrollo","Coder on a VPS: Self-Hosted Cloud Development Environments","Install Coder on a VPS: Docker workspaces for the whole team, VS Code in the browser, SSH access and Terraform templates, without Codespaces.",7,0,false,"2026-11-08T00:00:00+00:00","2026-11-08T16:32:54+00:00",{"id":17,"name":23,"slug":24,"color":25,"icon":26},"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[28],{"id":17,"name":23,"slug":24,"color":25,"icon":26},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fself-host-coder-vps-poster.svg",{"categorySlug":33,"appSlug":34},"development","coder","Installing PHP, Node.js, the right PostgreSQL version and a dozen extensions on every new developer's laptop takes time, and setups always drift apart. Cloud development environments such as GitHub Codespaces or Gitpod solve this, but they bill by the hour and keep your code on their side. Coder is an open-source platform (AGPL-3.0 licence) that does the same job on your own server: every developer gets an identical workspace in one click, described by a Terraform template. This guide installs it on a VPS with Docker Compose, puts it behind nginx over HTTPS, creates a first Docker workspace and shows how to connect from VS Code, JetBrains or SSH.",[37,41,51,82,85,98,102,105,108,111,114,117],{"type":38,"title":39,"body":40},"h2","What Coder does","Coder separates two things that are often confused: the editor and the environment. The editor stays the one you like — VS Code in the browser, VS Code on your machine, a JetBrains IDE or a plain terminal. The environment lives on the server: a container that holds the code, the languages, the test databases and the project's tools.\n\nThis environment is described in a **template** written in Terraform. The administrator publishes it once; each developer then creates their **workspace** from that template, starts it when they work and stops it when they are done. An agent installed in the workspace connects to the Coder server and carries the terminal, ports and editor sessions.",{"type":42,"title":43,"items":44},"ul","What Coder brings",[45,46,47,48,49,50],"**Identical workspaces** — everyone works in the same environment, described in a versioned template.","**Docker template included** — one container per workspace on the VPS, with a persistent `\u002Fhome` volume.","**Every editor** — code-server in the browser, VS Code Remote-SSH, JetBrains Gateway, `coder ssh`.","**Port forwarding** — `coder port-forward` opens the application you are building on your machine.","**Automatic stop** — idle workspaces stop according to the template schedule.","**Accounts and single sign-on** — local accounts, GitHub or OpenID Connect.",{"type":52,"title":53,"headers":54,"rows":58},"comparison","Coder compared with other options",[5,55,56,57],"Coder on a VPS","code-server alone","GitHub Codespaces",[59,64,69,74,78],[60,61,62,63],"Users","A team, with accounts and roles","One person","GitHub accounts",[65,66,67,68],"Environment","Versioned Terraform template","The server itself","devcontainer file",[70,71,72,73],"Editors","Browser, VS Code, JetBrains, SSH","Browser","Browser, VS Code, JetBrains",[75,76,76,77],"Where the code lives","On your server","At GitHub",[79,80,80,81],"Cost","The VPS price","Per compute hour and storage",{"type":38,"title":83,"body":84},"Prerequisites","An Ubuntu 24.04 VPS with 2 GB of RAM and 20 GB of disk for one or two developers — plan 4 to 8 GB of RAM for a small team —, Docker and the Compose plugin installed, and a subdomain pointing to the VPS, for example `coder.example.com`. HTTPS is essential: workspace agents call the server back on that address, and editor sessions go over WebSocket.",{"type":86,"title":87,"steps":88},"steps","Install Coder with Docker Compose",[89,92,95],{"title":90,"body":91},"Prepare the directory and the secrets","The `.env` file holds the database password, the host's Docker group ID — it lets the server use the Docker socket without running as root — and the domain.\n```bash\nmkdir -p \u002Fopt\u002Fcoder && cd \u002Fopt\u002Fcoder\n{\n  echo \"DB_PASSWORD=$(openssl rand -hex 16)\"\n  echo \"DOCKER_GID=$(stat -c %g \u002Fvar\u002Frun\u002Fdocker.sock)\"\n  echo \"DOMAIN=coder.example.com\"\n} > .env\nchmod 600 .env\n```",{"title":93,"body":94},"Write the docker-compose.yml file","Two services: the Coder server, which ships with Terraform, and PostgreSQL. The port is only published on the loopback interface; nginx will handle HTTPS.\n```yaml\nservices:\n  coder:\n    image: ghcr.io\u002Fcoder\u002Fcoder:v2.39.0\n    restart: unless-stopped\n    group_add:\n      - \"${DOCKER_GID}\"\n    depends_on:\n      database:\n        condition: service_healthy\n    ports:\n      - \"127.0.0.1:7080:7080\"\n    environment:\n      CODER_HTTP_ADDRESS: \"0.0.0.0:7080\"\n      CODER_ACCESS_URL: \"https:\u002F\u002F${DOMAIN}\"\n      CODER_PG_CONNECTION_URL: \"postgresql:\u002F\u002Fcoder:${DB_PASSWORD}@database:5432\u002Fcoder?sslmode=disable\"\n      CODER_TELEMETRY_ENABLE: \"false\"\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n  database:\n    image: postgres:17.11-alpine\n    restart: unless-stopped\n    environment:\n      POSTGRES_USER: coder\n      POSTGRES_PASSWORD: ${DB_PASSWORD}\n      POSTGRES_DB: coder\n    volumes:\n      - coder-db:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\n    healthcheck:\n      test: [\"CMD-SHELL\", \"pg_isready -U coder -d coder\"]\n      interval: 5s\n      retries: 12\nvolumes:\n  coder-db: {}\n```",{"title":96,"body":97},"Start and check","The first start creates the database schema in a few seconds.\n```bash\ndocker compose up -d\ndocker compose logs -f coder   # attendre « View the Web UI »\ncurl -fsS http:\u002F\u002F127.0.0.1:7080\u002Fhealthz\n```",{"type":99,"title":100,"body":101},"tip","The Docker socket hands over the server keys","Coder creates workspaces through the Docker socket, and anyone who can edit a template can start any container on the VPS — and therefore act as root on the host. Keep the owner and template administrator roles for trusted people, and never publish port 7080 on the public address.",{"type":38,"title":103,"body":104},"Put Coder behind nginx over HTTPS","Get a certificate with `certbot certonly --nginx -d coder.example.com`, then declare the site. The `Upgrade` and `Connection` headers are essential: without them, the web terminal and agent connections fail.\n```nginx\nserver {\n    listen 443 ssl;\n    http2 on;\n    server_name coder.example.com;\n    ssl_certificate     \u002Fetc\u002Fletsencrypt\u002Flive\u002Fcoder.example.com\u002Ffullchain.pem;\n    ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fcoder.example.com\u002Fprivkey.pem;\n\n    location \u002F {\n        proxy_pass http:\u002F\u002F127.0.0.1:7080;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto $scheme;\n        proxy_read_timeout 1h;\n    }\n}\n```\n\nReload nginx with `nginx -t && systemctl reload nginx`, then open `https:\u002F\u002Fcoder.example.com`. **Create the first account right away**: the first visitor of the welcome screen becomes the owner of the installation.",{"type":38,"title":106,"body":107},"Create the first template and the first workspace","In **Templates**, click **Create Template** and choose the **Docker Containers** starter template. Coder downloads the required Terraform providers and publishes the template. Then create a workspace from it: a container starts on the VPS, its agent connects, and the page shows the **Running** state with a button to open code-server.\n\nThe template is a plain `main.tf` file. To adapt it to your project, change the base image, add tools to the agent startup script, then publish a new version: existing workspaces offer it at their next restart.",{"type":38,"title":109,"body":110},"Connect from VS Code, JetBrains or SSH","The browser is enough to start, but most developers prefer their usual editor. Install the CLI on your machine and connect it to the server:\n```bash\ncurl -L https:\u002F\u002Fcoder.com\u002Finstall.sh | sh\ncoder login https:\u002F\u002Fcoder.example.com\ncoder list\ncoder ssh mon-espace\ncoder port-forward mon-espace --tcp 3000:3000\ncoder config-ssh   # ajoute les hôtes coder.\u003Cespace> à ~\u002F.ssh\u002Fconfig\n```\n\nAfter `coder config-ssh`, VS Code Remote-SSH and JetBrains Gateway see each workspace as an ordinary SSH host. The connection goes through the server's HTTPS address: no extra SSH port is opened on the VPS.",{"type":38,"title":112,"body":113},"Automatic stop and VPS resources","At rest, the Coder server and its database use about 550 MB of RAM, and an idle workspace based on the Docker template image about 200 MB — much more during a build or a test suite. In the template settings, under **Schedule**, set an automatic stop delay: a workspace forgotten in the evening no longer consumes anything overnight. The `\u002Fhome` volume is kept when stopped; only the container is recreated at restart.",{"type":38,"title":115,"body":116},"Backup and updates","Accounts, templates and settings live in PostgreSQL; developers' work lives in the workspaces' `\u002Fhome` volumes.\n```bash\ncd \u002Fopt\u002Fcoder\ndocker compose exec -T database pg_dump -U coder coder | gzip > coder-$(date +%F).sql.gz\ndocker volume ls --filter name=coder-   # volumes \u002Fhome des espaces de travail\n```\n\nTo update, change the image tag in `docker-compose.yml` according to the [releases page](https:\u002F\u002Fgithub.com\u002Fcoder\u002Fcoder\u002Freleases), then run `docker compose pull && docker compose up -d`: the server migrates its database at startup. Take a backup before every major upgrade.",{"type":38,"title":118,"body":119},"One-click install on ServOrbit","On a ServOrbit VPS, Coder installs from the Marketplace. The script deploys the server and its PostgreSQL database, generates the administrator password and creates the owner account before anything is exposed — so the first-administrator sign-up screen is never reachable from the Internet. It also configures the nginx reverse proxy over HTTPS with WebSocket, on a subdomain of your domain or on the VPS's free subdomain. Sign in with the address `admin@servorbit.local` and the password shown in your client area, then change it in the account settings.","Your development environments on your VPS","A ServOrbit Ubuntu 24.04 VPS with 2 GB of RAM is enough to start Coder; plan 4 GB or more for a team. One-click install from the Marketplace, HTTPS on your domain or on the VPS's free subdomain, owner account and password created for you.","Install Coder","\u002Fapplications\u002Fdevelopment\u002Fcoder",[125,148,167],{"id":126,"slug":127,"slugs":128,"title":132,"excerpt":133,"readTime":134,"views":17,"isPinned":19,"noindex":19,"publishedAt":135,"updatedAt":136,"category":137,"categories":143,"featuredImage":29,"bgImage":30,"posterImage":145,"relatedSolution":146},301,"install-code-server-vps",{"fr":129,"en":127,"ar":130,"es":131},"installer-code-server-vps","تثبيت-code-server-vps","instalar-code-server-vps","Code Server on VPS: VS Code in Your Browser, Self-Hosted","Code Server (MIT, 79 k stars): run VS Code in your browser on your VPS — persistent workspace, password-protected, no local IDE setup needed.",3,"2026-08-24T00:00:00+00:00","2026-11-04T16:30:27+00:00",{"id":138,"name":139,"slug":140,"color":141,"icon":142},4,"Development","developpement","bg-warning\u002F10 text-warning","dev",[144],{"id":138,"name":139,"slug":140,"color":141,"icon":142},"\u002Fblog\u002Fcovers\u002Finstaller-code-server-vps-poster.svg",{"categorySlug":33,"appSlug":147},"code-server",{"id":149,"slug":150,"slugs":151,"title":155,"excerpt":156,"readTime":157,"views":158,"isPinned":19,"noindex":19,"publishedAt":159,"updatedAt":160,"category":161,"categories":162,"featuredImage":29,"bgImage":30,"posterImage":164,"relatedSolution":165},74,"host-gitea-on-your-own-vps",{"fr":152,"en":150,"ar":153,"es":154},"heberger-gitea","استضافة-gitea-على-خادم-vps-الخاص-بك","alojar-gitea-en-un-vps","Host Gitea on your own VPS in 2026","Deploy Gitea 1.25 on a VPS with Docker and SSL. Full guide: Gitea Actions CI\u002FCD, Gitea vs Forgejo v16 comparison, daily administration, SSH and HTTPS troubleshooting.",13,1,"2026-04-07T00:00:00+00:00","2026-11-08T16:32:50+00:00",{"id":17,"name":23,"slug":24,"color":25,"icon":26},[163],{"id":17,"name":23,"slug":24,"color":25,"icon":26},"\u002Fblog\u002Fcovers\u002Fheberger-gitea-poster.svg",{"categorySlug":33,"appSlug":166},"gitea",{"id":168,"slug":169,"slugs":170,"title":174,"excerpt":175,"readTime":176,"views":158,"isPinned":19,"noindex":19,"publishedAt":177,"updatedAt":178,"category":179,"categories":180,"featuredImage":29,"bgImage":30,"posterImage":182,"relatedSolution":183},139,"docker-dev-stack-on-a-vps-an-environment-ready-for-coding",{"fr":171,"en":169,"ar":172,"es":173},"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,"2026-02-06T00:00:00+00:00","2026-10-20T23:18:07+00:00",{"id":138,"name":139,"slug":140,"color":141,"icon":142},[181],{"id":138,"name":139,"slug":140,"color":141,"icon":142},"\u002Fblog\u002Fcovers\u002Fstack-dev-docker-vps-poster.svg",{"categorySlug":142,"appSlug":184},"docker-dev-stack",1794156286045]