scripts/config.cloudflare.homelab.md
2025-05-05 13:01:49 -06:00

2.2 KiB

author, date, tags
author date tags
The Bunker Admin 2025 05 02
sript

config.cloudflare.homelab

This config will show you how to set up a single dedicated Cloudflare for your Ubuntu machine.

See scripts/build.homelab for installation instructions See service.cloudflared for starting as system service


Create Tunnel

Create your named tunnel:

Remember to replace tunnel name

cloudflared tunnel create [tunnel-name]

This will output something like the following:

Tunnel credentials written to /home/[insert user]/.cloudflared/[insert tunnel #].json. cloudflared chose this file based on where your origin certificate was found. Keep this file secret. To revoke these credentials, delete the tunnel.

Created tunnel config-bnkhome with id [instert tunnel #]

You want to keep this information and note the id.

Create Config File

nano ~/.cloudflared/config-[tunnel-name].yml

Add Your Config

Remember to replace the two tunnel id numbers with your tunnel id number

tunnel: [insert tunnel id number]
credentials-file: /home/bunker-admin/.cloudflared/[insert tunnel id number].json
ingress:
  - hostname: qbittorrent.bnkhome.org
    service: http://localhost:8082
  - hostname: flaresolverr.bnkhome.org
    service: http://localhost:8191
  - hostname: prowlarr.bnkhome.org
    service: http://localhost:9696
  - hostname: radarr.bnkhome.org
    service: http://localhost:7878
  - hostname: overseerr.bnkhome.org
    service: http://localhost:5055
  - hostname: sonarr.bnkhome.org
    service: http://localhost:8989
  - hostname: homepage.bnkhome.org
    service: http://localhost:3000
  - hostname: tautulli.bnkhome.org
    service: http://localhost:8181
  - hostname: whisparr.bnkhome.org
    service: http://localhost:6969
  - hostname: glances.bnkhome.org
    service: http://localhost:61208
  - hostname: daisy.bnkhome.org
    service: http://localhost:8080
  - hostname: gitea.bnkhome.org
    service: http://localhost:3001
  - hostname: bazarr.bnkhome.org
    service: http://localhost:6767
  - service: http_status:404

Test Tunnel

Remember to update the tunnel-name

cloudflared tunnel --config ~/.cloudflared/confi-[tunnel-name].yml run