How to install Docker on your LWS VPS with the Docker CE template

Procédure

To install Docker on your LWS VPS in just a few minutes, the fastest method is to use the preconfigured Docker CE template available in your customer area. This ready-to-use system frees you from having to manually install the repositories, the container engine, and the various add-ons. We will see how to reset your virtual machine with this template, connect via SSH, check the services, and deploy a first website with Nginx.

Reinstall the server with Docker CE

  1. Access VPS management

    Log in to your LWS customer area and go to the Servers tab. On the line corresponding to your virtual machine, click the Manage button to open the KVM administration panel of your VPS.

    How to install Docker on your LWS VPS with the Docker CE template
  2. Open the reinstallation menu

    In the side menu on the left of the administration panel, click Reinstallation. This interface lets you completely reset the operating system of your machine.

    How to install Docker on your LWS VPS with the Docker CE template
  3. Select the Docker CE template

    Click the Select the template to install field and type “Docker” to filter the list. Two Docker CE templates are offered: one based on Ubuntu 24.04, the other on Debian 13; choose the one you prefer (this tutorial uses Debian 13). Then make sure your SSH key is checked under SSH keys to install: you will be able to connect without a password.

    How to install Docker on your LWS VPS with the Docker CE template
  4. Launch the reinstallation request

    Once the Docker CE template has been selected and your SSH keys have been verified, click the red Reinstall the server button located at the bottom right of the page.

    How to install Docker on your LWS VPS with the Docker CE template
  5. Confirm your server name

    A security modal window appears to warn you that the disk contents will be permanently deleted. Copy your server identifier exactly into the input field, then click the Reinstallation button to start the process.

    How to install Docker on your LWS VPS with the Docker CE template

Connect and test the environment

  1. Connect to your server via SSH

    Open a terminal on your computer and start the SSH connection to your server using the root account. Replace the example IP address 203.0.113.10 with the actual IP address of your VPS, visible in your customer area. During the first exchange, validate the security fingerprint by typing “yes”.

    ⌨ On your computer
    ssh root@203.0.113.10
    Expected result
    The authenticity of host '203.0.113.10 (203.0.113.10)' can't be established.
    ED25519 key fingerprint is SHA256:…
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
  2. Check the Docker and Compose versions

    Query the Docker binaries to make sure that the daemon and the Compose plugin are properly installed and working on your machine.

    ⌨ On the server
    docker --version
    docker compose version
    Expected result
    Docker version 29.9.0, build f415da8
    Docker Compose version v5.6.0
  3. Test with the hello-world image

    Download and run the official verification container. This command confirms that the Docker engine communicates correctly with the Docker Hub registry and can instantiate containers without any issues.

    ⌨ On the server
    docker run hello-world
    Expected result
    Hello from Docker!
    This message shows that your installation appears to be working correctly.

Deploy a first web container

  1. Deploy an Nginx web server

    Start an Nginx container in the background with the -d option by linking port 80 of your VPS to port 80 of the container. Then check the status of the active container with the docker ps command.

    ⌨ On the server
    docker run -d --name web -p 80:80 nginx
    docker ps
    Expected result
    CONTAINER ID   IMAGE     COMMAND                  CREATED         STATUS                  PORTS                                 NAMES
    c3b46a4e354c   nginx     "/docker-entrypoint.…"   2 seconds ago   Up Less than a second   0.0.0.0:80->80/tcp, [::]:80->80/tcp   web
  2. Display the web page in your browser

    Open your web browser and enter your VPS's public IP address in the address bar. The default Nginx home page appears, proving that HTTP requests are reaching the container correctly.

    How to install Docker on your LWS VPS with the Docker CE template
  3. Close the SSH session

    Return to your terminal and end the remote session by entering the disconnect command. Your web container will continue running in the background on the server.

    ⌨ On the server
    exit
    Expected result
    disconnection
    Connection to 203.0.113.10 closed.

Glossary

Docker CE
Community and free version of the Docker containerization engine, allowing isolated applications to run.
Docker Compose
Tool used to define and orchestrate multi-container applications using a single configuration file.
Docker image
Read-only template containing the code, dependencies, and configuration required to launch an application.
Container
Live, isolated instance created from a Docker image that runs a specific program.
VPS template
Preinstalled and preconfigured system image provided by the host to deploy a ready-to-use server in a few clicks.
SSH
Secure communication protocol used to control a remote server from the command line.
Nginx
Open source web server known for its speed and low memory usage.

Frequently asked questions

Is my current data kept during reinstallation?

No. Choosing a new template performs a full format of your VPS hard drive. You must back up all your files and databases to an external medium before starting the procedure.

Where can I find the root password if I do not use an SSH key?

When no SSH key is selected, a random password is generated by the system. It is automatically sent to the contact email address associated with your LWS customer account at the end of the installation.

Which software is included in the Docker CE template?

The template exists in two versions, on Ubuntu 24.04 or Debian 13. Both include the Docker Community Edition engine (docker-ce), the docker-ce-cli command-line tool, the containerd.io runtime, as well as the Docker Buildx and Docker Compose plugins.

Will my Nginx container remain active after closing the terminal?

Yes: thanks to the -d option (detached mode), the container runs in the background and remains accessible after the exit command. However, it does not restart automatically if the server reboots; for that, launch it with the --restart unless-stopped option.

help.lws.net/a/7927
Was this article helpful?

Yes

No

Read 1 times

Thank you! Feel free to ask questions about our documentation if you would like more information, and help us improve it.

Similar articles

A question about this article?

Ask the LWS team and the community. Answers are published after moderation.

Ask the LWS team and its community a question

GDPR: Controller: LWS-Ligne Web Services. Purpose: moderation and public publication of your question, possible notification of an answer. Legal basis: consent (Art. 6(1)(a) GDPR). Email retention: 90 days after notification, 12 months maximum without an answer. To exercise your rights, see the GDPR section of our Terms and Conditions.