Install Docker on Linux / Raspberry Pi OS

This guide explains how to install Docker on Linux, including Raspberry Pi OS, to run the remote Wake-on-LAN service for Turn Off PC.

The installation process and commands are the same for Linux and Raspberry Pi OS.


Supported systems

This guide applies to:

Applies to:


What this setup does

After completing this guide:


Prerequisites

Before continuing, make sure that:


Step 1: Install Docker

Docker provides an official installation script.

Run the following command:

curl -fsSL https://get.docker.com | sh

This command:

This works on both Linux and Raspberry Pi OS.


Step 2: Enable and start Docker

Ensure Docker starts automatically at boot:

sudo systemctl enable docker
sudo systemctl start docker

Verify Docker is running:

sudo systemctl status docker

The service should be active (running).


Step 3: Allow Docker without sudo (recommended)

By default, Docker requires sudo.

To allow your user to run Docker commands without sudo:

sudo usermod -aG docker $USER

Then log out and log back in for the change to take effect.


Step 4: Verify Docker installation

Run the following command:

docker version

You should see both:

Test Docker with a simple container:

docker run hello-world

If the container runs successfully, Docker is installed correctly.

Common problems

Docker command not found


Permission denied when running Docker


Docker service not running

sudo systemctl start docker
journalctl -u docker