Portainer is a free web interface for Docker. Instead of typing commands, you can see all your containers, start and stop them, read their logs, open a console, and deploy new apps from Docker Compose files, all from your browser. It's a great companion if you're new to Docker or run several apps on one VPS.
This guide installs Portainer Community Edition (CE). It works on every operating system we offer: Ubuntu 22.04, 24.04 and 26.04, Debian 12 and 13, AlmaLinux 8, 9 and 10, and Rocky Linux 9 and 10.
Before you start
- Docker must be installed. If it isn't, follow our guide: Install Docker Engine and Docker Compose on your VPS.
- Portainer itself is light. Any VPS that runs Docker will run Portainer.
- SSH access as root or as a user with sudo rights. If you're logged in as root, you can leave
sudooff the commands.
Step 1: Start Portainer
Create a volume for Portainer's data, then start the container:
sudo docker volume create portainer_data
sudo 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:lts
Portainer's web interface runs on port 9443, over HTTPS.
Step 2: Open the firewall
Ubuntu/Debian with UFW enabled:
sudo ufw allow 9443/tcp
AlmaLinux/Rocky with firewalld:
sudo firewall-cmd --permanent --add-port=9443/tcp
sudo firewall-cmd --reload
Docker manages its own firewall rules, so port 9443 may already be reachable even without these commands.
Step 3: Complete the setup within 5 minutes
For security, a new Portainer install must be set up within 5 minutes of starting, and it asks for a one-time setup token. Find the token in Portainer's log:
sudo docker logs portainer 2>&1 | grep setup_token
Copy the value after setup_token=. Then:
- Open
https://YOUR_SERVER_IP:9443in your browser. Portainer uses a self-signed certificate at first, so your browser will show a warning. This is expected. Continue to the page. - Paste the setup token.
- Create your administrator account with a username and a strong password (at least 12 characters).
- Choose Get Started to manage the Docker environment on this VPS.
If you miss the 5-minute window, Portainer stops accepting setup for security. Restart it with sudo docker restart portainer, get the new token from the log, and try again.
Using Portainer
- Containers: see what's running, start, stop and restart containers, view logs, and open a console inside a container.
- Stacks: paste a Docker Compose file and deploy it with one click. This is the easiest way to run the apps in our other guides from Portainer.
- Images and volumes: see what's taking up disk space and remove what you don't need.
Keep Portainer secure
Portainer controls everything Docker runs on your server, so protect it well:
- Use a strong, unique password.
- Limit port 9443 to your own IP address if you can. On UFW, for example:
sudo ufw allow from YOUR_HOME_IP to any port 9443 proto tcp. Because Docker can bypass the firewall, the safest option is to publish the port on127.0.0.1only (-p 127.0.0.1:9443:9443) and reach it through an SSH tunnel:ssh -L 9443:127.0.0.1:9443 root@YOUR_SERVER_IP, then browse tohttps://localhost:9443. - Or put Portainer behind a reverse proxy with a proper SSL certificate, for example with Nginx Proxy Manager.
Keeping it up to date
Your settings are kept in the portainer_data volume, so you can safely replace the container with a newer version:
sudo docker stop portainer
sudo docker rm portainer
sudo docker pull portainer/portainer-ce:lts
sudo 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:lts
Troubleshooting
- "Your Portainer instance timed out for security purposes": the 5-minute setup window passed. Run
sudo docker restart portainerand complete setup straight away. - The page won't load: make sure you're using https:// and port 9443, and that the container is running with
sudo docker ps. - You forgot the admin password: see Portainer's guide to resetting the admin password.
Need help?
Our Cloud VPS plans are self-managed, so you're responsible for installing, securing and maintaining the software on your server. If something on our side isn't working, such as the network, or your VPS won't boot, open a support ticket. New to your VPS? Start with our Cloud VPS Getting Started Guide.







