Deployment guide

Installing Docker on a VPS: A Clean Base for Your Apps

Deploy on a VPS Cloud →

Development7 min read

Installing Docker on a VPS: A Clean Base for Your Apps

Docker is the common foundation of most self-hosted deployments: one image, one volume, a reproducible configuration. On a ServOrbit VPS, it becomes a stable base for launching an application, a database or a full stack without depending on a closed PaaS. This guide lays the foundations: installation, Compose, persistence and network exposure.

Why Host Docker on a VPS?

A VPS dedicated to Docker frees you from the limits of shared hosting and as-a-service platforms that bill by usage. You choose the amount of RAM and CPU allocated to each container, you keep control over networking and storage, and you avoid vendor lock-in. It is the ideal solution for developers and SMBs that want to industrialise their deployments without blowing up their infrastructure budget.

What You Can Do With Docker

  • Deploy isolated web applications (Node.js, PHP, Python, Ruby) with no dependency conflicts
  • Run databases (PostgreSQL, MySQL, MongoDB, Redis) in separate, backupable containers
  • Orchestrate several services with Docker Compose in a single configuration file
  • Set up CI/CD pipelines by running reproducible builds on your own server
  • Self-host open-source SaaS tools (Plausible, Matomo, Nextcloud, Gitea, etc.) at lower cost
  • Test staging environments identical to production thanks to the shared Docker image

Install Docker on Your ServOrbit VPS

01

Order a ServOrbit Cloud VPS

Go to /vps-cloud and choose the plan suited to your workload. To get started with Docker, a VPS with at least 2 GB of RAM and 20 GB of SSD storage is recommended. Complete the order: your server will be provisioned automatically within a few minutes on Ubuntu or Debian.

02

Access the Marketplace in your client area

Log in to your ServOrbit client area, then open the 'Marketplace' section from your VPS dashboard. There you will find a list of ready-to-use applications, categorised by use (development, database, CMS, etc.).

03

Select Docker and start the installation

Click the 'Docker' application in the Marketplace, then confirm the installation in one click. The script automatically provisions Docker Engine (latest stable version) and Docker Compose on your VPS. The operation usually takes less than 2 minutes.

04

Verify the installation and access the server via SSH

Connect to your VPS via SSH: ssh root@<ip-du-vps>. Check that Docker is operational with the command docker --version and test your installation with docker run hello-world. The Docker daemon listens on the Unix socket /var/run/docker.sock; no network port is exposed by default for security reasons.

05

Launch your first container and expose a port

Deploy your first application with a command such as docker run -d -p 8080:80 --name mon-app nginx. Your NGINX container will then be reachable at http://<ip-du-vps>:8080. Remember to open the corresponding port in your VPS firewall (ufw allow 8080) and to create a docker-compose.yml file to manage multi-container stacks reproducibly.

Never expose the Docker daemon on the network (the -H tcp:// option) without protecting it with a TLS certificate and mutual authentication. By default, any user with access to the Docker socket effectively has root rights on the machine. Instead, add your trusted users to the docker group (usermod -aG docker <utilisateur>) and use a reverse proxy like Caddy or Nginx to expose your services with automatic HTTPS.

The Official Documentation

For advanced configuration, tool-specific options and version changes, refer to the official Docker documentation. This guide covers going live on a ServOrbit VPS; the vendor's documentation remains the reference for fine-tuning.

Deploy Docker in Minutes on a ServOrbit Cloud VPS

Enjoy a high-performance Cloud VPS with one-click Docker installation, an intuitive client area and Morocco-based support to start your containerised projects without friction.

Need help?

Browse our help center and FAQ, or write to our team — support in French, English and Arabic.