{ "module": "unifi", "version": "1", "capabilities": [ "container-runtime" ], "listens": [ { "name": "web", "port": 8443, "protocol": "tcp", "from": "mesh", "why": "the controller web UI and API, over its own self-signed tls; named through the proxy as an https route" }, { "name": "inform", "port": 8080, "protocol": "tcp", "from": "mesh", "why": "device inform, how APs and switches check in and are adopted; the controller tells devices this number, so the machine must publish it on the same one" }, { "name": "stun", "port": 3478, "protocol": "udp", "from": "mesh", "why": "STUN for managed devices; the controller tells devices this number, so the machine must publish it on the same one" }, { "name": "discovery", "port": 10001, "protocol": "udp", "from": "mesh", "why": "device discovery broadcasts from unadopted devices and the UniFi apps" }, { "name": "discovery-l2", "port": 1900, "protocol": "udp", "from": "mesh", "why": "make-controller-discoverable-on-L2 (SSDP); the software listens on 1900, which machines commonly have taken by another SSDP speaker" }, { "name": "portal-tls", "port": 8843, "protocol": "tcp", "from": "mesh", "why": "the guest captive portal over https" }, { "name": "portal", "port": 8880, "protocol": "tcp", "from": "mesh", "why": "the guest captive portal over http" }, { "name": "speedtest", "port": 6789, "protocol": "tcp", "from": "mesh", "why": "mobile-app speed-test throughput measurement" }, { "name": "syslog", "port": 5514, "protocol": "udp", "from": "mesh", "why": "remote syslog from managed devices" } ], "resources": [ { "id": "mesh-state", "type": "directory", "path": "/var/lib/mesh/unifi", "mode": "0700" }, { "id": "state", "type": "directory", "mode": "0700", "place": "." }, { "id": "data", "type": "directory", "mode": "0700", "owner": "1000:1000" }, { "id": "server", "type": "container", "name": "unifi-controller", "image": "lscr.io/linuxserver/unifi-controller@sha256:0ae315a3a45635e443899e30e86bd507c2c48922cb27f4bc7241777885f4650e", "ports": [ "8443", "8080", "3478/udp", "10001/udp", "1900/udp", "8843", "8880", "6789", "5514/udp" ], "env": { "PUID": "1000", "PGID": "1000", "TZ": "Etc/UTC", "MEM_LIMIT": "1024", "MEM_STARTUP": "1024" }, "volumes": [ "${dir:data}:/config" ] }, { "id": "runtime-config", "type": "file", "path": "/var/lib/mesh/unifi/config.json", "mode": "0600", "content": "{\n \"site\": \"default\",\n \"password\": \"${secret:controller}\"\n}\n", "merge": "json" }, { "id": "runtime", "type": "container", "name": "mesh-unifi", "network": "host", "volumes": [ "/var/lib/mesh/unifi/broker:/run/secrets/broker:ro", "/var/lib/mesh/unifi/config.json:/run/config/config.json:ro" ], "env": { "MESH_BROKER_FILE": "/run/secrets/broker", "MESH_UNIFI_URL": "https://127.0.0.1:${port:8443}", "MESH_UNIFI_CONFIG_FILE": "/run/config/config.json" }, "restart-on": [ "runtime-config" ], "artifact": "runtime" } ], "requires": [ "route" ], "contributes": { "route": { "label": "unifi", "endpoint": "web", "scheme": "https", "insecure": true } }, "binds": { "route": "${dir:state}/route.json" }, "own-secrets": { "broker": "/var/lib/mesh/unifi/broker", "controller": "/var/lib/mesh/unifi/controller" }, "build": { "on": [ { "arg": "BUILD_BASE", "module": "mesh-tools", "artifact": "build" }, { "arg": "RUNTIME_BASE", "module": "mesh-tools", "artifact": "runtime" } ], "artifacts": [ { "name": "runtime", "kind": "image", "from": "Dockerfile" } ] } }