Independent testing Updated April 2026 387 self-hosting guides 5 VPS providers tested

guide

Portainer on VPS: Manage Docker with a Web UI

Learn how to self-host Portainer on a VPS to manage your Docker containers with a clean web UI, with setup steps, recommended specs, and usage tips.

Portainer on VPS: Manage Docker with a Web UI

Docker is a powerful platform for developing, shipping, and running applications using containerization. However, managing Docker services via the command line can be daunting for many developers. This is where Portainer comes into play - it provides a user-friendly web interface that simplifies Docker management. In this guide, we will walk you through the steps to install Portainer on a VPS (Virtual Private Server).

Benefits of Running Portainer on a VPS

  1. Remote Management: Access Docker containers from anywhere via a web interface.
  2. Simplified UI: Easier navigation and management of Docker containers and images.
  3. Multi-Environment Support: Manage multiple Docker environments from a single Portainer instance.

Choosing a VPS for Portainer

Before we delve into the installation steps, itโ€™s essential to choose an appropriate VPS provider. Hereโ€™s a quick comparison of some of the top VPS options suitable for running Portainer:

ProviderMonthly PriceRAMCPUStorageLocation Options
Contabo VPS5.99 EUR4 GB3SSD 100 GBEurope
Hetzner Cloud4.15 EUR2 GB1SSD 20 GBEurope
DigitalOcean6 USD2 GB1SSD 50 GBMultiple
Vultr6 USD2 GB1SSD 50 GBMultiple
Linode (Akamai Cloud)5 USD2 GB1SSD 50 GBMultiple

For detailed comparisons, visit our full VPS comparison.

Installation Steps

Step 1: Set Up Your VPS

  1. Choose a Provider: Sign up for a VPS service from one of the providers listed above.
  2. Deploy Your Server: Select a server configuration that meets your requirements. For most users, an entry plan with 2 to 4 GB of RAM is sufficient.
  3. Access the Server: Using SSH, access your server terminal:
    ssh [email protected]

Step 2: Install Docker

For Portainer to operate, Docker must be installed on your VPS. Execute the following commands depending on your serverโ€™s OS.

For Ubuntu/Debian:

apt update
apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update
apt install -y docker-ce

For CentOS:

yum install -y yum-utils
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce
systemctl start docker
systemctl enable docker

Step 3: Install Portainer

Once Docker is up and running, you can deploy Portainer as a Docker container.

  1. Create a Volume for Portainer:

    docker volume create portainer_data
  2. Run Portainer:

    docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

Step 4: Access Portainer

Open a web browser and navigate to http://your.server.ip:9000. Youโ€™ll be greeted by the Portainer setup screen.

  1. Create an Admin User: Set your username and password.
  2. Connect to the Docker Environment: Choose โ€œDockerโ€ as the environment type and connect.

Step 5: Start Managing Your Containers

You are now equipped to manage your Docker containers via Portainerโ€™s interface. From this dashboard, you can create, manage, and monitor your containers with ease.

FAQs

1. What are the system requirements to run Portainer?

Portainer can run on any server that supports Docker. Generally, you should have a minimum of 1 GB of RAM, but for smoother performance - especially when managing multiple containers - at least 2 GB of RAM is recommended. Ensure that your VPS has sufficient CPU resources depending on the workload. Keep in mind that the size of images and containers you plan to run will also affect the storage requirements.

2. Can I secure Portainer with SSL?

Yes, securing your Portainer instance with SSL is crucial, especially if you plan to expose it to the internet. The easiest way to achieve this is by using a reverse proxy with SSL termination. You can use tools like Nginx or Traefik, both of which can handle SSL certificates from Letโ€™s Encrypt for free. After setting up the reverse proxy, you would redirect traffic to your Portainer instance and allow encrypted connections.

3. How can I back up Portainer configurations?

Portainer uses a separate Docker volume (portainer_data) to store its data, so you can back it up easily by backing up the Docker volume associated with it. You can create a tarball of the volume or use Docker commands to export the data. Additionally, backing up the configuration files for any containers you manage through Portainer can help ensure a complete backup. Regular backups are recommended to prevent data loss.

By following this guide, you can efficiently set up Portainer on a VPS and simplify your Docker management. For more resources and community discussions about self-hosting, check out r/selfhosted and awesome-selfhosted.