Deployment guide

Deploy your applications with Portainer on a VPS

Deploy on a VPS Cloud →

Deployment7 min read

Deploy your applications with Portainer on a VPS

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.

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/RAM 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.

What Portainer simplifies day to day

  • 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.

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 /var/run/docker.sock socket). A domain name portainer.mydomain.com and an open port 443 are recommended to expose the interface over HTTPS. Important: never leave port 9000 directly exposed on the Internet without a reverse proxy and strong authentication, since Portainer gives full control over Docker.

Deploy Portainer in 5 steps

01

Prepare Docker on the VPS

Install Docker if it isn't already done: curl -fsSL https://get.docker.com | sh. Check with docker ps. Create a dedicated volume for Portainer's persistence: docker volume create portainer_data.

02

Launch the Portainer container

Start Portainer CE: docker run -d -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest. The interface becomes accessible on port 9443 over self-signed HTTPS.

03

Create the administrator account

Open https://IP_DU_VPS:9443 within the first few minutes after launch: Portainer requires the creation of the admin account within a limited time window for security reasons. Choose a strong password.

04

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 port 9443 at the firewall to only allow traffic through the proxy.

05

Deploy your first stack

In the “Stacks” menu, paste a docker-compose.yml file (for example an app + PostgreSQL), name the stack and click “Deploy”. Portainer creates the containers, the network and the volumes, and you follow their status in real time.

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.

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.

Need help?

Browse our help center and FAQ, or write to our team — support in French, English and Arabic.