← Volver al blog

How to Install Docker on a VPS

  • Xernode
  • 1 min de lectura
  • 19 de marzo de 2026
Linux docker linux vps containers devops

Introduction

Docker makes it easy to deploy and manage applications in containers. This guide shows you how to install Docker on your VPS quickly and securely.

Step-by-step Guide

  1. Update your package list:
    • sudo apt update
  2. Install required dependencies:
    • sudo apt install apt-transport-https ca-certificates curl software-properties-common
  3. Add Docker’s official GPG key:
    • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  4. Add the Docker repository:
    • echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  5. Update the package list again:
    • sudo apt update
  6. Install Docker:
    • sudo apt install docker-ce
  7. Check Docker version:
    • docker --version
  8. (Optional) Add your user to the docker group:
    • sudo usermod -aG docker $USER

Log out and back in for this to take effect.

Recommendations

  • Always keep Docker updated to the latest stable version.
  • Use the docker group for convenience, but be aware of security implications.
  • Regularly review running containers and images.

Call To Action

Ready to deploy apps with Docker? Get a high-performance VPS now! https://xernode.com/#pricing

Related Guides

How to Set Up Automatic Backups in Linux

How to Enable Firewall (UFW) in Ubuntu