{"id":296,"date":"2025-06-16T11:59:01","date_gmt":"2025-06-16T18:59:01","guid":{"rendered":"https:\/\/www.cmsws.com\/blog\/?p=296"},"modified":"2025-06-16T12:06:51","modified_gmt":"2025-06-16T19:06:51","slug":"updating-and-installing-self-hosted-unifi-network-servers-linux","status":"publish","type":"post","link":"https:\/\/www.cmsws.com\/blog\/updating-and-installing-self-hosted-unifi-network-servers-linux\/","title":{"rendered":"Updating and Installing Self-Hosted UniFi Network Servers (Linux)"},"content":{"rendered":"\n<p><em>This article was originally published on <a href=\"https:\/\/help.ui.com\/hc\/en-us\/articles\/220066768-Updating-and-Installing-Self-Hosted-UniFi-Network-Servers-Linux\" target=\"_blank\" rel=\"noopener\" title=\"\">Ubiquiti Help Center<\/a> and is reposted for archival purposes.<\/em><\/p>\n\n\n\n<p>This article provides the steps to install and update the self-hosted UniFi Network Server to the current stable release on a Debian or Ubuntu system via APT (Advanced Package Tool). If you run into issues following the process described in this article, please take a look at the scripts provided here to install and update the UniFi Network Application.<br>Requirements<\/p>\n\n\n\n<p>In order to update the UniFi Network Server via APT, it is necessary to create source files or edit lines in an existing sources.list file with Linux text editors: vi or nano. The repo structure should be permanent, but if there are any changes, they will be pointed out in the UniFi Network software version release posts, found in the Release section of the Community.<\/p>\n\n\n\n<p>Before upgrading the UniFi Network Server, make sure that you have backed up the UniFi Network Database. You will need to make sure that the user has sudo permissions. For more information about adding a user to sudo list, see this Debian article.<br>Ubuntu or Debian-Based Scripts<\/p>\n\n\n\n<p>Refer to this Community post.<br>UniFi Network APT Steps<\/p>\n\n\n\n<p>Install required packages before you begin with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update &amp;&amp; sudo apt-get install ca-certificates apt-transport-https<\/code><\/pre>\n\n\n\n<p>Use the following command to add a new source list:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 'deb &#91; arch=amd64,arm64 ] https:\/\/www.ui.com\/downloads\/unifi\/debian stable ubiquiti' | sudo tee \/etc\/apt\/sources.list.d\/100-ubnt-unifi.list<\/code><\/pre>\n\n\n\n<p>Add the GPG Keys.<br>Method A (Recommended): Install the following trusted key into \/etc\/apt\/trusted.gpg.d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo wget -O \/etc\/apt\/trusted.gpg.d\/unifi-repo.gpg https:\/\/dl.ui.com\/unifi\/unifi-repo.gpg<\/code><\/pre>\n\n\n\n<p>Method B: Using apt-key:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50<\/code><\/pre>\n\n\n\n<p>Install the correct version of MongoDB.<br>New UniFi Install: Run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"deb &#91;trusted=yes] https:\/\/repo.mongodb.org\/apt\/ubuntu bionic\/mongodb-org\/3.6 multiverse\" | sudo tee \/etc\/apt\/sources.list.d\/mongodb-org-3.6.list<br>sudo apt-get update<\/code><\/pre>\n\n\n\n<p>Note: Depending on your Linux distribution, this step may not be necessary. If MongoDB is not included with your distro and isn&#8217;t available in its repository, refer to the MongoDB installation guide (Ubuntu | Debian). <br>Existing Install (UniFi Network v7.5 or Newer): Skip this step.<br>Existing Install (UniFi Network v7.4 or Prior): Refer to MongoDB&#8217;s Help Article for instructions on updating MongoDB to v.3.6 or later.<\/p>\n\n\n\n<p>Install and upgrade the UniFi Network application with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update &amp;&amp; sudo apt-get install unifi -y<\/code><\/pre>\n\n\n\n<p>The UniFi Network application should now be accessible at the computer&#8217;s configured local or public IP address, by typing that IP address in a browser&#8217;s navigation bar (Chrome is recommended). If it is not launching, use the following command:<br>sudo service unifi start<\/p>\n\n\n\n<p>When using the commands above, it is assumed you have sudo and wget installed. More information about sudo can be found here, and wget here.<\/p>\n\n\n\n<p>Other Helpful Commands<\/p>\n\n\n\n<p>To stop the UniFi service: sudo service unifi stop<br>To restart the UniFi service: sudo service unifi restart<br>To see the status of UniFi service: sudo service unifi status<\/p>\n\n\n\n<p>Click here for possible suite names and code names.<br>Log Files Location<\/p>\n\n\n\n<p>Log files are essential for any troubleshooting. Find them here:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/lib\/unifi\/logs\/server.log<br>\/usr\/lib\/unifi\/logs\/mongod.log<\/code><\/pre>\n\n\n\n<p>If your application is running on a Unix\/Linux based system, then you will require superuser (sudo) privileges to access these log files.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article was originally published on Ubiquiti Help Center and is reposted for archival purposes. This article provides the steps to install and update the self-hosted UniFi Network Server to the current stable release on a Debian or Ubuntu system via APT (Advanced Package Tool). If you run into issues following the process described in this article, please take a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-296","post","type-post","status-publish","format-standard","hentry","category-misc"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/posts\/296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/comments?post=296"}],"version-history":[{"count":2,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/posts\/296\/revisions"}],"predecessor-version":[{"id":299,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/posts\/296\/revisions\/299"}],"wp:attachment":[{"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/media?parent=296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/categories?post=296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cmsws.com\/blog\/wp-json\/wp\/v2\/tags?post=296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}