Skip to content
In-house anti-DDoS, included on VPS, game servers and web hosting · hosted in France · cancel anytime See our plans
CloudFive
Log in

01

What Portainer does

Portainer shows in the browser everything Docker manages on the machine: the list of containers with their state, their logs, their usage, a console in each container, the images, volumes and networks. You can start, stop, recreate or delete a container in one click.

Its strong point is managing stacks: Docker Compose files you paste into an online editor and that Portainer deploys, updates and keeps track of. It is handy for following several services on the same VPS, such as Uptime Kuma or Jellyfin.

Portainer comes in two editions: Community Edition (CE), free and open source, and a commercial edition. This guide uses CE. Portainer does not replace knowing Docker: it displays it differently. If you mainly want to deploy applications from a Git repository, with domains and HTTPS handled for you, Coolify goes further.

02

Install Portainer CE

You need a recent Linux VPS (Debian 12, Ubuntu 22.04 or 24.04), after the basic settings from securing a Linux VPS, with Docker installed: follow installing Docker on a VPS.

Create the volume that will keep Portainer's data (accounts, settings, stacks), then start the container, based on the command in the official documentation:

sudo docker volume create portainer_data
sudo docker run -d -p 127.0.0.1:9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:lts
  • portainer/portainer-ce:lts: the official Community Edition image, on its long-term support branch.
  • -v /var/run/docker.sock:/var/run/docker.sock: the Docker socket, through which Portainer drives Docker. This is what gives it control of the machine.
  • -p 127.0.0.1:9443:9443: the HTTPS interface, published on the machine itself only. Docker writes its own filtering rules before UFW's: a port published without 127.0.0.1 would be open to the whole Internet, even if UFW blocks it.
  • Port 8000, present in the official command, is only used by Edge agents, to manage remote machines. For a single VPS it is useless: we do not publish it.

Check that the container is running with sudo docker ps.

03

First access and administrator account

Open an SSH tunnel from your computer, then go to https://localhost:9443:

ssh -L 9443:127.0.0.1:9443 utilisateur@IP_DU_VPS

Portainer presents a self-signed certificate it generated itself: the browser shows a warning, which you can bypass for this local address.

  • The setup token: recent versions first ask for a token (setup token). It appears in the container log, on the setup_token= line: sudo docker logs portainer.
  • The administrator account: choose a name and a password of at least 12 characters. This account has full rights over Docker, and therefore over the VPS.
  • The time limit: for security, Portainer only allows a limited time to create this account after it starts. Once that time has passed, it refuses: restart the container with sudo docker restart portainer and start again right away.

Then choose to get started with the local environment: this is the VPS's Docker, reached through the socket. Any other accounts are created in user management.

04

Deploy a Docker Compose stack

In the local environment, open the Stacks menu, then Add stack:

  1. Give the stack a name, in lowercase (for example uptime-kuma).
  2. In the web editor, paste the content of the Compose file. You can also upload a file or point to a Git repository.
  3. If the file uses variables (${MOT_DE_PASSE}), fill them in the environment variables section rather than writing them in the file.
  4. Click Deploy the stack. Portainer downloads the images and creates the containers.

Example stack:

services:
  uptime-kuma:
    image: louislam/uptime-kuma:2
    restart: unless-stopped
    ports:
      - '127.0.0.1:3001:3001'
    volumes:
      - uptime-kuma:/app/data

volumes:
  uptime-kuma:

To update a stack, open it, edit the file if needed, then redeploy it, asking to pull the images again. Named volumes keep the data. Stacks started from the command line with docker compose also show up, but Portainer cannot fully edit them, since it does not have their file: manage each stack from one side only.

05

Secure access and update

