Reduce direct exposure of administrative services #38

Closed
opened 2026-07-01 19:36:48 +01:00 by nimmo · 2 comments
Owner

Context

The lyra and planned nova configurations expose several administrative or browser-facing services directly through host firewalls. Exposure should be intentional and constrained to the required trust boundary.

Relevant files:

  • hosts/lyra/default.nix
  • potential/nova/default.nix
  • modules/profiles/ollama.nix

Scope

  • Bind admin applications and databases to loopback where practical.
  • Put browser-facing services behind an authenticated reverse proxy or restrict them to VPN/mesh access.
  • Review Dockge, Adminer, PostgreSQL, media-management tools, Ollama, and Open WebUI.
  • Explicitly document any accepted LAN-wide exposure, including nova's intended Ollama/Open WebUI access.

Completion criteria

  • Every directly exposed administrative service has a documented reason and trust boundary.
  • Unnecessary firewall openings are removed.
  • Intended access paths are tested after deployment.
## Context The lyra and planned nova configurations expose several administrative or browser-facing services directly through host firewalls. Exposure should be intentional and constrained to the required trust boundary. Relevant files: - `hosts/lyra/default.nix` - `potential/nova/default.nix` - `modules/profiles/ollama.nix` ## Scope - Bind admin applications and databases to loopback where practical. - Put browser-facing services behind an authenticated reverse proxy or restrict them to VPN/mesh access. - Review Dockge, Adminer, PostgreSQL, media-management tools, Ollama, and Open WebUI. - Explicitly document any accepted LAN-wide exposure, including nova's intended Ollama/Open WebUI access. ## Completion criteria - Every directly exposed administrative service has a documented reason and trust boundary. - Unnecessary firewall openings are removed. - Intended access paths are tested after deployment.
Author
Owner

Implementation and live Docker acceptance in progress (2026-10-12).

User chose Pangolin/Nebula for administrative access and excluded Nova's old PostgreSQL/Adminer deployment because those services have migrated to Vega. Dockge is absent from the inspected Lyra/Nova runtime. Nova is Fedora; potential/nova is only a NixOS draft.

Live Compose changes completed without image updates: Nova Open WebUI/Ollama, Sonarr, Radarr, Bazarr, Sortarr, Spottarr, Audiobookshelf, Prowlarr and ComfyUI now publish only on the host's Nebula address. Lyra Stash publishes only on Nebula; Signal API publishes only on loopback, retaining the voice pipeline's private-network connection. Existing unrelated checkout edits were preserved. Before each recreation, Compose configuration hashes matched the running containers; candidate comparison verified only port settings changed. Protected pre-change files are retained on each host under /tmp/issue-38-candidates for rollback; no secret values were copied into this issue or repository.

Validation: all ten changed Nova host ports accept mesh connections and reject direct LAN connections; Ollama API, WebUI health and ComfyUI system_stats return 200. Existing Pangolin WebUI/Audiobookshelf routes return 200; Sonarr/Radarr/Prowlarr retain authenticated 401 responses. Stash accepts mesh connections and rejects LAN; Signal rejects remote connections while voice-pipeline -> signal-api returns 200. A second Compose up is a no-op for each changed stack. Containers remain running; configured health checks are healthy.

NixOS changes are committed locally as e85582f on fix/issue-38-service-exposure, not published: Lyra Tdarr/Ollama ports move to nebula.mesh firewall rules; Immich binds loopback; Jellyfin and obsolete SWAG/wishlist/Beszel general openings are removed. Wyoming direct speech access is preserved as an existing non-administrative client path. Nova's draft drops historical administrative openings and defaults Ollama to loopback. An evaluated-host regression check prevents global ports/ranges from reopening the restricted native services.

nix flake check passes, including the new check; existing upstream stdenv deprecation warnings remain unrelated. The full Lyra build also passes for exact clean commit e85582f275; result: /nix/store/wjka9b3gwaqznd5h0zc2pfs81prpb09z-nixos-system-lyra-26.11.20261008.8edc0c7. The slow Attic package fetch was replaced with a direct copy of the identical, already-installed Lyra dependency before completing the build.

Remaining acceptance: publish/review the NixOS branch after user authorization; genuine Lyra native-service deployment and no-op follow-up; verify mesh Tdarr/Ollama, local and Pangolin Jellyfin/Immich, and direct LAN rejection; reconcile owning wiki pages after the source is accepted. Do not close this issue based on the Docker rollout or source validation alone.

