Portainer Setup Guide 2026: Docker Management Made Easy
TUTORIAL 12 min read fordnox

Portainer Setup Guide 2026: Docker Management Made Easy

Install Portainer CE on your VPS to manage Docker containers with a web UI. Complete guide with setup, stacks, templates, and multi-server management.


Portainer Setup Guide: Docker Management Made Easy

Portainer gives you a web UI for managing Docker containers, images, volumes, and networks. Instead of memorizing docker CLI commands, you get a clean dashboard that makes container management visual and approachable.

What is Portainer?

What is Portainer?

What is Portainer?

Portainer is a lightweight management UI for Docker and Kubernetes:

It runs as a single Docker container and uses minimal resources.

Portainer CE vs Business

FeatureCommunity (Free)Business ($)
Container management
Docker Compose/Stacks
App templates
Role-based access
Multiple environments
Kubernetes support
Registry managementBasicAdvanced
GitOps deployments
External auth (LDAP/OAuth)
SupportCommunityProfessional

For self-hosters and small teams: CE is more than enough. Business is for organizations needing enterprise auth and audit trails.

VPS Requirements

Portainer itself is lightweight, but you need room for your containers:

ProviderPlanSpecsPrice
HostingerKVM11 vCPU, 4GB RAM$4.99/mo
HetznerCX222 vCPU, 4GB RAM€5.49/mo
DigitalOceanBasic2 vCPU, 2GB RAM$12/mo
VultrVC22 vCPU, 4GB RAM$24/mo

Best value: Hostinger KVM1 gives you 4GB RAM for $4.99/mo — plenty for Portainer plus a dozen containers.

Installation Guide

Step 1: Create Your VPS

  1. Sign up at your chosen provider (we recommend Hostinger)
  2. Create a VPS with Ubuntu 22.04 or Debian 12
  3. Select at least 2GB RAM
  4. Add your SSH key
  5. Note the server IP

Step 2: Install Docker

SSH into your server and install Docker:

ssh root@your-server-ip

# Update system
apt update && apt upgrade -y

# Install Docker using official script
curl -fsSL https://get.docker.com | sh

# Verify installation
docker --version
docker run hello-world

Step 3: Install Portainer CE

Create a volume for Portainer data and run the container:

# Create data volume
docker volume create portainer_data

# Run Portainer
docker run -d \
  -p 8000:8000 \
  -p 9443:9443 \
  --name portainer \
  --restart=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:sts

That’s it. Portainer is running.

Step 4: Access the Dashboard

Open your browser:

https://your-server-ip:9443

You’ll see a self-signed SSL warning — that’s normal, accept it.

On first visit:

  1. Create your admin account
  2. Set a strong password (12+ characters required)
  3. Click Get Started to connect to the local Docker environment

You now have a fully functional Portainer instance.

Step 5: Set Up SSL with Reverse Proxy (Optional)

For proper SSL, use Caddy or Traefik as a reverse proxy:

Caddy example:

portainer.yourdomain.com {
    reverse_proxy localhost:9443 {
        transport http {
            tls_insecure_skip_verify
        }
    }
}

Or with Nginx:

server {
    listen 443 ssl;
    server_name portainer.yourdomain.com;

    ssl_certificate /etc/letsencrypt/live/portainer.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/portainer.yourdomain.com/privkey.pem;

    location / {
        proxy_pass https://localhost:9443;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Point DNS A record for portainer.yourdomain.com → your server IP.

Deploying Containers

Deploy from App Templates

Portainer comes with 100+ built-in templates:

  1. Go to App Templates in the sidebar
  2. Browse or search (WordPress, Nginx, MySQL, Redis, etc.)
  3. Click the template
  4. Configure settings (name, ports, volumes)
  5. Click Deploy the container

Popular templates:

Deploy with Docker Compose (Stacks)

Stacks are Portainer’s way of managing Docker Compose deployments:

  1. Go to StacksAdd Stack
  2. Name your stack
  3. Paste your Docker Compose YAML:
services:
  app:
    image: nginx:alpine
    ports:
      - "8080:80"
    volumes:
      - app_data:/usr/share/nginx/html
    restart: unless-stopped

volumes:
  app_data:
  1. Click Deploy the stack

You can also pull compose files from a Git repository — useful for GitOps workflows.

Deploy a Single Container

For quick one-off containers:

  1. Go to ContainersAdd Container
  2. Set Name and Image (e.g., redis:alpine)
  3. Configure:
    • Port mapping — Host port → Container port
    • Volumes — Persistent storage
    • Environment variables — Config values
    • Restart policy — Always, on-failure, etc.
  4. Click Deploy the container

Managing Containers

Container Actions

From the Containers list you can:

Container Console

One of Portainer’s best features. Need to debug something?

  1. Click the container → Console
  2. Select shell: /bin/bash or /bin/sh
  3. Click Connect

You’re inside the container. No SSH, no docker exec commands needed.

Bulk Operations

Select multiple containers and:

Useful for managing related services together.

Managing Images

Pull Images

  1. Images → Enter image name (e.g., node:20-alpine)
  2. Click Pull the image
  3. Image is downloaded and ready to use

Clean Up Unused Images

Docker images accumulate fast:

  1. Images → Check unused images
  2. Select all → Remove
  3. Or use the Prune button to clean everything unused

This is equivalent to docker image prune -a but visual and safer.

Volume Management

Create Volumes

  1. VolumesAdd Volume
  2. Name it (e.g., postgres_data)
  3. Click Create the volume

Browse Volume Contents

Portainer lets you browse files inside volumes — handy for checking data without shelling into containers.

Backup Volumes

For critical data, back up volumes:

docker run --rm \
  -v postgres_data:/data \
  -v /backup:/backup \
  alpine tar czf /backup/postgres-backup.tar.gz -C /data .

Network Management

Create Networks

  1. NetworksAdd Network
  2. Name it, select driver (bridge, overlay, macvlan)
  3. Optionally configure subnet and gateway
  4. Click Create the network

Connect Containers

To let containers communicate:

  1. Open the network
  2. Join a container → Select container
  3. Now both containers can reach each other by name

This is how you connect your app container to your database container without exposing database ports publicly.

Multi-Server Management

Adding Remote Docker Hosts

Portainer can manage multiple servers from one dashboard:

Method 1: Portainer Agent (recommended)

On the remote server:

docker run -d \
  -p 9001:9001 \
  --name portainer_agent \
  --restart=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /var/lib/docker/volumes:/var/lib/docker/volumes \
  portainer/agent:sts

In Portainer:

  1. EnvironmentsAdd Environment
  2. Select Agent
  3. Enter: remote-server-ip:9001
  4. Name it, click Connect

Method 2: Docker API (less secure)

Enable Docker TCP on the remote host and connect directly. Only use this over a secure tunnel.

Edge Agents

For servers behind firewalls or NAT:

  1. EnvironmentsAdd EnvironmentEdge Agent
  2. Copy the generated install command
  3. Run on the remote server
  4. The agent phones home through port 8000

No inbound ports needed on the remote server.

User Management

Create Teams

  1. UsersTeamsAdd Team
  2. Name the team (e.g., “Developers”, “Ops”)

Add Users

  1. UsersAdd User
  2. Set username, password
  3. Assign to a team
  4. Set role: Administrator or User

Access Control

Per-environment and per-resource access:

This lets you give developers access to staging while keeping production locked down.

Portainer with Docker Compose

If you prefer managing Portainer itself with Compose:

services:
  portainer:
    image: portainer/portainer-ce:sts
    container_name: portainer
    restart: always
    ports:
      - "8000:8000"
      - "9443:9443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_data:/data

volumes:
  portainer_data:

Save as docker-compose.yml and run:

docker compose up -d

Performance Tips

1. Enable Swap

If running on a small VPS:

fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile swap swap defaults 0 0' >> /etc/fstab

2. Set Resource Limits

In Portainer, when creating containers:

Prevents any single container from consuming all resources.

3. Regular Cleanup

Schedule Docker cleanup:

# Add to crontab
0 3 * * 0 docker system prune -af --volumes 2>&1 | logger -t docker-prune

Or use Portainer’s built-in image cleanup.

4. Use Alpine Images

Where possible, use alpine variants:

Troubleshooting

Can’t Access Portainer UI

# Check if container is running
docker ps | grep portainer

# Check logs
docker logs portainer

# Verify port is open
ss -tlnp | grep 9443

# Check firewall
ufw status
ufw allow 9443

Container Won’t Start

  1. Check logs: Containers → Select container → Logs
  2. Common issues:
    • Port already in use → Change host port
    • Volume permission denied → Check ownership
    • Image not found → Verify image name

Stack Deploy Fails

  1. Check the compose YAML syntax
  2. Verify all images exist and are accessible
  3. Check for port conflicts with running containers
  4. Review the deployment log in the stack details

Out of Disk Space

# Check usage
df -h

# Clean Docker
docker system prune -af --volumes

# Check large images
docker images --format "{{.Repository}}:{{.Tag}} {{.Size}}" | sort -k2 -h

Portainer vs Alternatives

ToolUIComplexityBest For
PortainerWeb GUILowContainer management
CoolifyWeb GUILowApp deployment (PaaS)
DokployWeb GUILowApp deployment (PaaS)
YachtWeb GUILowSimple Docker UI
DockgeWeb GUILowCompose-only management
LazydockerTerminalLowCLI-based monitoring

Portainer is the best general-purpose Docker management UI. Use Coolify or Dokploy if you want PaaS features (git deploy, auto-SSL). Use Portainer if you want full control over individual containers.

FAQ

How much RAM does Portainer use?

About 50-100MB. It’s very lightweight.

Can I manage Docker Swarm with Portainer?

Yes. Portainer supports Docker Standalone, Docker Swarm, and Kubernetes.

Is Portainer CE really free?

Yes, permanently free for up to 5 environments. No feature limitations within CE.

How do I update Portainer?

docker stop portainer
docker rm portainer
docker pull portainer/portainer-ce:sts
docker run -d -p 8000:8000 -p 9443:9443 \
  --name portainer --restart=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:sts

Your data persists in the portainer_data volume.

Can Portainer replace Kubernetes?

For small-to-medium deployments, yes. If you’re running fewer than 50 containers across a few servers, Portainer with Docker is simpler and cheaper than Kubernetes.

Summary

Portainer turns Docker management from a CLI-only experience into something visual and accessible. Whether you’re running a few containers on a single VPS or managing multiple servers, it gives you a clean dashboard without the complexity of Kubernetes.

Recommended Setup:

ComponentChoiceCost
VPSHostinger KVM1$4.99/mo
ManagementPortainer CEFree
Reverse ProxyCaddyFree
Total$4.99/mo

Start here: Get a Hostinger VPS → Install Docker → Deploy Portainer → Manage everything from your browser.

~/portainer-setup-guide/get-started

Ready to get started?

Get the best VPS hosting deal today. Hostinger offers 4GB RAM VPS starting at just $4.99/mo.

Get Hostinger VPS — $4.99/mo

// up to 75% off + free domain included

// related topics

portainer portainer setup docker management gui portainer vps portainer ce install

// related guides

Andrius Putna

Andrius Putna

I am Andrius Putna. Geek. Since early 2000 in love tinkering with web technologies. Now AI. Bridging business and technology to drive meaningful impact. Combining expertise in customer experience, technology, and business strategy to deliver valuable insights. Father, open-source contributor, investor, 2xIronman, MBA graduate.

// last updated: March 13, 2026. Disclosure: This article may contain affiliate links.