If you’re ready to turn your Raspberry Pi into a powerful little home server, this guide will walk you through the exact steps to install Docker and Portainer — the two essential tools nearly every homelab enthusiast starts with. By the end of this tutorial, you’ll have a fully functional container environment, a clean web‑based dashboard for managing your apps, and a solid foundation for future self‑hosting projects.
Before we dive in, here are links to the products used in this article.
– Raspberry Pi 5 16gb: https://t4g.link/raspberrypi
– 128gb MicroSD Card: https://t4g.link/128gbmsd
– Argon ONE V5 Case: https://t4g.link/argonv5
– USB C Card Reader: https://t4g.link/usbccr
🎥 Video Overview
Why Docker and Portainer Belong on Every Raspberry Pi Server
When you’re building a homelab, you want flexibility, speed, and the ability to deploy applications without cluttering your system. Docker gives you exactly that. Instead of running full virtual machines, Docker uses lightweight containers that isolate your apps while keeping your Raspberry Pi fast and efficient.
Portainer takes this even further by giving you a clean, intuitive web interface to manage all your containers, images, volumes, and networks. No more memorizing long command‑line strings — you get a visual dashboard that makes container management accessible to beginners and powerful for advanced users.
This combination is the backbone of thousands of homelabs worldwide, and today, you’re setting it up on your own Pi.
Preparing Your Raspberry Pi OS
Before installing anything, we need to make sure your Raspberry Pi OS is fully updated. This ensures compatibility with Docker and prevents issues during installation.
Open your terminal or SSH into your Pi, then run:
sudo apt update && sudo apt upgrade -yThis command checks for updates and installs them automatically. Depending on how long it’s been since your last update, this may take a few minutes.
Once complete, your system is ready for Docker.
Installing Docker on Raspberry Pi
Docker provides an official installation script that makes setup incredibly simple. Instead of manually configuring repositories and dependencies, you can run a single command.
Use the following:
curl -sSL https://get.docker.com | shThis script installs Docker Engine, configures the service, and prepares your Pi to run containers.
When the installation finishes, Docker is technically ready — but your user account doesn’t yet have permission to run Docker commands without sudo.
Let’s fix that.
Adding Your User to the Docker Group
To avoid typing sudo before every Docker command, add your user to the Docker group:
sudo usermod -aG docker $USERThis grants your account the necessary permissions. However, the change won’t take effect until you log out and back in — or reboot the Pi entirely.
Reboot now:
sudo rebootOnce your Pi comes back online, SSH in again or open your terminal.
Testing Docker with the Hello World Container
Now that Docker is installed and your permissions are set, let’s verify everything works correctly.
Run:
docker run hello-worldDocker will:
- Download the “hello-world” image
- Create a container
- Run it
- Print a confirmation message
If you see “Hello from Docker!”, your installation is successful.
Installing Portainer (Your Docker Dashboard)
With Docker running smoothly, it’s time to install Portainer — the web UI that makes managing containers dramatically easier.
Step 1: Create a Portainer Volume
Portainer stores its data in a Docker volume. Create it with:
docker volume create portainer_dataThis ensures your Portainer settings persist even if the container is removed or updated.
Step 2: Deploy the Portainer Container
Now run the Portainer container using this command:
docker run -d \
-p 9443:9443 \
--name=portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest
Here’s what each part does:
-druns it in the background-p 9443:9443exposes Portainer on port 9443--restart=alwaysensures it starts automatically- The volume mounts store your data and allow Portainer to manage Docker
Docker will download the latest Portainer image and start the container.
Accessing Portainer in Your Browser
Once Portainer is running, open your browser and go to:
https://YOUR_PI_IP:9443For example:
https://192.168.1.50:9443The first time you load the page, Portainer will ask you to create an admin username and password. You typically have about 5–10 minutes to complete this setup before the initialization expires.
After creating your account, you’ll land in the Portainer dashboard.
Exploring the Portainer Interface
Inside Portainer, you’ll see your local Docker environment. Click into it, and you’ll find:
- Containers
- Images
- Volumes
- Networks
- Stacks
You’ll also notice two containers already present:
- hello-world (stopped)
- portainer (running)
Portainer is itself a Docker container, which is why it appears in the list.
Before doing anything else, switch to Dark Mode:
- Click your user icon (top right)
- Select My Account
- Choose Dark Theme
Your eyes will thank you.
Your Raspberry Pi Is Now a Real Homelab Server
With Docker and Portainer installed, your Raspberry Pi is officially ready to host applications. You can now deploy:
- Pi-hole
- Home Assistant
- Nginx Proxy Manager
- Cloudflared
- Media servers
- Game servers
- Monitoring tools
- And hundreds of other containers
This setup is the foundation of nearly every modern homelab, and you’ve built it from scratch.
Join the HAVOK Community
If you want to join others building homelabs, deploying containers, and leveling up Raspberry Pi projects, join the HAVOK community on Discord. It’s packed with builders, tinkerers, and self‑hosting enthusiasts just like you.
👉 https://havok.link/discord-wp
*If you buy something through any of the links featured in this article I may get a small share of the sale.

