[{"data":1,"prerenderedAt":192},["ShallowReactive",2],{"seo-verification":3,"blog-deploy-your-applications-with-portainer-on-a-vps-ma-en":6,"promo-bar-likely":191},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-deploy-your-applications-with-portainer-on-a-vps-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":27,"featuredImage":29,"bgImage":30,"posterImage":31,"relatedSolution":32,"intro":35,"sections":36,"ctaTitle":124,"ctaBody":125,"ctaButton":126,"ctaUrl":127,"relatedPosts":128},35,"deploy-your-applications-with-portainer-on-a-vps",{"fr":12,"en":10,"ar":13,"es":14},"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.",10,1,false,"2026-05-16T00:00:00+00:00","2026-11-04T16:30:25+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":25},3,"Deployment","deploiement","bg-success\u002F10 text-success",[28],{"id":23,"name":24,"slug":25,"color":26,"icon":25},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fdeployer-avec-portainer-poster.svg",{"categorySlug":33,"appSlug":34},"application-deployment-devops","portainer","Portainer is the go-to web interface for managing Docker and Docker Swarm. Instead of memorizing dozens of commands, you administer your containers, stacks and volumes from a visual dashboard. Here's how to deploy it on your VPS and use it day to day.",[37,41,51,54,73,76,79,88,91,98,119,121],{"type":38,"title":39,"body":40},"h2","Why install Portainer on your VPS","Managing Docker from the command line quickly becomes tedious as you accumulate containers: finding a service's logs, inspecting a volume, restarting a stack or checking resource usage requires juggling several commands. Portainer exposes all of this in a web interface: you see the status of each container, view live logs, open an interactive console, deploy stacks via a `docker-compose` editor and monitor CPU\u002FRAM consumption. Unlike a PaaS such as CapRover or Dokku, Portainer does not build your code: it is a tool for administering and visualizing your existing Docker environment. It's perfect for teams who want clear, delegable access to a Docker server without giving SSH access to everyone.",{"type":42,"title":43,"items":44},"ul","What Portainer simplifies day to day",[45,46,47,48,49,50],"Real-time overview of all your containers, images, volumes and networks.","Deployment of stacks via a built-in `docker-compose` editor, without touching SSH.","Live logs and an interactive console in each container, right in the browser.","Fine-grained rights management: create accounts and teams with limited access.","Monitoring of the CPU, RAM and network consumption of each service.","Management of multiple Docker hosts or Swarm clusters from a single interface.",{"type":38,"title":52,"body":53},"Prerequisites for Portainer","Portainer is extremely lightweight because it only administers Docker, with no builder or heavy database. A VPS with 1 GB of RAM and 1 vCPU is more than enough to run Portainer itself; then size your VPS according to the applications you plan to host on it. Still, plan for 20 GB of SSD disk for Docker images. Docker Engine must be installed beforehand (Portainer connects to the `\u002Fvar\u002Frun\u002Fdocker.sock` socket). A domain name `portainer.mydomain.com` and an open port 443 are recommended to expose the interface over HTTPS. Important: Portainer gives full control over Docker, so never leave its interface directly exposed on the Internet without a reverse proxy and strong authentication. As for ports, the current installation documentation publishes `9443` (HTTPS interface with a self-signed certificate); port `8000` (TCP tunnel) is only needed for Edge agents and `9000` (HTTP) is an optional port kept from older versions. Here we only open 9443, and only for the duration of the setup.",{"type":55,"title":56,"steps":57},"steps","Deploy Portainer in 5 steps",[58,61,64,67,70],{"title":59,"body":60},"Prepare Docker on the VPS","Install Docker if it isn't already done: `curl -fsSL https:\u002F\u002Fget.docker.com | sh`. Check with `docker ps`. Create a dedicated volume for Portainer's persistence: `docker volume create portainer_data`.",{"title":62,"body":63},"Launch the Portainer container","Start Portainer CE: `docker run -d -p 9443:9443 --name portainer --restart=always -v \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock -v portainer_data:\u002Fdata portainer\u002Fportainer-ce:lts`. The official installation documentation uses the `lts` (long-term support) tag; that is the one we keep for a production server, rather than `latest`. The interface becomes accessible on port 9443 over self-signed HTTPS.",{"title":65,"body":66},"Create the administrator account","First, read the setup token in the logs: `docker logs portainer`, line `setup_token=`. Since versions 2.43 and 2.39.4, a brand-new instance requires it to create the first administrator. Then open `https:\u002F\u002FYOUR_VPS_IP:9443`: the account must be created within 5 minutes of the first start, otherwise Portainer stops itself for security (message “timed out for security purposes”). In that case, `docker stop portainer` then `docker start portainer` gives you another 5 minutes. Choose a strong password (at least 12 characters).",{"title":68,"body":69},"Expose it cleanly via a reverse proxy","Place Caddy or Nginx Proxy Manager in front of Portainer to serve the interface on `portainer.mydomain.com` with a real Let's Encrypt certificate. Then close direct access to port 9443. Beware: a port published by Docker bypasses `ufw` rules (Docker diverts it before the chains ufw filters), so `ufw deny 9443` is not enough. Recreate the container with `-p 127.0.0.1:9443:9443` instead, so that only the local proxy can reach it.",{"title":71,"body":72},"Deploy your first stack","In the “Stacks” menu, click “Add stack”, paste a `docker-compose.yml` file into the editor (for example an app + PostgreSQL), name the stack and click “Deploy the stack”. Portainer creates the containers, the network and the volumes, and you follow their status in real time.",{"type":74,"body":75},"tip","Enable Portainer’s “Access Controls” to delegate the management of a specific stack to a developer without giving them access to the entire server. To go further, deploy a Portainer agent on a second VPS and attach it to your main instance: you can then administer several Docker servers from a single point. Regularly back up the `portainer_data` volume, which contains your users, endpoints and stack definitions, as well as the folders of Git-based stacks (`compose\u002F`).",{"type":38,"title":77,"body":78},"Deploy from Git with GitOps updates","Pasting a compose file is enough to get started, but a stack linked to a Git repository updates itself and keeps its history somewhere other than the interface. In “Stacks > Add stack”, choose “Git Repository”, then fill in the source, the reference (branch) and the path of the compose file. Portainer then clones the repository into its data volume, under `compose\u002F\u003Cstack id>`. This mechanism, and only this one, is what the troubleshooting section below is about.",{"type":42,"title":80,"items":81},"The settings to know",[82,83,84,85,86,87],"Source, reference and “Compose path”: the repository, the branch and the path of the compose file from the root; “Additional paths” merges other YAML files, like several `-f` options.","“GitOps updates” by polling: Portainer checks the repository at a regular interval (“Fetch interval”).","“GitOps updates” by webhook: Portainer generates a URL to call from your repository or a GitHub Action to trigger the update on demand.","“Re-pull image”: pulls the images again at each update, like `--pull=always`.","“Force redeployment”: redeploys at each interval or webhook, even when the repository has not changed, overwriting local changes.","“Pull and redeploy” button on the stack page: fetches the latest commit and redeploys immediately.",{"type":38,"title":89,"body":90},"Troubleshooting: “Unable to move git repository directory: Target path already exists”","Exact symptom: on a stack deployed from Git, “Pull and redeploy” (or the automatic GitOps update) fails with `Unable to move git repository directory: Target path already exists`, and the containers are not updated. This is issue no. 10428 of the portainer\u002Fportainer repository, opened in October 2023 on Portainer CE 2.19.1 (private GitHub repository, Edge node), described as intermittent: a reboot or waiting sometimes made it go away. It is still being reported in 2026.\n\nState at the source, checked on 29 October 2026: the issue is still open. It carries the bug label and the “2 - High” priority, was assigned to a Portainer developer in July 2026, and its target release label moved from 3.0.0 to 3.1.0 in October 2026. No pull request is linked to it, and the only proposed fix is a commit on a user's fork that was never merged. So no official fix exists at this date: the workaround below still applies, and you should not wait for a specific version to solve this.",{"type":42,"title":92,"items":93},"Causes reported by users (hypotheses, not confirmed by the vendor)",[94,95,96,97],"A leftover `\u003Cid>-old` folder in `compose\u002F`: during an update, Portainer appears to rename the stack folder to `\u003Cid>-old` before moving the new clone; if one is left over from a previous attempt, the move fails.","An interrupted deployment: a Portainer container that froze and was restarted mid-deployment, or a page refreshed during “Pull and redeploy”, left the state inconsistent for several users (the maintainer could not reproduce it that way).","Large images: the first reporter suspected a timeout on a stack containing an image of nearly 2 GB.","February 2026 variant: the error becomes `stat \u002Fdata\u002Fcompose\u002F61: no such file or directory`, meaning the stack folder has disappeared. The workaround below does not help in that case.",{"type":55,"title":99,"steps":100},"Careful workaround in 6 steps",[101,104,107,110,113,116],{"title":102,"body":103},"Identify the stack and its ID","Note the name of the failing stack and its numeric ID, which is the name of the `compose\u002F\u003Cid>` folder. Never touch the `\u003Cid>` folder itself: only the `\u003Cid>-old` folder is targeted.",{"title":105,"body":106},"Stop Portainer and back up the volume","Stop Portainer to freeze its database: `docker stop portainer`. Then archive the whole volume: `docker run --rm -v portainer_data:\u002Fdata -v \"$PWD\":\u002Fbackup alpine tar czf \u002Fbackup\u002Fportainer_data-before-fix.tgz -C \u002Fdata .`. Check that the archive exists and is not empty before going further.",{"title":108,"body":109},"List the compose folder","Display its content: `docker run --rm -v portainer_data:\u002Fdata alpine ls -la \u002Fdata\u002Fcompose`. Look for a folder whose name is the stack ID followed by `-old` (for example `61-old`).",{"title":111,"body":112},"Set the leftover folder aside, without deleting it","Move it out of the volume: `docker run --rm -v portainer_data:\u002Fdata -v \"$PWD\":\u002Fbackup alpine mv \u002Fdata\u002Fcompose\u002F61-old \u002Fbackup\u002F`. Replace 61 with your ID. Users report that deleting this folder is enough; setting it aside has the same effect while keeping a way back.",{"title":114,"body":115},"Restart and retry the update","`docker start portainer`, then “Pull and redeploy” on the stack. Check that the containers were actually recreated with the new version, not just that the error message disappeared.",{"title":117,"body":118},"If the failure persists","If no `-old` folder exists or if the `\u003Cid>` folder is missing, this workaround does not apply. The reported solution is then to delete and recreate the stack from Git. Before that, check that your application data is in named volumes and back it up. Only restore the archive from step 2 if something went wrong.",{"type":74,"body":120},"Prevention. None of these measures is a guaranteed fix, since the cause is not confirmed by the vendor: they only reduce the chances of leaving an `-old` folder behind. Do not refresh the page or restart Portainer during a “Pull and redeploy”. Pull large images ahead of time with `docker pull` to shorten the deployment. After every failed update, immediately check whether an `-old` folder is lying around in `compose\u002F`. Back up `portainer_data` before updating Portainer. For a critical service, do not rely on the interface button alone: keep a fallback deployment using `docker compose pull && docker compose up -d` on the server. Watch issue #10428 to know when a fix arrives.",{"type":38,"title":122,"body":123},"Install Portainer from the ServOrbit Marketplace","Everything above can be done manually, and knowing how is useful. If you prefer not to, Portainer CE is available on the [ServOrbit Marketplace](\u002Fapplications\u002Fapplication-deployment-devops\u002Fportainer) and installs on your VPS in one click. The template deploys `portainer\u002Fportainer-ce:latest` via Docker Compose, mounts the `\u002Fvar\u002Frun\u002Fdocker.sock` socket and creates the `portainer_data` volume for persistence — no SSH session required for the base setup. The interface is not published on the Internet: the template binds it to the server's local address (`127.0.0.1`, HTTP port 9000), so you reach it through an SSH tunnel or by adding a custom domain from your client area. On first access, Portainer walks you through a setup wizard to create your admin account: if it asks for a setup token, it is in the container logs (`docker compose logs`, line `setup_token=`). Like every Marketplace template, it is provided as an installation guide, without support for the application itself. If you prefer to stay on the long-term support branch, replace the `latest` tag with `lts` in the compose file.","Administer Docker visually with Portainer","A ServOrbit Cloud VPS delivered with Docker ready to use lets you install Portainer in a single command and drive all your containers from a clear web interface.","Get my Cloud VPS","\u002Fapplications\u002Fapplication-deployment-devops\u002Fportainer",[129,151,174],{"id":130,"slug":131,"slugs":132,"title":136,"excerpt":137,"readTime":138,"views":18,"isPinned":19,"noindex":19,"publishedAt":139,"updatedAt":140,"category":141,"categories":146,"featuredImage":29,"bgImage":30,"posterImage":148,"relatedSolution":149},104,"portainer-vs-dokploy-which-docker-management-interface",{"fr":133,"en":131,"ar":134,"es":135},"portainer-vs-dokploy","portainer-مقابل-dokploy-أي-واجهة-لإدارة-docker","portainer-vs-dokploy-interfaz-de-gestion-docker","Portainer vs Dokploy: which to deploy in 2026?","Full comparison of Portainer 2.x vs Dokploy on VPS: critical CVEs, end of CE with Portainer 3, step-by-step migration and decision criteria.",12,"2026-03-08T00:00:00+00:00","2026-11-08T01:13:15+00:00",{"id":142,"name":143,"slug":144,"color":145,"icon":144},5,"Comparison","comparatif","bg-info\u002F10 text-info",[147],{"id":142,"name":143,"slug":144,"color":145,"icon":144},"\u002Fblog\u002Fcovers\u002Fportainer-vs-dokploy-poster.svg",{"categorySlug":33,"appSlug":150},"dokploy",{"id":152,"slug":153,"slugs":154,"title":158,"excerpt":159,"readTime":160,"views":18,"isPinned":19,"noindex":19,"publishedAt":161,"updatedAt":162,"category":163,"categories":169,"featuredImage":29,"bgImage":30,"posterImage":171,"relatedSolution":172},161,"how-to-self-host-dockge-on-a-vps-visual-docker-compose-manager",{"fr":155,"en":153,"ar":156,"es":157},"self-host-dockge-vps","استضافة-dockge-على-vps-مدير-مرئي-لـ-docker-compose","alojar-dockge-en-un-vps","How to Self-Host Dockge on a VPS: Visual Docker Compose Manager","Deploy Dockge on your VPS: a lightweight open-source visual manager to create, edit and monitor your Docker Compose stacks from a clean web UI, no command line.",4,"2026-07-03T00:00:00+00:00","2026-09-07T11:26:10+00:00",{"id":164,"name":165,"slug":166,"color":167,"icon":168},7,"Self-hosting","self-hosting","bg-indigo-500\u002F10 text-indigo-400","cloud",[170],{"id":164,"name":165,"slug":166,"color":167,"icon":168},"\u002Fblog\u002Fcovers\u002Fself-host-dockge-vps-poster.svg",{"categorySlug":33,"appSlug":173},"dockge",{"id":175,"slug":176,"slugs":177,"title":181,"excerpt":182,"readTime":17,"views":183,"isPinned":19,"noindex":19,"publishedAt":184,"updatedAt":21,"category":185,"categories":186,"featuredImage":29,"bgImage":30,"posterImage":188,"relatedSolution":189},33,"deploy-your-applications-with-caprover-on-a-vps",{"fr":178,"en":176,"ar":179,"es":180},"deployer-avec-caprover","انشر-تطبيقاتك-باستخدام-caprover-على-خادم-vps","desplegar-aplicaciones-con-caprover-en-un-vps","Deploy your applications with CapRover on a VPS","Complete CapRover guide: installation, captain-definition, GitHub Actions CI\u002FCD, multi-node cluster, backups and troubleshooting 502, build failed and Docker API errors.",2,"2026-05-18T00:00:00+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":25},[187],{"id":23,"name":24,"slug":25,"color":26,"icon":25},"\u002Fblog\u002Fcovers\u002Fdeployer-avec-caprover-poster.svg",{"categorySlug":33,"appSlug":190},"caprover",true,1794270388543]