From 6c25a08515980a4aa38fe3b952681c7153177102 Mon Sep 17 00:00:00 2001 From: Christine Elisabeth Koppel Date: Sun, 22 Mar 2026 15:13:43 +0100 Subject: [PATCH] Add game ports for Valheim, OpenRA, OpenTTD, and Xonotic; update Wings configuration to use different ports instead. --- .../songsheet/wavelog/docker-compose.nix | 2 +- .../songsheet/wavelog/docker-compose.yml | 2 +- .../modules/system/compose-songsheet.nix | 20 +++++++ .../modules/system/minecraft.nix | 1 - nix-system-configs/modules/system/traefik.nix | 60 ++++++++++++++++++- 5 files changed, 81 insertions(+), 4 deletions(-) diff --git a/nix-system-configs/modules/songsheet/wavelog/docker-compose.nix b/nix-system-configs/modules/songsheet/wavelog/docker-compose.nix index f5525a5..4ff4be8 100644 --- a/nix-system-configs/modules/songsheet/wavelog/docker-compose.nix +++ b/nix-system-configs/modules/songsheet/wavelog/docker-compose.nix @@ -145,8 +145,8 @@ "/var/log/pelican/:/var/log/pelican:rw" ]; ports = [ + "8080:8080/tcp" "2022:2022/tcp" - "8443:443/tcp" ]; cmd = ["wings" "--ignore-certificate-errors"]; log-driver = "journald"; diff --git a/nix-system-configs/modules/songsheet/wavelog/docker-compose.yml b/nix-system-configs/modules/songsheet/wavelog/docker-compose.yml index 3280203..9425be8 100644 --- a/nix-system-configs/modules/songsheet/wavelog/docker-compose.yml +++ b/nix-system-configs/modules/songsheet/wavelog/docker-compose.yml @@ -115,8 +115,8 @@ services: container_name: pelican_wings restart: unless-stopped ports: + - "8080:8080" - "2022:2022" - - "8443:443" stdin_open: true command: ["wings", "--ignore-certificate-errors"] tty: true diff --git a/nix-system-configs/modules/system/compose-songsheet.nix b/nix-system-configs/modules/system/compose-songsheet.nix index 3e86526..93e53f6 100644 --- a/nix-system-configs/modules/system/compose-songsheet.nix +++ b/nix-system-configs/modules/system/compose-songsheet.nix @@ -59,6 +59,16 @@ in { 8087 # PartDB 8070 # Pelican 8443 # Wings + 8080 # Wings + 2022 # Wings + + # Game stuff + 2456 # Valheim + 2457 # Valheim + 2458 # Valheim + 1234 # OpenRA + 3979 # OpenTTD + 26000 # Xonotic ]; networking.firewall.allowedUDPPorts = [ 80 @@ -67,6 +77,16 @@ in { 8087 # PartDB 8070 # Pelican 8443 # Wings + 8080 # Wings + 2022 # Wings + + # Game stuff + 2456 # Valheim + 2457 # Valheim + 2458 # Valheim + 1234 # OpenRA + 3979 # OpenTTD + 26000 # Xonotic ]; system.stateVersion = "25.11"; diff --git a/nix-system-configs/modules/system/minecraft.nix b/nix-system-configs/modules/system/minecraft.nix index 1747c96..f4eb32d 100644 --- a/nix-system-configs/modules/system/minecraft.nix +++ b/nix-system-configs/modules/system/minecraft.nix @@ -224,7 +224,6 @@ in { url = "https://cdn.modrinth.com/data/xGdtZczs/versions/wugBT1fU/polymer-bundled-0.15.2%2B1.21.11.jar"; sha512 = "9c205ab398c324ee4dc376269d8aa5df64d11766b6418952a64d2df94f096e665f63eae0c4f0c66e22d03c6ff6767550d1777c28485340131e6556091199062a"; }; - } ); }; diff --git a/nix-system-configs/modules/system/traefik.nix b/nix-system-configs/modules/system/traefik.nix index 71ebf99..1388803 100644 --- a/nix-system-configs/modules/system/traefik.nix +++ b/nix-system-configs/modules/system/traefik.nix @@ -305,6 +305,14 @@ in { minecraft-voice = { address = "[::]:24454/udp"; }; + + # Game ports: Valheim (UDP 2456-2458), OpenRA (TCP 1234), OpenTTD (TCP 3979), Xonotic (UDP 26000) + valheim-2456 = {address = "[::]:2456/udp";}; + valheim-2457 = {address = "[::]:2457/udp";}; + valheim-2458 = {address = "[::]:2458/udp";}; + openra = {address = "[::]:1234";}; + openttd = {address = "[::]:3979";}; + xonotic = {address = "[::]:26000/udp";}; }; log = { level = "INFO"; @@ -485,7 +493,7 @@ in { wings-pelican.loadBalancer = { servers = [ - {url = "http://10.1.1.249:8443";} + {url = "http://10.1.1.249:8080";} ]; passHostHeader = true; }; @@ -577,6 +585,17 @@ in { service = "minecraft"; entryPoints = ["minecraft"]; }; + # TCP game routers + openra = { + rule = "HostSNI(`*`)"; # catch-all; replace with stricter rule if desired + service = "openra"; + entryPoints = ["openra"]; + }; + openttd = { + rule = "HostSNI(`*`)"; + service = "openttd"; + entryPoints = ["openttd"]; + }; }; tcp.services = { @@ -618,6 +637,14 @@ in { {address = "10.1.1.244:25565";} ]; }; + + # TCP game services + openra.loadBalancer = { + servers = [{address = "10.1.1.244:1234";}]; + }; + openttd.loadBalancer = { + servers = [{address = "10.1.1.244:3979";}]; + }; }; # UDP routing for TeamSpeak voice @@ -632,6 +659,23 @@ in { entryPoints = ["minecraft-voice"]; service = "minecraft-voice"; }; + # UDP routers for game services + valheim-2456 = { + entryPoints = ["valheim-2456"]; + service = "valheim-2456"; + }; + valheim-2457 = { + entryPoints = ["valheim-2457"]; + service = "valheim-2457"; + }; + valheim-2458 = { + entryPoints = ["valheim-2458"]; + service = "valheim-2458"; + }; + xonotic = { + entryPoints = ["xonotic"]; + service = "xonotic"; + }; }; udp.services = { @@ -646,6 +690,20 @@ in { {address = "10.1.1.244:24454";} ]; }; + + # UDP game services (Valheim and Xonotic) + "valheim-2456".loadBalancer = { + servers = [{address = "10.1.1.244:2456";}]; + }; + "valheim-2457".loadBalancer = { + servers = [{address = "10.1.1.244:2457";}]; + }; + "valheim-2458".loadBalancer = { + servers = [{address = "10.1.1.244:2458";}]; + }; + xonotic.loadBalancer = { + servers = [{address = "10.1.1.244:26000";}]; + }; }; }; };