Socket access = root access. Anyone who logs in to Portainer as an administrator can start a privileged container that mounts the VPS's disk, and so take over the whole machine. Treat this account like the root account:

  • Do not expose port 9443 to the Internet. The SSH tunnel above is the safest method. Access through a VPN works too: see installing WireGuard on a VPS.
  • Behind a reverse proxy, if you want an address such as portainer.example.com: put Portainer on the same Docker network as the proxy, which reaches it over https on port 9443, and add an IP address restriction or an authentication step in front. A password alone, on such a powerful interface, is not enough.
  • Limit accounts: one administrator account per person, long passwords, and delete unused accounts.
  • Never give access to the Docker socket to a container you do not know: it is the same risk as Portainer, without its login screen.

Update. First back up the portainer_data volume, then recreate the container with the new image: the data stays in the volume, and your other containers keep running.

sudo docker run --rm -v portainer_data:/data -v /root:/backup alpine tar czf /backup/portainer-$(date +%F).tar.gz -C /data .
sudo docker pull portainer/portainer-ce:lts
sudo docker stop portainer
sudo docker rm portainer
sudo docker run -d -p 127.0.0.1:9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:lts
06

On CloudFive

CloudFive does not offer a managed Portainer: you install it yourself on a VPS, with root access. The Ryzen VPS, from €5.99 per month, suits a VPS running several containers well:

  • an AMD Ryzen 9 9950X, with DDR5 memory and NVMe storage;
  • Docker and Docker Compose install with the official script, as nesting is enabled on our VPS (see the Docker VPS page);
  • a dedicated IPv4 address and basic anti-DDoS protection included;
  • snapshots from the customer area, to take before a major update.

The servers are in France, on our own network, monthly with no commitment, with support in French 7 days a week by ticket, on Discord and by phone.

07

Frequently asked questions

How do I install Portainer on a VPS?

Install Docker, create the portainer_data volume, then run the portainer/portainer-ce:lts image with the /var/run/docker.sock socket and port 9443. Then open https://localhost:9443 through an SSH tunnel and create the administrator account without waiting.

Which port does Portainer use?

Port 9443 over TCP, for the HTTPS interface with a self-signed certificate. Port 8000 is only for Edge agents and can be left out for a single VPS. Publish 9443 on 127.0.0.1 and go through an SSH tunnel or a protected reverse proxy.

Portainer says the account creation time has expired, what should I do?

For security, Portainer only allows a limited time to create the administrator account after it starts. Restart the container with docker restart portainer, then create the account right away; recent versions also ask for the setup_token shown in docker logs portainer.

Is Portainer a security risk for the VPS?

It has access to the Docker socket, which is equivalent to root rights on the machine. It is safe if it is not exposed to the Internet: access through an SSH tunnel or a VPN, or behind a reverse proxy with address restrictions, and long passwords.

What is the difference between Portainer CE and the commercial edition?

Portainer CE is the free, open source edition, which is enough to manage a VPS's containers, volumes, networks and stacks. The commercial edition adds features aimed at businesses, such as finer-grained access control.

Support CloudFive AI

An answer right away, a real team behind it.

CloudFive AI answers you at any hour, in seconds. When it doesn’t know, or as soon as you ask, the team that runs the machines takes over. No offshore call centre.

  • TicketThe team replies in under 2 hours, 7 days a week.
  • CloudFive AIAt any hour, on ia.cloudfive.fr, Discord and in your customer area.
  • DiscordThe team, the AI and other customers, in the help channel.
  • Your data stays with usAI runs on our servers in France; e-mails, IPs and passwords are masked.
A ticket in the customer area: a customer’s question about a Minecraft plugin, and the CloudFive team’s reply
A real ticket in the customer area, answered by the team (demo account; shown in French).
CUSTOMER AREA · APP

Your servers.
At your fingertips.

Restart a server, watch its resources live, pay an invoice or open a ticket — and get an alert when something goes wrong.

  • The status of all your services at a glance
  • Blocked attacks, filtered traffic, monthly peak
  • A notification when a server goes down or an invoice is due

App coming soon · in the meantime, everything works in your browser at manager.cloudfive.fr

The CloudFive app: the list of your services, with their status
The CloudFive app: the home screen, your services’ status, blocked attacks and an invoice to pay