GitHub - unihosted/unifi-os-server-docker · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading. Please reload this page.
unihosted
unifi-os-server-docker
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>1 Commit<br>1 Commit
.github/workflows
.github/workflows
.gitignore
.gitignore
Dockerfile
Dockerfile
README.md
README.md
docker-compose.yaml
docker-compose.yaml
site-localhost-bypass.conf
site-localhost-bypass.conf
uos-entrypoint.sh
uos-entrypoint.sh
View all files
Repository files navigation
UniFi OS Server in Docker
This repository provides a solution for running UniFi OS Server (UOS) in Docker, addressing the challenge of using Docker instead of the Podman-based containerization that is shipped by Ubiquiti. This allows users to deploy UOS on platforms with standard Docker tooling, bypassing the limitations of the official Podman setup.
Quick Start
Save the compose below as docker-compose.yaml, set UOS_SYSTEM_IP to your public IP, and run docker compose up -d. The Web UI will be at https://localhost:443 once the container is ready. Every port and environment variable is documented inline: the compose is the reference.
services:<br>unifi-os-server:<br>container_name: unifi-os-server<br>image: whaamed/unifi-os-server<br>privileged: true<br>cgroup: host<br>cap_add:<br>- NET_RAW<br>- NET_ADMIN<br>ports:<br>- "443:443" # UniFi Web UI (HTTPS)<br>- "8443:8443" # UniFi Controller API<br>- "8444:8444" # UniFi Controller (alternate)<br>- "8080:8080" # HTTP inform / redirect<br>- "8880:8880" # Guest portal (HTTP)<br>- "8881:8881" # Guest portal (HTTPS)<br>- "8882:8882" # Guest portal (alternate)<br>- "6789:6789" # Speed test<br>- "11084:11084" # Remote adoption<br>- "5671:5671" # AMQP (RabbitMQ)<br>- "9543:9543" # Internal service<br>- "3478:3478/udp" # STUN<br>- "5514:5514/udp" # Syslog<br>- "10003:10003/udp" # UniFi discovery (local network only)
# Network App bypass: skips UOS SSO for direct controller API access.<br># Bind to localhost ONLY; never expose publicly.<br>- "127.0.0.1:7443:7443" # requires EXPOSE_NETWORK_APP=true<br>- "127.0.0.1:5432:5432" # PostgreSQL (localhost only)
volumes:<br>- ./docker/uos:/var/lib/uosserver<br>- ./docker/uos:/var/lib/unifi<br>- ./docker/data/:/data<br>tmpfs:<br>- /run:exec<br>- /run/lock<br>- /tmp:exec<br>- /var/lib/journal<br>- /var/opt/unifi/tmp:size=64m<br>- /data/unifi-core/config/http<br>networks:<br>- unifi-os<br>depends_on:<br>- unifi-network-mongodb<br>environment:<br>TZ: Europe/Amsterdam # Container timezone<br>UOS_SYSTEM_IP: "203.0.113.10" # REQUIRED: your public IP, written to system.properties<br>UOS_UUID: "" # Auto-generated if left blank; persistent across restarts<br>UOS_SERVER_VERSION: "5.0.6" # UOS version string (set at build time)<br>FIRMWARE_PLATFORM: "linux-custom" # Platform identifier (set at build time)
EXPOSE_NETWORK_APP: "false" # true → nginx bypass on port 7443, skips UOS SSO
# --- External MongoDB ---<br># MONGO_INTERNAL=false uses the MongoDB service below.<br># Set MONGO_INTERNAL=true to let the Network App run its own mongod<br># (port 27117) and remove the unifi-network-mongodb service + depends_on.<br>MONGO_INTERNAL: "false"<br>MONGO_HOST: "unifi-network-mongodb" # External MongoDB hostname<br>MONGO_PORT: "27017" # External MongoDB port<br>MONGO_USER: "" # MongoDB username<br>MONGO_PASS: "" # MongoDB password<br>MONGO_TLS: "false" # Enable TLS for the MongoDB connection<br>MONGO_AUTH_SOURCE: "admin" # MongoDB authentication database
unifi-network-mongodb:<br>container_name: unifi-os-server-mongodb<br>image: mongo:4.4<br>networks:<br>- unifi-os<br>volumes:<br>- ./docker/mongodb:/data/db
networks:<br>unifi-os:
Why This Exists
Ubiquiti ships UOS as a Podman image because Podman is the container platform they happen to use. At UniHosted we were already running everything else in Docker, so rather than maintain a parallel Podman setup just for one application, we figured out how to convert that Podman image into a Docker image. Once the pipeline worked, it seemed silly not to share it. If you're in the same boat, here it is.
By default the internal mongod is...