On this page
GitHub is full of scripts that promise a one-line UniFi Controller install. One of the most shared is a gist by GitHub user mbc3k titled "Unifi Controller install, Ubuntu 24.04 LTS". Searches for a UniFi Controller GitHub download very often lead there.
This guide explains what that script does, what it does not do, and how to decide whether to use it. We link to the gist and its ZIP archive, but we did not write it and Ubiquiti did not publish it. Treat any community script as code you are responsible for.
What the GitHub gist contains
The gist holds one file, unifi.sh. Its author describes it as adapted from Ubiquiti's instructions and modernised to work with Ubuntu Noble (24.04). A header comment notes that it works on SmartOS LX instances and possibly elsewhere. It does not pin a particular UniFi version, so it installs whatever the stable channel of Ubiquiti's apt repository offers.
You can view it on GitHub or download the ZIP archive of the revision this site links to.
What the script does, step by step
- Adds the UniFi apt repository at
https://www.ui.com/downloads/unifi/debian, suitestable, componentubiquiti. - Adds a MongoDB 3.6 repository using the Ubuntu
bionicpath, with the[trusted=yes]option. - Adds the Ubuntu
focal-securityrepository so the olderlibssl1library that MongoDB 3.6 needs can be installed. - Downloads the UniFi and MongoDB signing keys into
/etc/apt/trusted.gpg.d/. - Runs
apt updateandapt install -y unifi.
The result is the legacy UniFi Network Server running as a system service, reached in a browser on port 8443.
Risks to understand before you run it
- Signature checks are skipped for MongoDB. The
[trusted=yes]option tells apt to accept packages from that repository even if signatures do not verify. - Old dependencies. MongoDB 3.6 and the bionic and focal repositories are long past their prime. Mixing repositories from several Ubuntu releases can make later upgrades messy.
- Apt format changes. A commenter on the gist reported in January 2026 that after upgrading from Ubuntu 22.04 to 24.04, apt's sources format changed, and shared a replacement deb822
.sourcesfile. The author replied in June 2026 that they had not needed to redo the setup in some time. - Legacy target. The package it installs is the standalone Network Server. Ubiquiti has said Network 10.6 is the final release line for that server, and Network 11 requires UniFi OS Server.
The official alternative on Linux
For a new Linux install, Ubiquiti's own path is shorter. Install Podman and slirp4netns, download the UniFi OS Server installer from ui.com, make it executable and run it with sudo. Ubiquiti lists Ubuntu 24.04 or later and Debian 13 or later as supported. In outline, Ubiquiti's steps on Debian and Ubuntu look like this:
sudo apt-get update && sudo apt-get install podman slirp4netns
curl -O <installer-link-from-ui.com>
chmod +x <installer-file>
sudo ./<installer-file>Copy the installer link for your architecture, x64 or ARM64, from the UniFi OS Server releases page. Once installed, the service is called uosserver and is managed with systemctl, for example sudo systemctl enable uosserver to start it at boot. The full commands are in our Ubuntu and Debian guide, and the broader picture is in UniFi OS Server vs Network Server.
If you still want to use the script
- Download it, then read every line. Never pipe a remote script straight into a shell.
- Run it first on a disposable VM or a snapshot so you can roll back.
- Back up any existing controller before installing over it.
- Plan your move to UniFi OS Server, since the legacy line will not receive Network 11 and later.
Script vs official installer compared
The table puts the gist and Ubiquiti's current installer side by side, using what each one documents.
| Aspect | mbc3k GitHub gist | UniFi OS Server installer |
|---|---|---|
| Publisher | Community (GitHub user mbc3k) | Ubiquiti |
| What it installs | Legacy UniFi Network Server | UniFi OS Server with the Network application |
| Database | MongoDB 3.6 from an old Ubuntu repository | Handled by the installer |
| Signature checks | Skipped for the MongoDB repository | Download from ui.com |
| Web interface | Port 8443 | Port 11443, per community documentation |
| Service name | The unifi package's service | uosserver |
| Future Network versions | Ends with the 10.6 line | Receives Network 11 and later |
For a lab you plan to throw away, either works. For a controller you will depend on, the official installer is the safer choice.
How to review any community install script
The mbc3k gist is only one of many UniFi Controller scripts on GitHub. Whichever one you find, the same review applies before it touches a server you care about:
- Who wrote it and when. Check the author's profile, the creation date and the last revision. Scripts that have not been touched in years may target packages that have since changed.
- Which repositories it adds. Every line that writes to
/etc/apt/sources.list.d/adds software you will trust from then on. Look for repositories from older releases mixed with your current one. - Whether it disables verification. Options such as
[trusted=yes]or flags that skip key checks deserve a hard look. - Which keys it installs. Confirm that signing keys come from the vendor's own domain.
- What it downloads at run time. A script that fetches and runs a second script hides what actually happens. Read that one too.
- What the comments say. Gist and repository comments often reveal breakage after operating system upgrades, as the January 2026 comment on this gist did.
Our security guide covers the wider habits that keep a self-hosted controller safe.
Testing the script safely
If you decide to try the gist, give yourself an easy way back:
- Create a fresh Ubuntu 24.04 virtual machine, or take a snapshot of an existing one.
- Download
unifi.shto the machine and open it in a text editor. Compare it with the revision linked from this guide. - Run it with
sudo sh unifi.shand watch the output for repository or key errors. - Check the service with
systemctl status unifi. - Browse to
https://<server-ip>:8443and accept the self-signed certificate warning. - If you use
ufw, allow the ports the legacy server needs from your own network: TCP 8080, TCP 8843, UDP 10001 and UDP 3478, plus TCP 8443 for the web interface.
If anything fails, roll back to the snapshot rather than trying to untangle mixed repositories by hand.
Moving from a script install to UniFi OS Server
Because the script installs the legacy Network Server, anyone who used it will eventually need to move. The process follows Ubiquiti's documented migration path:
- Take a backup from the existing UniFi Controller and copy it off the server.
- Stop the legacy service so it no longer answers on the inform port.
- Install UniFi OS Server, on the same host or a new one.
- Use the Site Export tool from Ubiquiti's backups and migration guide to move your sites. Recent UniFi OS Server releases added automatic migration on Linux, so check the current release notes on ui.com first.
- Keep the same IP address, or point devices at the new inform address, and confirm they reconnect.
Remember to update bookmarks, since the web interface moves away from port 8443. Our backup and restore guide covers each step in more detail.
Other GitHub results you will find
A search for a UniFi Controller GitHub download also turns up community Docker images, Ansible roles and other install scripts. Ubiquiti says there is no official standalone Docker or Podman container for UniFi OS Server, because the installer needs host services for discovery, adoption and updates. Community images may work, but they are maintained by their authors, not by Ubiquiti, and the same review steps apply. For an overview of every official source, see our UniFi Controller download guide.
Which route fits your situation?
- New home or office network on Linux: use the UniFi OS Server installer from ui.com. It is supported, receives Network 11 and later, and avoids MongoDB repository workarounds.
- Existing script install that works today: keep it patched, take regular backups copied off the server, and schedule a migration to UniFi OS Server rather than waiting for something to break.
- Lab or learning environment: the gist is a useful way to see how the legacy apt install fits together. Run it in a disposable VM and treat the result as temporary.
- Production network or client sites: stay with Ubiquiti's installer, a UniFi console or Official UniFi Hosting. A controller that manages other people's networks should not depend on a repository with signature checks turned off.
- Not sure your hardware is suitable: check the minimums first. UniFi OS Server needs at least 2 GB of RAM, 10 GB of free storage and a wired connection, with an SSD recommended.
Whichever route you take, give the server a fixed IP address before adopting devices and follow the first setup checklist once the web interface loads.
Frequently asked questions
Is the UniFi Controller GitHub script official?
No. It is a public gist by GitHub user mbc3k. Ubiquiti publishes its installers on ui.com.
Which UniFi version does the gist install?
It does not pin a version. It installs the current unifi package from the stable channel of Ubiquiti's apt repository, which is the legacy Network Server.
Does the script work on Ubuntu 24.04?
That is its stated goal, but it relies on MongoDB 3.6 from older Ubuntu repositories. One commenter shared an updated apt sources file after upgrading to 24.04.
Is it safe to run?
It skips signature verification for the MongoDB repository. Review it, test on a disposable system and prefer the official UniFi OS Server installer for production.
Sources
Facts in this guide were checked against these sources on November 16, 2026. Ubiquiti updates its software and documentation often.



