Docker, Portainer & NPM
Setup Guide
A complete guide to deploying Docker, Portainer Web UI, and Nginx Proxy Manager with automated SSL certificates on Linux.
1. Installing Docker & Docker Compose
Update system packages and install Docker using the official automated script on Debian or Ubuntu:
sudo apt update && sudo apt upgrade -y
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
Verify installation:
docker --version
docker compose version
2. Deploying Portainer Web UI
Create a persistent volume and launch Portainer Server on port 9443 (HTTPS):
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
Access Portainer at
https://<your-server-ip>:9443 in your browser immediately after deployment to initialize your admin credentials.
3. Deploying Nginx Proxy Manager
Create a directory and docker-compose.yml file for Nginx Proxy Manager:
mkdir -p ~/npm && cd ~/npm
nano docker-compose.yml
Paste the stack configuration:
version: '3.8'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
Start Nginx Proxy Manager:
docker compose up -d
Access the NPM admin dashboard at http://<your-server-ip>:81. Default login: admin@example.com / changeme.