Portainer is an open source tool that lets you visually manage your Docker environment! You can manage containers, images, and networks with just a click of the mouse, even if you’re not familiar with commands. In this article, we’ll walk you through everything from installing Portainer to initial setup.
—.
🔍 Why do you need Portainer?
- Visual management 👀.
- Provides a graphical interface instead of CLI commands like
docker ps
anddocker stats
. - Check container status, logs, and resource usage at a glance
- Provides a graphical interface instead of CLI commands like
- Beginner friendly 🎯
- Easy to operate without knowing Docker concepts
- Create/delete containers in 3 clicks
- Supports multiple environments 🌐.
- Not only local Docker, but also remote servers, Swarm, Kubernetes, etc.
—.
⚙️ Prerequisites before installation
- Complete Docker Engine installation
# Verify installation docker --version # Check Docker Compose (optional) docker compose version
- Configure Firewall** 🔒
Need to open ports
9443
(web UI),8000
(agent communication)
—]
📥 Installation method 1: Simple installation with Docker CLI (recommended)
This is the fastest way to install.
# 1. Create a volume for storing data
docker volume create portainer_data
# 2. Run the Portainer container
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:latest
Option Description:
-v /var/run/docker.sock
: communicate with the Docker daemon (⚠️ required)-v portainer_data:/data
: Ensure persistence of settings--restart=always
: Automatically start on system reboot
✅ Run check:
docker ps -f name=portainer
—]
📂 Installation method 2: Install with Docker Compose (advanced)
If you need to reuse it, manage it as a YAML file.
- Create a
docker-compose.yml
file:version: '3.8'
services: portainer: image: portainer/portainer-ce:latest 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:
2. run stack:
```bash
docker compose up -d
—]
🌐 Initial Setup Step-by-Step
-
Access address:
https://서버IP:9443
⚠️ Enable HTTPS by default (ignore certificate warning) -
Create an administrator account
- Username:
admin
(default) - Password: A complex combination of at least 12 characters is recommended
- Username:
-
Configure environment connection !
- Click “Get Started” → Select “Local”
- Connect to local Docker with
Connect
button
—]
🛠️ Required security settings
- Enforce HTTPS (Settings > SSL/TLS)
- Enable Let’s Encrypt or enroll a user certificate
- Set up authentication (Settings > Authentication)
- Control team access with LDAP/AD integration
- Two-Factor Authentication (2FA) (Settings > Authentication) Enhance security with Google Authenticator
—.
💡 Collection of utilization tips
- **Deploy quickly with templates
- Install your favorite apps like Nginx, MySQL, etc. in 1 minute
- **Access to Web Terminal
- Access the CLI inside the container
- Set up notifications
- Slack/email notifications when a container crashes
- **Backup/Restore
- Export configuration file from Settings > Backup configuration
—]
❌ Troubleshooting Guide
Q1. “Connection refused” occurs when connecting **Q2.
- Check the firewall:
sudo ufw allow 9443
- Docker daemon status:
systemctl status docker
Q2. “Unable to connect to Docker” error.
- Check volume permissions:
sudo chmod 777 /var/run/docker.sock
**Q3. If you forget your password Add to the container recreate command:
--env ADMIN_PASSWORD="New Password"
—]
🎯 Conclusion
Portainer is a game changer in Docker management!
- For beginners: escape CLI phobia ✅.
- Experts: centralized management of 50+ servers ✅
Install it now and you can get a dashboard like this in 5 minutes!
> 📢 If you followed along today, please share your success in the comments! > > Next time, we’ll show you how to manage a Kubernetes cluster with Portainer 😊