Setup a reverse proxy

Description

In this guide, you will learn how to install and configure Nginx Proxy Manager using Docker.

Nginx Proxy Manager provides a web-based interface for managing reverse proxies and SSL certificates. The installation uses a dedicated Docker network so that other applications can communicate with the reverse proxy.

You can create subdomains like „palworld.yourdomain.com“, which redirects directly to your Palworld server.

We are using the Linux operating system Ubuntu 24.04.

What you’ll learn
  • Configure the UFW for allowing NPM.
  • Create a dedicated Docker network for the reverse proxy.
  • Create the Nginx Proxy Manager application directory.
  • Create a Docker Compose configuration.
  • Persist Nginx Proxy Manager data and Let’s Encrypt certificates
Step by step guide
1# Step 1: Configure the UFW
2ufw allow 443 comment 'HTTPS'
3ufw allow 81 comment 'NGINX-Admin-UI'
4ufw reload
5 
6# Step 2: Create a docker network called "reverse-proxy-network" for all of your future applications
7docker network create reverse-proxy-network
8 
9# Step 3: Create the folder for storing the applications config and data
10mkdir /srv/apps/nginx-proxy-manager -p
11 
12# Step 4: Create the complete setup for the application
13cd /srv/apps/nginx-proxy-manager
14 
15cat << 'EOF' > docker-compose.yml
16networks:
17 reverse-proxy-network:
18 external: true # network already exists
19 
20services:
21 app:
22 image: 'jc21/nginx-proxy-manager:2.14.0'
23 container_name: nginx-proxy-manager
24 restart: unless-stopped
25 networks:
26 - reverse-proxy-network
27 ports:
28 - '80:80'
29 - '81:81'
30 - '443:443'
31 volumes:
32 - ./data:/data
33 - ./letsencrypt:/etc/letsencrypt
34EOF
35 
36# Step 5: Start the application
37cd /srv/apps/nginx-proxy-manager
38docker compose up -d
39 
40# Step 6: Check if the application is running
41docker ps
42# And manually visiting "your.domain.com" / "your.domain.com:81" in your browser.
Next steps