How to setup Docker on a STRATO Linux VC9

First of all, you need a server account with STRATO (obviously). That will give you a customer number for which you need to create a password. After that, you can log into the customer service page (https://www.strato.nl/apps/CustomerService). From there you can access and manage your Linux server. You should wait until your Linux server has been initialized. You will get an email about that.

Installing Ubuntu 22.4

First thing you need to do, is install an OS on your server. In this case, choose Ubuntu 22.4. You can do that in the customer service page by clicking the “Herinstallatie starten” button. You will be asked to select the OS, set a root password and public SSH key. Choose Ubuntu 22.4 here. Then click “Ok” to start installation of the OS on your server. Once it’s finished, you will see your server in the customer service page.

Opening VNC console (just to try)

In the customer service page you should see you server. The right-most column of the table contains a links “VNC-console openen”. If you click that, a new tab will be opened with a terminal window where you can log into Ubuntu using your root password. You may have to click inside the terminal window before it responds to your input. Annoying thing here is that your cursor is no longer visible (but it’s there :)).

Getting access to your server using SSH

When you ran the Ubuntu installation you had to provide a public key as well. This public key was automatically installed in the .ssh folder of your home directory. You should now be able to connect to your server via SSH directly (which is easier than the web terminal). Just type

ssh root@217.160.201.187

This is dangerous, however, so you should create another user, e.g., “ralph” to log in. To do that type

useradd -g users -d /home/ralph -s /bin/bash ralph

Then set a password as follows

passwd ralph

Still as user “root” create the home folder for user “ralph” (this has not been done automatically) and SSH folder for later storing the public key.

mkdir /home/ralph && mkdir /home/ralph/.ssh

Then copy the file add the earlier public key to the file /root/.ssh/authorized_keys to /home/ralph/.ssh. Also, change the owner of /home/ralph and everything in it to user “ralph”

cp /root/.ssh/authorized_keys /home/ralph/.ssh && chown -R ralph:users /home/ralph

If user “ralph” wants to install any interesting stuff he needs to be part of the “sudo” group. You can do that as follows

adduser ralph sudo

Next, test SSH login as user “ralph.

Installing Docker

After logging in as user “ralph” update the Ubuntu package manager as follows

sudo apt-get update

If user “ralph” was properly added to the “sudo” group this should work and update the apt package manager. You are now ready to install Docker. According to this post you first need to run the following commands

sudo apt-get install ca-certificates curl gnupg lsb-release

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

Finally, test the Docker installation by running

sudo docker run hello-world

References

  • https://askubuntu.com/questions/1409192/cannot-install-docker-desktop-on-ubuntu-22-04
Scroll to Top