Table of contents
Docker Setup
Install Docker and Docker Compose on Debian/Ubuntu systems. Foundation for modern self-hosting and containerized applications.
Prerequisites
- Fresh Debian/Ubuntu system
- Sudo access
- Basic terminal knowledge
- Internet connection
Installing Docker
Install dependencies:
sudo apt -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common
Add the Docker repository key (modern keyring path — apt-key is deprecated):
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Add the Docker APT repository. Replace amd64 with arm64 if you're on an ARM CPU:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
Install Docker Engine and the modern Compose plugin:
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Note: The legacy
docker-compose(v1, Python) package is end-of-life. Use thedocker composeplugin (docker-compose-plugin) — invoke asdocker compose up, notdocker-compose up.
If you're running as a non-root user, add your user to the docker group:
sudo usermod -aG docker username
Log out and back in for the change to take effect.
Portainer
docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
localhost:9443
Related
- Docker Nextcloud - Self-hosted cloud storage in a container
- Migrate to Codeberg - Move your repos off GitHub
- Common Issues - Docker troubleshooting
Navigation
Quick Links
Projects
Server (discourse)
- Host
- Cloudflare Tunnel
- Tailscale
- SFTP
- Discourse
- Forgejo
- Filedrop
- Filebrowser
- Landing Sites
- Onboarding
- Backups
- Recovery
Window Managers
Homelab
Docker
Software
Thoughts
Archived
Connect
Butterbian — my Debian 13 distro · butterrepo — community APT repo · butterknife — TUI installer
justaguylinux.com · Butterforge · Butter Lab · The Churn · YouTube · Mastodon · Links · Contact · Support on Buy Me a Coffee
"Not an expert. Just A Guy." — Licensed CC BY-SA 4.0 · © 2026 JustAGuy Linux