Implementation and live Docker acceptance in progress (2026-10-12). User chose Pangolin/Nebula for administrative access and excluded Nova's old PostgreSQL/Adminer deployment because those services have migrated to Vega. Dockge is absent from the inspected Lyra/Nova runtime. Nova is Fedora; potential/nova is only a NixOS draft. Live Compose changes completed without image updates: Nova Open WebUI/Ollama, Sonarr, Radarr, Bazarr, Sortarr, Spottarr, Audiobookshelf, Prowlarr and ComfyUI now publish only on the host's Nebula address. Lyra Stash publishes only on Nebula; Signal API publishes only on loopback, retaining the voice pipeline's private-network connection. Existing unrelated checkout edits were preserved. Before each recreation, Compose configuration hashes matched the running containers; candidate comparison verified only port settings changed. Protected pre-change files are retained on each host under /tmp/issue-38-candidates for rollback; no secret values were copied into this issue or repository. Validation: all ten changed Nova host ports accept mesh connections and reject direct LAN connections; Ollama API, WebUI health and ComfyUI system_stats return 200. Existing Pangolin WebUI/Audiobookshelf routes return 200; Sonarr/Radarr/Prowlarr retain authenticated 401 responses. Stash accepts mesh connections and rejects LAN; Signal rejects remote connections while voice-pipeline -> signal-api returns 200. A second Compose up is a no-op for each changed stack. Containers remain running; configured health checks are healthy. NixOS changes are committed locally as e85582f on fix/issue-38-service-exposure, not published: Lyra Tdarr/Ollama ports move to nebula.mesh firewall rules; Immich binds loopback; Jellyfin and obsolete SWAG/wishlist/Beszel general openings are removed. Wyoming direct speech access is preserved as an existing non-administrative client path. Nova's draft drops historical administrative openings and defaults Ollama to loopback. An evaluated-host regression check prevents global ports/ranges from reopening the restricted native services. nix flake check passes, including the new check; existing upstream stdenv deprecation warnings remain unrelated. The full Lyra build also passes for exact clean commit e85582f2751d487774b7257a09746ab9babbc339; result: /nix/store/wjka9b3gwaqznd5h0zc2pfs81prpb09z-nixos-system-lyra-26.11.20261008.8edc0c7. The slow Attic package fetch was replaced with a direct copy of the identical, already-installed Lyra dependency before completing the build. Remaining acceptance: publish/review the NixOS branch after user authorization; genuine Lyra native-service deployment and no-op follow-up; verify mesh Tdarr/Ollama, local and Pangolin Jellyfin/Immich, and direct LAN rejection; reconcile owning wiki pages after the source is accepted. Do not close this issue based on the Docker rollout or source validation alone.
nimmo closed this issue 2026-10-12 14:57:29 +01:00
Author
Owner

MR #317 has been merged into main with a fast-forward to 1bcc2d7aa2 after rebasing onto MR #318. Combined flake validation, full Lyra build, exposure regression checks and required MR CI passed. Automated review feedback was assessed and all meaningful code findings addressed; latest assessment and live evidence are in MR comments 3293/3294.

The operator completed two identical just test-remote lyra passes. Native services are active, mesh Tdarr/Ollama access and local/Vega consumers work, direct administrative LAN access is rejected, and Immich/Jellyfin Pangolin routes return HTTP 200. Beszel continues reporting fresh metrics via outbound transport. Previously deployed Docker binding changes and their no-op verification remain intact.

Leaving this issue open for persistent activation and its follow-up acceptance: nixos-rebuild test activation reverts on reboot. The implementation is merged and currently active as a tested canary; persistent rollout must still be recorded before closure.

MR #317 has been merged into main with a fast-forward to 1bcc2d7aa26f82c6d8abe68e9e83f849650fe623 after rebasing onto MR #318. Combined flake validation, full Lyra build, exposure regression checks and required MR CI passed. Automated review feedback was assessed and all meaningful code findings addressed; latest assessment and live evidence are in MR comments 3293/3294. The operator completed two identical just test-remote lyra passes. Native services are active, mesh Tdarr/Ollama access and local/Vega consumers work, direct administrative LAN access is rejected, and Immich/Jellyfin Pangolin routes return HTTP 200. Beszel continues reporting fresh metrics via outbound transport. Previously deployed Docker binding changes and their no-op verification remain intact. Leaving this issue open for persistent activation and its follow-up acceptance: nixos-rebuild test activation reverts on reboot. The implementation is merged and currently active as a tested canary; persistent rollout must still be recorded before closure.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#38
No description provided.