In this article, we will have explained the necessary steps to install and configure Portainer on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with
sudo privileges. All the commands in this tutorial should be run as a non-root user.
Portainer is a special web-based application to manage your Docker. In other words, Portainer is a Docker GUI management console. It supports Windows, Linux, and Mac OS. Overall, you will learn how to install Docker-Compose, create a Portainer volume, and then create the Portainer container.
Install Portainer on Ubuntu 20.04
Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.
sudo apt update sudo apt upgrade
Step 2. Install Docker on Ubuntu system.
To install Docker CE from Docker, you first need to install some required packages by executing the command below:
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
Then, set the permissions:
sudo chmod +x /usr/local/bin/docker-compose
Step 3. Create Portainer Volume.
With Putty still open, create the Portainer volume:
sudo docker volume create portainer_data
Next, create the Portainer container:
sudo docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /srv/portainer:/data portainer/portainer
Portainer should now be running at your server’s IP and port 9000. (i.e. – 192.168.68.141:9000). If you don’t know the IP address of your server, just type
ifconfig into your terminal.
Step 4. Accessing Portainer Panel.
And that is it. Now Portainer is installed and running on port 9000. To access the dashboard, visit
127.0.0.1:9000 in your browser.
And then, you can start using Portainer to manage your Docker.
That’s all you need to do to install Portainer on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. For further reading on the Portainer, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.