Themes: Data Ownership, Server
Status: 🌱
Tags: resource
Nginx Proxy Manager (npm)\
This application secures remote connections and provides certifications (https). Without this, the server’s applications would not work on iphone or other devices that require https certificates.
- Create the docker compose file.
cd npm
mkdir data
nano docker-compose.ymlCode Breakdown
cd npmchange directory to npmmkdir datamake a new directory titled datanano docker-compose.ymlcreate a new file titled docker-compose.yml and open it in the editor
- Nano will open an empty file in the main window of VS Code. Paste following the configuration into the this file then save using CTRL or ⌘ + S.
services:
nginx_proxy_manager:
image: "jc21/nginx-proxy-manager:latest"
container_name: nginx_proxy_manager
restart: unless-stopped
network_mode: "host"
ports:
- "80:80" # HTTP
- "443:443" # HTTPS
- "81:81" # Admin Panel
volumes:
- ./data/npm_data:/data
- ./data/npm_letsencrypt:/etc/letsencrypt
- ./data/npm_logs:/var/log/nginx
environment:
DB_SQLITE_FILE: "/data/database.sqlite" # Using SQLite instead of MySQL for simplicity
INITIAL_ADMIN_EMAIL: admin@example.com #Change me
INITIAL_ADMIN_PASSWORD: changeme #Change me- Start the docker container.
sudo docker compose up -d Command Breakdown
sudo docker compose up -dstarts the docker container in the background using the information outlined in the docker-compose.yml
- Verify the container is running. If the application is running, it should appear in the list.
sudo docker psCommand Breakdown
docker psprocess status shows the status of all running docker containers
- Record the port 81 in the Server Administration under NGINX proxy manager.
Back Matter
Next Step: Tailscale Setup
Previous Step: Docker Installation and Folder Structure
Parent Page: Home Server Build Guide