Overview
Docker makes it easy to deploy applications without worrying about complex installations. Combined with Portainer, it provides a simple web interface for managing containers.
This guide installs both Docker and Portainer on Raspberry Pi OS.
Prerequisites
Before starting, ensure:
- Raspberry Pi OS is installed
- SSH access is working
- Internet connection available
- User has sudo privileges
Step 1 – Update the System
Run:
sudo apt update
sudo apt upgrade -y
Keeping the operating system updated helps avoid compatibility issues.
Step 2 – Install Docker
Run the official installation script:
curl -fsSL https://get.docker.com | sh
Once complete, add your user to the Docker group:
sudo usermod -aG docker $USER
Log out and back in for the change to take effect.
Step 3 – Verify Docker
Check the installation:
docker --version
You should see the installed Docker version.
Step 4 – Create Portainer Storage
Create a Docker volume:
docker volume create portainer_data
Step 5 – Deploy Portainer
Run:
docker run -d \
--name portainer \
--restart=always \
-p 8000:8000 \
-p 9443:9443 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest
Step 6 – Open Portainer
Browse to:
https://your-pi-ip:9443
Create your administrator account and begin managing containers through the web interface.

Common Issues
Permission Denied
Ensure your user has been added to the Docker group and you’ve logged out and back in.
Cannot Reach Portainer
Check:
- Docker container is running
- Firewall settings
- Correct IP address
- Port 9443 is accessible
Next Steps
With Docker and Portainer installed, you’re ready to deploy services such as:
- WordPress
- MariaDB
- Home Assistant
- Node-RED
- Grafana
- MQTT brokers
These deployments are covered in dedicated Realm Labs guides.

