How to Install Portainer on Ubuntu 25.04
Portainer is a lightweight, open-source management tool for Docker that simplifies container, image, and volume management through an easy-to-use graphical user interface (GUI). It provides a centralized platform to manage Docker environments and is ideal for both small setups and large-scale Docker deployments.
Prerequisites
Before installing Portainer, ensure the following:
- Ubuntu 25.04 server is running.
- A user account with sudo privileges.
- Access to the internet to download Docker and Portainer.
Step-by-Step Installation Guide
Step 1: Update the System
It's important to ensure your system is up-to-date. Run the following command to update and upgrade your packages:
apt update && apt upgrade -y
Install Docker
Portainer requires Docker to be installed. If you don’t have Docker installed, follow these steps:
apt install apt-transport-https ca-certificates curl software-properties-common -y
Add Docker's GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Add the Docker repository:
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker:
apt update
apt install docker-ce docker-ce-cli containerd.io -y
Start and enable Docker:
systemctl start docker
systemctl enable docker
Check Docker status:
systemctl status docker
Install Portainer
Once Docker is installed and running, you can install Portainer to manage your Docker containers.
Create a Docker volume for Portainer:
docker volume create portainer_data
Download and 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
Output:
root@server:~# 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
Unable to find image 'portainer/portainer-ce:latest' locally
latest: Pulling from portainer/portainer-ce
6970b305841e: Pull complete
c05d4fb47930: Pull complete
04de093ad5ed: Pull complete
a9ff7abff372: Pull complete
e09df2601140: Pull complete
df254cde32a0: Pull complete
6b34a21056c4: Pull complete
faf3a09a336d: Pull complete
26693e01e9e2: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:449202d765d28ec443c1657fc1121aff92b8afcee6b58bcea36e1f0e81e8297c
Status: Downloaded newer image for portainer/portainer-ce:latest
2a19d562724499f2a3bca20e3a80d76f06f03506dc9af1880c639e70276d4f1b
Restart portainer
docker restart portainer
Access Portainer Web UI
Open a web browser and navigate to: https://YOUR-SERVER-IP:9443.
Note: Replace YOUR-SERVER-IP with actual IP Address
Set up the admin account by following the on-screen prompts.
Once logged in, you will be able to manage your Docker environment using Portainer.
This guide outlines the installation process for Portainer on Ubuntu 25.04, providing a step-by-step approach to setting up Docker, installing Portainer, and accessing the Portainer web interface for container management.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS