Be Your Own Cloud code · PART 2 — FOUNDATION

Chapter 8 Reverse Proxy, HTTPS, and Local DNS — One Setup, Used Everywhere After

3 blocks · pp. 37–38 in the paperback

Going further than the chapter: Reverse Proxy and HTTPS, Set Up Once

Installing Nginx Proxy Manager

# p. 37

File /opt/stacks/npm/docker-compose.yml
services:
  npm:
    image: 'jc21/nginx-proxy-manager:2.16.0'
    container_name: npm
    restart: unless-stopped
    ports:
      - '80:80'
      - '443:443'
      - '81:81'   # admin UI
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
    networks:
      - proxy

networks:
  proxy:
    external: true

# p. 37

Run Terminal, on the server — once
docker network create proxy

Making Subdomains Resolve at Home

# p. 38

Web UI Pi-hole → Settings → Local DNS Records

One record per subdomain, all pointing at the server. Added once Chapter 10's Pi-hole is running.

vault.home.yourdomain.com  ->  192.168.1.50
nextcloud.home.yourdomain.com  ->  192.168.1.50
# Same IP for all of them -- Nginx Proxy Manager on that one machine
# is what routes each subdomain to the right container behind it.

Reproduced exactly from Be Your Own Cloud, Chapter 8. The book explains what each line does and what to do when it doesn't work. About the book

Something here not working as the book describes? Tell the author.