Anyone have a traefik config for Netboot? reddit / selfhosted ---------------------------------------------------------------------- SillyLilBear · 2023-11-12 18:50 I'm pretty new to traefik, but I have a basic understanding and got everything setup. Setting up Netbootxyz, is it bit more complicated. It has 3 ports 3000, 69 (UDP), and 80. I added routers rule , entrypoints, and tls.certresolver for both 3000 and 80, and set 80 to be web instead of websecure for entrypoint. I also added services loadblancer for each to so it knows which port since there is more than one. (I usually don't add load balancer as there is only one exposed port). I haven't tested this yet, as I don't know what to do about 69/udp. If I leave it at 69:69/udp, I don't think it will work as it won't resolve the URL and proxy through traefik, but not sure how I should set up Traefik for it. I would like all ports to respond on the FQDN. So far my traefik labels look like this. \`\`\` ports: \- 3000 \- 69:69/udp \- 80 labels: traefik.http.routers.netbootxyz.rule: Host(\`\`) traefik.http.routers.netbootxyz.entrypoints: websecure traefik.http.routers.netbootxyz.tls.certresolver: myresolver traefik.http.services.netbootxyz.loadbalancer.server.port: 3000 traefik.http.routers.netbootxyzassets.rule: Host(\`\`) traefik.http.routers.netbootxyzassets.entrypoints: web traefik.http.routers.netbootxyzassets.tls.certresolver: myresolver traefik.http.services.netbootxyzassets.loadbalancer.server.port: 80 \`\`\` ---------------------------------------------------------------------- speeDDemon_au · 2023-11-12 19:00 here is my docker-compose.yml for netboot_xyz version: '3.9' services: netbootxyz: image: lscr.io/linuxserver/netbootxyz:latest container_name: netbootxyz hostname: netbootxyz restart: always healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000"] interval: 2s timeout: 2s retries: 10 start_period: 3s ports: - "69:69/udp" security_opt: - no-new-privileges:true networks: - proxy - netbootxyz volumes: - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock:ro - ./netboot_xyz/config:/config - ./netboot_xyz/assets:/assets #optional environment: - PUID=1000 - PGID=1000 - TZ=Australia/Adelaide # - MENU_VERSION=1.9.9 #optional, sets menus version, unset uses latest - PORT_RANGE=30000:30010 #optional - SUBFOLDER=/ #optional labels: # web configuration interface - "net.teamcollins.homelab.persistdns=false" - "traefik.enable=true" - "traefik.http.routers.netbootxyz.entrypoints=http" - "traefik.http.routers.netbootxyz.rule=Host(`netbootxyz.example.com`)" - "traefik.http.middlewares.netbootxyz-https- redirect.redirectscheme.scheme=https" - "traefik.http.routers.netbootxyz.middlewares=netbootxyz- https-redirect" - "traefik.http.routers.netbootxyz-secure.entrypoints=https" - "traefik.http.routers.netbootxyz- secure.rule=Host(`netbootxyz.example.com`)" - "traefik.http.routers.netbootxyz-secure.tls=true" - "traefik.http.routers.netbootxyz- secure.service=netbootxyz" - "traefik.http.services.netbootxyz.loadbalancer.server.port=3000" - "traefik.http.services.netbootxyz.loadbalancer.passhostheader=true" - "traefik.docker.network=proxy" # NGINX server for hosting assets - "traefik.http.routers.netboot-assets.entrypoints=http" - "traefik.http.routers.netboot-assets.rule=Host(`netboot- assets.example.com`)" - "traefik.http.middlewares.netboot-assets-https- redirect.redirectscheme.scheme=https" - "traefik.http.routers.netboot-assets.middlewares=netboot- assets-https-redirect" - "traefik.http.routers.netboot-assets- secure.entrypoints=https" - "traefik.http.routers.netboot-assets- secure.rule=Host(`netboot-assets.example.com`)" - "traefik.http.routers.netboot-assets-secure.tls=true" - "traefik.http.routers.netboot-assets- secure.service=netboot-assets" - "traefik.http.services.netboot- assets.loadbalancer.server.port=80" - "traefik.http.services.netboot- assets.loadbalancer.passhostheader=true" networks: proxy: name: proxy external: true netbootxyz: name: netbootxyz ---------------------------------------------------------------------- ElevenNotes · 2023-11-12 19:06 You gotta love copy/paste docker bros. ---------------------------------------------------------------------- SillyLilBear · 2023-11-12 19:07 I usually change ports from - 3000:3000 to - 3000 when using Traefik, I don't even need to list that? Traefik still routes 69 via the URL? I have been setting up a DNS entry on my domain to the Traefik's IP, and it proxies everything. ---------------------------------------------------------------------- SillyLilBear · 2023-11-12 19:10 I generally copy paste the recommended docker compose, thenmodify quite a bit it as needed. I'm no expert, but I am fairly competent at it. Traefik however, I've only been doing straight forward configs. Your smart ass response is really helpful, I'm sure there are tons of things I know that you are an infant with. ---------------------------------------------------------------------- ElevenNotes · 2023-11-12 19:19 Maybe you shouldn't copy paste then you would not have this problem because you would know exactly which labels you need to setup the routing on traefik and you will gain the experience needed for future project, but here you are, on reddit, asking for help. ---------------------------------------------------------------------- 8-16_account · 2023-11-13 11:41 >It’s always nice to see when people talk down to other people on this sub just out of spite. Cheer up a little, life’s wonderful, go outside and live a little.