VPS means Virtual Private Server.

I myself use Contabo.

Creating containers etc.

To find out how to create containers etc / where to continue from here. go to the Portainer docker containers

connect

Linux connect

  1. Open your terminal and type ssh username@your_server_ip
    • Replace username with the user you set up on your VPS (often root).
    • Replace your_server_ip with the IP address Contabo gave you.
  2. Accept the host key The very first time you connect you’ll see a warning like:
The authenticity of host '1.2.3.4 (1.2.3.4)' can't be established.
ECDSA key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no)?

Type yes and press Enter. This adds the server’s key to ~/.ssh/known_hosts. 3. Enter your password

Windows Connect

this article says we should download PuTTY to connect to our Linux VPS. You only need to enter the ip and click connect. (you can paste into your PuTTY console by right clicking)

U can also do it with PowerShell, I use it, but u have to activate it in an ancient part of windows

  • Stannina 2024

(pasting in a console is right click, not ctrl+v)

Installing portainer

install portainer

portainer documentation

I followed this video:

sudo apt update
sudo apt dist-upgrade
sudo docker run -d -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

open the webbrowser and goto <ipAdress>:9443 create your administrator account (and save it)

Link to original

updating portainer

Important

Starting from Portainer CE 2.9 and BE 2.10, HTTPS is enabled by default on port 9443. These instructions will configure Portainer to use 9443 for HTTPS and do not expose 9000 for HTTP. If you need to retain HTTP access, you can add:

-p 9000:9000

to the sudo docker run -d -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest command.

You can also choose to completely disable HTTP after the update. Before you make Portainer HTTPS only, make sure you have all your Agents and Edge Agents already communicating with Portainer using HTTPS.

Warning

Before beginning any update, Portainer devs highly recommend taking a backup of your current Portainer configuration.

Even though portainer is a docker container itself, so everything should go without errors, and your other containers should keep running whilst migrating. The keyword is Should, since you never know if something unlikely will occur.

That being said, I used contabo’s snapshot to back it up, and not portainers backup method.

based on this article.

Info

I, the auther of this article, assume that u use the community edition of portainer. If you don’t, visit the url above to find the correct counterparts of step 4 and 5.

Go back to the console (if you left it) and run:

sudo docker stop portainer
sudo docker rm portainer
sudo docker pull portainer/portainer-ce:latest
sudo docker run -d -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

doing this once in a while is a good idea (portainer notifies you on updates). Doing the following commands are also smart to do when you are at it:

sudo apt update
sudo apt upgrade
Link to original