Install Docker

Update the repo to get latest versions

sudo apt update

Install the latest version

sudo apt install docker.io

Set Docker to start on startup

sudo systemctl enable --now docker

Give your user permissions to docker, replacing user with your username

sudo usermod -aG docker user

Test it has installed correctly by getting the docker version

docker --version

Install Portainer

On the server, create the portainer volume

sudo docker volume create portainer_data

Now create the Portainer docker instance.

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-ce

Start the Portainer docker instance.

sudo docker start portainer

First run

Launch a browser and go to http://serverip:9000. You will get the screen to create an admin user. Create an admin user.

Default Portainer Screen

Next you will be prompted on what docker environment you want to manage. We are connecting to the local server, so select Local and press Connect

Connection Portainer Screen

You will then get into the Portainer main dashboard.