This tutorial will show you how to install Portainer with Docker on Ubuntu 20.04. Overall, you will learn how to install Docker-Compose, create a portainer volume, and then create the Portainer container.

Step 1: Install Docker Compose

To install Docker-Compose, open Putty and SSH into your server.

Then run this command:

sudo curl -L`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

Then, set the permissions:

sudo chmod +x /usr/local/bin/docker-compose

Step 2: Create Portainer Volume

With Putty still open, create the Portainer volume.

sudo docker volume create portainer_data

Then, 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

Step 3: Start the Docker container.

sudo docker start portainer

Portainer should now be running at your server’s IP and port 9000. (i.e. – If you don’t know the IP address of your server, just type ifconfig into your terminal.

The username is admin with no default password, so you’ll need to create a password.

This is a local server, so you would choose Local, and then click Connect.

If you already have existing Docker containers, you should now see them under your Local section.

Wrapping Up

That’s it! You can now use Portainer to create multi-container applications such as BookStack.

My Homelab Equipment

Here is some of the gear I use in my Homelab. I highly recommend each of them.

The full list of server components I use can be found on my Equipment List page.

Similar Posts


  1. Hi.
    Thanks for the tutorial; I am new at Docker/container/images and I have a doubt; shouldn’t a container be always build based on an image? in this case where is the portainer’s image?

  2. Will this tutorial also work if the OS is Ubuntu?

    1. Yes it will! I’m using a Ubuntu 20.04 VM with Docker and Docker-Compose installed. Or were you meaning without using Docker?

Leave a Reply

Your email address will not be published. Required fields are marked *