# oonfeeWRT controller — self-hosted network management. # # OONFEE_VERSION=vX.Y.Z docker compose up -d # open http://127.0.0.1:8080 on the controller host # # To publish on one trusted management-LAN address instead: # # OONFEE_HTTP_BIND=192.168.1.20 OONFEE_VERSION=vX.Y.Z docker compose up -d # # Repeat OONFEE_HTTP_BIND on every Compose command or store it in the `.env` # file beside this file so a later recreate cannot silently return to loopback. # # OONFEE_HTTP_BIND=0.0.0.0 publishes on every host IPv4 interface. Use that # only with a host/network firewall on a trusted LAN; this listener has no TLS. # # NETWORKING — the safe, portable bridge mode is the default: # # Bridge mode works everywhere, including Docker Desktop. HTTP is exposed on # host loopback by default, or on the explicit OONFEE_HTTP_BIND address. # Subnet TCP probing still works; ARP/mDNS discovery does not cross the # bridge, so adopt devices by IP. # # Linux-only host networking is an explicit discovery opt-in. Remove `ports:`, # add `network_mode: host`, and put TLS/firewall policy in front of port 8080. # OONFEE_HTTP_BIND applies only to `ports:` and does nothing in host mode. Set # OONFEE_LISTEN to loopback or one exact trusted host IP before using host mode; # its default `:8080` exposes the daemon on every host interface. services: oonfeewrt: image: "ghcr.io/aiden0rchad/oonfeewrt:${OONFEE_VERSION:?set OONFEE_VERSION to a release tag}" container_name: oonfeewrt restart: unless-stopped ports: - target: 8080 published: "8080" host_ip: "${OONFEE_HTTP_BIND:-127.0.0.1}" protocol: tcp volumes: - oonfee-data:/data # SQLite DB, keyring and backups # Bind mounts keep the host's uid/gid, so a correctly-secured 0600 secret # owned by your account is unreadable by the container's uid 65532 and # argon2id key derivation fails at startup. Before first run: # sudo chown 65532:65532 passphrase && sudo chmod 600 passphrase - type: bind source: ./passphrase target: /run/secrets/oonfee-passphrase read_only: true bind: create_host_path: false # missing secret is an error, not a new directory environment: OONFEE_DATA_DIR: /data OONFEE_LISTEN: ":8080" # Secrets come from files, never env values (IMPLEMENTATION §11): OONFEE_PASSPHRASE_FILE: /run/secrets/oonfee-passphrase # Matches the image's non-root user. Note this only sets the process uid — # it does not chown anything; the image ships /data already owned by 65532. user: "65532:65532" # The only writable paths are the controller volume and SQLite's temporary # directory. The process needs no Linux capabilities or privilege gain. read_only: true tmpfs: - /tmp:rw,noexec,nosuid,nodev,uid=65532,gid=65532,mode=0700 cap_drop: - ALL security_opt: - no-new-privileges:true healthcheck: test: ["CMD", "/oonfeewrtd", "-healthcheck"] # hits /healthz internally interval: 30s timeout: 5s retries: 3 # Give SIGTERM room to finish an in-flight apply/confirm cycle before the # container is killed — never orphan a device with a rollback timer running # (IMPLEMENTATION §11, graceful shutdown). stop_grace_period: 150s volumes: oonfee-data: