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?
Portainer is a lightweight management UI for Docker and Kubernetes:
- Web dashboard — See all containers, images, volumes at a glance
- Stack management — Deploy Docker Compose stacks from the UI
- App templates — One-click deploy 100+ popular apps
- Multi-environment — Manage multiple Docker hosts from one UI
- User management — Team access with role-based permissions
- Container console — Shell into containers from the browser
- Logs and stats — Real-time monitoring built in
It runs as a single Docker container and uses minimal resources.
Portainer CE vs Business
| Feature | Community (Free) | Business ($) |
|---|---|---|
| Container management | ✅ | ✅ |
| Docker Compose/Stacks | ✅ | ✅ |
| App templates | ✅ | ✅ |
| Role-based access | ✅ | ✅ |
| Multiple environments | ✅ | ✅ |
| Kubernetes support | ✅ | ✅ |
| Registry management | Basic | Advanced |
| GitOps deployments | ❌ | ✅ |
| External auth (LDAP/OAuth) | ❌ | ✅ |
| Support | Community | Professional |
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:
- Minimum: 1 vCPU, 1GB RAM, 20GB storage
- Recommended: 2 vCPU, 4GB RAM, 40GB+ storage
- OS: Ubuntu 22.04+, Debian 12+, or any Linux with Docker
- Ports: 9443 (HTTPS UI), 8000 (Edge agents, optional)
Recommended VPS Providers
| Provider | Plan | Specs | Price |
|---|---|---|---|
| Hostinger | KVM1 | 1 vCPU, 4GB RAM | $4.99/mo |
| Hetzner | CX22 | 2 vCPU, 4GB RAM | €5.49/mo |
| DigitalOcean | Basic | 2 vCPU, 2GB RAM | $12/mo |
| Vultr | VC2 | 2 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
- Sign up at your chosen provider (we recommend Hostinger)
- Create a VPS with Ubuntu 22.04 or Debian 12
- Select at least 2GB RAM
- Add your SSH key
- 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:
- Create your admin account
- Set a strong password (12+ characters required)
- 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:
- Go to App Templates in the sidebar
- Browse or search (WordPress, Nginx, MySQL, Redis, etc.)
- Click the template
- Configure settings (name, ports, volumes)
- Click Deploy the container
Popular templates:
- WordPress — Blog/CMS with MySQL
- Nginx — Web server / reverse proxy
- PostgreSQL — Database server
- Redis — Cache / message broker
- GitLab CE — Git hosting
- Nextcloud — Self-hosted cloud storage
Deploy with Docker Compose (Stacks)
Stacks are Portainer’s way of managing Docker Compose deployments:
- Go to Stacks → Add Stack
- Name your stack
- 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:
- 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:
- Go to Containers → Add Container
- Set Name and Image (e.g.,
redis:alpine) - Configure:
- Port mapping — Host port → Container port
- Volumes — Persistent storage
- Environment variables — Config values
- Restart policy — Always, on-failure, etc.
- Click Deploy the container
Managing Containers
Container Actions
From the Containers list you can:
- Start/Stop/Restart — Control container state
- Logs — View real-time container output
- Console — Shell into the container (bash, sh, or custom)
- Inspect — View full container configuration
- Stats — CPU, memory, network, I/O graphs
- Duplicate/Edit — Clone or modify container settings
Container Console
One of Portainer’s best features. Need to debug something?
- Click the container → Console
- Select shell:
/bin/bashor/bin/sh - Click Connect
You’re inside the container. No SSH, no docker exec commands needed.
Bulk Operations
Select multiple containers and:
- Stop all selected
- Start all selected
- Remove all selected
- Kill all selected
Useful for managing related services together.
Managing Images
Pull Images
- Images → Enter image name (e.g.,
node:20-alpine) - Click Pull the image
- Image is downloaded and ready to use
Clean Up Unused Images
Docker images accumulate fast:
- Images → Check unused images
- Select all → Remove
- 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
- Volumes → Add Volume
- Name it (e.g.,
postgres_data) - 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
- Networks → Add Network
- Name it, select driver (
bridge,overlay,macvlan) - Optionally configure subnet and gateway
- Click Create the network
Connect Containers
To let containers communicate:
- Open the network
- Join a container → Select container
- 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:
- Environments → Add Environment
- Select Agent
- Enter:
remote-server-ip:9001 - 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:
- Environments → Add Environment → Edge Agent
- Copy the generated install command
- Run on the remote server
- The agent phones home through port 8000
No inbound ports needed on the remote server.
User Management
Create Teams
- Users → Teams → Add Team
- Name the team (e.g., “Developers”, “Ops”)
Add Users
- Users → Add User
- Set username, password
- Assign to a team
- Set role: Administrator or User
Access Control
Per-environment and per-resource access:
- Full access — Complete control
- Limited — Only assigned stacks/containers
- Read-only — View but don’t modify
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:
- Set Memory limit (e.g., 512MB for a Node app)
- Set CPU limit (e.g., 0.5 CPUs)
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:
node:20-alpineinstead ofnode:20(50MB vs 350MB)python:3.12-alpineinstead ofpython:3.12nginx:alpineinstead ofnginx
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
- Check logs: Containers → Select container → Logs
- Common issues:
- Port already in use → Change host port
- Volume permission denied → Check ownership
- Image not found → Verify image name
Stack Deploy Fails
- Check the compose YAML syntax
- Verify all images exist and are accessible
- Check for port conflicts with running containers
- 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
| Tool | UI | Complexity | Best For |
|---|---|---|---|
| Portainer | Web GUI | Low | Container management |
| Coolify | Web GUI | Low | App deployment (PaaS) |
| Dokploy | Web GUI | Low | App deployment (PaaS) |
| Yacht | Web GUI | Low | Simple Docker UI |
| Dockge | Web GUI | Low | Compose-only management |
| Lazydocker | Terminal | Low | CLI-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:
| Component | Choice | Cost |
|---|---|---|
| VPS | Hostinger KVM1 | $4.99/mo |
| Management | Portainer CE | Free |
| Reverse Proxy | Caddy | Free |
| Total | $4.99/mo |
Start here: Get a Hostinger VPS → Install Docker → Deploy Portainer → Manage everything from your browser.
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
// related guides
$1 VPS Hosting 2026: Cheapest VPS Servers Starting at $1/Month
Looking for $1 VPS hosting? Compare the cheapest VPS providers starting from $1-3/month. Real specs, no hidden fees, honest reviews of budget VPS options.
tutorialCaddy Reverse Proxy Guide 2026: Automatic HTTPS Made Easy
Set up Caddy as a reverse proxy with automatic HTTPS, zero-config SSL, and simple Caddyfile syntax. Complete VPS deployment guide.
tutorialCloudflare Tunnel VPS Guide 2026: Expose Services Without Opening Ports
Set up Cloudflare Tunnel on your VPS to expose web apps securely without opening ports or revealing your server IP. Complete guide with Docker and DNS config.
tutorialCoolify VPS Setup Guide 2026: Self-Hosted Vercel Alternative
Deploy Coolify on your VPS for a self-hosted Vercel/Netlify experience. Complete setup guide with Docker, SSL, and app deployments.
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.