Portainer on Ubuntu 24.04
Portainer is a lightweight management interface that simplifies Docker administration.
It allows you to manage containers, images, networks, and volumes through a clean web-based dashboard.

In this guide, you’ll learn how to install and run Portainer Community Edition (CE) on Ubuntu 24.04 using Docker Compose.
This method keeps your setup simple and organized while making future updates easy.
Prerequisites
Before installing Portainer, make sure your system is up to date and Docker is installed.
1. Update your system
sudo apt update && sudo apt upgrade -y
2. Install Docker
If Docker isn’t installed yet, you can set it up with:
sudo apt install docker.io -y
3. Enable and start Docker
sudo systemctl enable docker
sudo systemctl start docker
4. Install Docker Compose
Install Docker Compose with a single command:
sudo apt install docker-compose -y
Verify the installation:
docker-compose --version
Steps to Install Portainer
Follow these steps to install Portainer using Docker Compose.
1. Create a directory for Portainer
mkdir ~/portainer && cd ~/portainer
This directory will contain your Portainer configuration file.
2. Create the docker-compose.yml file
Use a text editor like nano to create the file:
nano docker-compose.yml
Add the following content:
version: "3.9"
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:
Save and exit the file (CTRL + O, ENTER, CTRL + X).
3. Start Portainer
Run the following command to start Portainer in detached mode:
docker-compose up -d
Docker will download the latest Portainer image and start the container.
4. Verify that Portainer is running
Check the running containers:
docker ps
You should see a line showing the Portainer container status as Up.
root@ubuntu-server:~/portainer# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ceeb7e0adf93 portainer/portainer-ce:latest "/portainer" 33 minutes ago Up 17 minutes 0.0.0.0:8000->8000/tcp, [::]:8000->8000/tcp, 0.0.0.0:9443->9443/tcp, [::]:9443->9443/tcp, 9000/tcp portainer
5. Access the Portainer web interface
Open your browser and go to:
https://<your-server-ip>:9443
For example:
https://192.168.1.10:9443

When you visit the page for the first time:
- Create an admin user
- Select Local Docker Environment
That’s it! You now have a fully functional Portainer dashboard.


Conclusion
Portainer makes Docker management much easier by providing a powerful and user-friendly interface.
With this setup on Ubuntu 24.04, you can monitor containers, networks, and volumes efficiently.
Since Portainer runs as a Docker container, updating it is simple — just pull the latest image and restart the service:
cd ~/portainer
docker-compose pull
docker-compose up -d
You now have a complete web dashboard to manage your Docker environment securely and efficiently.











