Docker runs apps in containers, so you can install databases, panels and bots with one command and remove them cleanly. Run these steps as root (or add sudo).
1. Add Docker’s official repository
apt update
apt install -y ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" > /etc/apt/sources.list.d/docker.list
2. Install Docker
apt update
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Check it works:
docker run hello-world
3. Your first Compose app
Docker Compose describes an app in one file. Create a folder and a compose.yaml:
mkdir -p ~/uptime && cd ~/uptime
nano compose.yaml
services:
uptime-kuma:
image: louislam/uptime-kuma:1
restart: unless-stopped
ports:
- "3001:3001"
volumes:
- ./data:/app/data
Start it:
docker compose up -d
Open http://YOUR_SERVER_IP:3001 to see Uptime Kuma, a monitoring dashboard.
Useful commands
docker ps # running containers
docker compose logs -f # live logs of this app
docker compose pull # download newer images
docker compose up -d # apply updates
docker compose down # stop and remove the app
Docker changes the firewall itself: ports you publish with
ports:are open to the internet even if UFW blocks them. Publish only what you need, or bind to localhost like"127.0.0.1:3001:3001".