🇬🇧 English | 🇵🇹 Português
Docker setup for Nginx Proxy Manager on Raspberry Pi (3, 4, and 5), using SQLite as the database. This approach is simple, lightweight, and sufficient for most home environments and homelabs, removing the need for an additional MariaDB container.
Before installing Docker, update the operating system:
sudo apt update
sudo apt full-upgrade -y
sudo rebootAfter the reboot:
sudo apt updateInstall the official Docker version:
curl -fsSL https://get.docker.com | shAdd your user to the docker group to run commands without sudo:
sudo usermod -aG docker $USER
newgrp dockerVerify that everything was installed correctly:
docker version
docker compose version
docker run hello-worldCreate a folder to store the Nginx Proxy Manager configuration:
mkdir -p ~/docker/nginx-proxy-manager
cd ~/docker/nginx-proxy-managerCreate the file:
nano compose.ymlCopy the content shown below into the file.
services:
nginx-proxy-manager:
image: jc21/nginx-proxy-manager:2.12.3
container_name: nginx-proxy-manager
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "192.168.1.100:81:81"
environment:
DISABLE_IPV6: 'true'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
healthcheck:
test: ["CMD", "/bin/check-health"]
interval: 10s
timeout: 3sNote: replace
192.168.1.100with your Raspberry Pi's local IP address. This ensures port 81 (the admin interface) is only reachable on the local network, rather than on all interfaces of the machine.
Note: the image version (
2.12.3) is pinned on purpose, instead of usinglatest, to avoid unexpected automatic updates. Check the tags on Docker Hub for the latest version before updating manually.
Save the file (Ctrl + O, Enter) and exit the editor (Ctrl + X).
From the folder where compose.yml was created, run:
docker compose up -dConfirm the container started correctly:
docker psOpen your browser and go to:
http://RASPBERRY_PI_IP:81
Example:
http://192.168.1.100:81
Default credentials:
- Email:
admin@example.com - Password:
changeme
On first login you will be required to change the email and password.
After the first startup, the structure will look like this:
nginx-proxy-manager/
├── compose.yml
├── data/
└── letsencrypt/
The data and letsencrypt folders are created automatically.
datacontains all configuration and the SQLite database.letsencryptcontains the SSL certificates.
Do not delete these folders if you want to keep your configuration.
cd ~/docker/nginx-proxy-manager
docker compose pull
docker compose up -dView logs:
docker compose logs -fRestart:
docker compose restartStop:
docker compose stopStart again:
docker compose startRemove only the containers:
docker compose downCompletely remove the container and all data:
docker compose down -vsudo apt update
sudo apt full-upgrade -y
sudo apt autoremove -y- Compatible with Raspberry Pi 3, 4, and 5.
- Tested on Raspberry Pi OS Bookworm (64-bit).
- Uses SQLite as the database.
- Does not require MariaDB or MySQL.
- Let's Encrypt certificates persist across updates and reboots.
- Only ports 80 and 443 should be exposed to the Internet.
- In this guide's
compose.yml, port 81 is already bound to the Raspberry Pi's local IP address, instead of being reachable on all interfaces. Make sure the IP address matches your machine before starting the container.