How to Install Portainer for Web-Based Docker Management

Portainer provides a graphical web dashboard for managing Docker containers, images, networks, and volumes — useful if you'd rather click through a UI than remember every CLI command. This guide installs Portainer Community Edition as a Docker container itself.

Prerequisites

  • Docker Engine installed and running
  • Root or sudo access

Step 1 — Create a Persistent Volume

docker volume create portainer_data

Step 2 — Run Portainer

docker run -d \
  --name portainer \
  --restart unless-stopped \
  -p 8000:8000 \
  -p 9443:9443 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:latest

Step 3 — Allow the Port Through the Firewall

sudo ufw allow 9443/tcp

Step 4 — Access the Dashboard

Open in your browser:

https://YOUR_SERVER_IP:9443

Your browser will show a self-signed certificate warning — this is expected on first setup.

Step 5 — Create the Administrator Account

On first login, set a strong administrator username and password.

Step 6 — Connect to the Local Docker Environment

Select Local and click Connect. Portainer will display all existing containers, images, and volumes on the host.

What You Can Manage from Portainer

  • Start, stop, and restart containers
  • Deploy new stacks from a Docker Compose file, pasted directly into the UI
  • View real-time logs and resource usage per container
  • Manage volumes, networks, and images
  • Set up additional users with role-based access

Deploying a Stack via Portainer

Go to Stacks → Add Stack, paste your docker-compose.yml content, and click Deploy — equivalent to running docker compose up -d from the command line.

Common Errors

Can't reach port 9443 — confirm the firewall rule was added and the container is running: docker ps.

"Access denied" connecting to the local environment — verify the Docker socket was correctly mounted with -v /var/run/docker.sock:/var/run/docker.sock.

Security Best Practices

  • Restrict port 9443 to trusted IPs at the firewall level if possible
  • Use a strong, unique administrator password
  • Mounting the Docker socket gives Portainer root-equivalent control over the host — only run it on servers you trust and secure appropriately

FAQ

Is Portainer free?
Portainer Community Edition is free and covers all core container management features used in this guide.

Related Articles

  • Deploy Your First Docker Container
  • How to Install Nginx Proxy Manager with Docker
  • Docker Security Best Practices
  • portainer, docker gui, docker management, docker dashboard
  • 0 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

How to Install Docker Engine on Ubuntu & Debian (Complete Guide)

Docker lets you package applications and their dependencies into lightweight, isolated containers...

How to Install Docker Compose on Ubuntu & Debian

Docker Compose lets you define and run multi-container applications from a single YAML file,...

Deploy Your First Docker Container: A Beginner's Walkthrough

With Docker installed, this hands-on walkthrough covers the core workflow you'll use constantly:...

How to Update Docker and Docker Compose Safely

Keeping Docker Engine and Compose updated brings security fixes, performance improvements, and...

Docker Compose Troubleshooting: Common Errors & Fixes

A reference guide to the Docker and Docker Compose errors you're most likely to encounter, with...