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:

  1. sudo apt update to look for updates
  2. sudo apt dist-upgrade to update packages or the system, idk
  3. you might have to install docker if you don’t have it already
  4. sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
  5. open the webbrowser and goto <ipAdress>:9000
  6. create your administrator account (and save it)

Updating Portainer on install

Now weirdly enough this doesn’t take the latest version of portainer. So I recommend using the update steps below.

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 your 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.

  1. Go back to the console (if you left it)
  2. run sudo docker stop portainer
  3. run sudo docker rm portainer
  4. run sudo docker pull portainer/portainer-ce:latest
  5. run sudo 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
Link to original