Introduction
Portainer is a lightweight, powerful management UI that allows you to easily manage Docker containers, images, networks, and volumes from a web interface. It's ideal for developers, sysadmins, and businesses who want a simplified way to oversee their container infrastructure. In this guide, we’ll walk through installing Portainer on a Linux server using Docker.
Prerequisites
Before starting, ensure you have the following:
A Linux server (Ubuntu/Debian/RHEL).
A root user or user with sudo privileges.
Docker and Docker CLI installed (version 20+ recommended).
Installation
Step 1: Create a Docker Volume for Portainer Data
This creates a persistent Docker volume named portainer_data to store Portainer’s data such as user accounts, settings, and endpoint configurations.
sudo docker volume create portainer_data
Step 2: Download and install the Portainer Server 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:lts
Step 3: Access the Web UI
Open a browser and navigate to:
https://<your-server-ip>:9443
The first time you access the UI, you’ll be prompted to create an admin account and choose your Docker environment (local or remote).
Step 4: Installing the application via Stack
To install your preferred dockerized application, you need to:
Click “Home” on the left side pane;
Click on your existing environment or create a new one;
Click on “Stacks” on the left side pane;
Lastly on the “+ Add stack” on the right side.
Give it a name, insert the docker-compose file’s content, define volumes if needed and click “Deploy the stack”.
That’s it! The application is now deployed and you can manage it through the web interface!
Conclusion
Portainer simplifies container management by providing a clean, intuitive interface for Docker operations. With this setup, you can efficiently control your containers, images, volumes, and networks without using the CLI for every action. As a bonus, it’s fast to deploy and doesn’t demand many resources—making it ideal for both production and home lab environments.