banner



Does Theunifi Cloud Key Have The Ability To Be Dhcp For Cameras

The Like shooting fish in a barrel Way With Pictures

Hosting an Unifi Controller in the cloud is a slap-up way to centralize your Unifi network, especially y'all manage multiple networks. However, in that location are quite a few steps and, they are constantly changing due to updates from the diverse vendors who must all work together in order for this to work. In fact, this is the reason I'm writing this blog. There are already how-tos out in that location on how to exercise this, but none of them work. And then I made a new one. If information technology helps you, please exit a annotate down below, I capeesh any feedback and love to stay engaged with you guys.

Firstly, my instance has been set using Vultr hosting. Vultr hosting offers competitive pricing for a VPS server, only there are many other providers if you want to go another road. Two things that you need to take into business relationship if you lot use Vultr though:

  • The starting time is that Vultr is missing some core components on a fresh install (Coffee & MongoDB) so we'll manually install them
  • The 2d is that the base server but uses an IP v6 accost. Make sure to purchase at to the lowest degree a VPS with IPv4 adequacy
  • This is for 5.x.26 of the controller software. More than contempo updates may change things
  • I volition go over how to fix upwardly a Domain proper noun also

Setting up your server in the cloud

Creating the server

We need to prepare and create a server. Create an business relationship at Vultr and set 2FA (I know, but it is of import).

Select the 16.04 version of Ubuntu and be sure to option the 25GB SSD option or better (the setting with the ruddy square should permit you to manage about ~500 devices) the more than RAM and CPU speed, the more clients you can manage. Ubiquiti has stated that there is no hard limit software-wise so if you lot can afford a little extra, practice it!

Okay, now that we've started the server we need to gear up upwardly the firewall on Vultr. In that location are a few steps here. The first is to go into the products tab on the left-paw side of the toolbar. Click that and it should bring up your server.

Select products and then firewall tab

Click the blue plus button

Setting upwardly the firewall

Then, click the firewall tab and click the blue plus button and then you can add firewall rules. The firewall rules are of import because information technology allows your controller to talk to your devices.

Activeness Protocol Port
accept TCP 22
Accept TCP 80
Have TCP 443
Have UDP 3478
Accept TCP 8080
Accept TCP 8443
Accept TCP 8880
Take TCP 22222
Accept TCP 0-65535

Now that we've prepare the firewall rules, we have to apply information technology to the server you've set up. Yous tin can do this by clicking your server instance click on the settings tab and and then follow these red arrows. Select the firewall settings we just setup.

Logging into the server via SSH

Download Putty & Login to the Server

There are two options here. Yous tin can utilise the one on Vultr'southward website, or y'all can use Putty. If yous don't already have it you lot tin can download it here. Putty is better because you tin copy and paste. Honestly, just employ Putty. If you're merely getting into networking your gonna need it anyways.

Logging into the server

We need the IP address and the password to login to the server. You tin can notice information technology on Vultr's website in the Overview tab of the server case

Open up up, Putty. You volition come across a login bar where yous volition put in the IP address ignore the "security warning." Then type in "root" for your username. Now here's the flim-flam in Putty for you newbies, you need to copy the password from vultr commencement then with your cursor in Putty "right-click" to paste the countersign. Putty does not notify yous or give you stars when it's been pasted, but it's in there, Now push enter.

Groovy! Y'all've logged in!! You lot should see a screen resembling this:

Yous accept now logged into the server congratulations. In this system, you lot are at present god. You accept root access. The next step is to install all the necessary components. From here on out I want you to copy and paste the code that I give you using the same technique that yous learned from higher up.

Installing the files: Here comes the code

Installing MongoDB

Pay attending to the output of the console; it volition inquire you some questions on if you want to continue. Put in Y for yes to continue. At that place will be a betoken where the MongoDB service will run. Push "q" to quit out of the service to bring you dorsum to console input

          sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927  repeat "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list  sudo apt-get update  sudo apt-get install mongodb-org  sudo systemctl start mongod  sudo systemctl status mongod                  

After installing the code, yous should see green text in the output like beneath. If you don't meet the light-green text, something went wrong and you need to restart the process. If yous can't figure it out, get out a annotate below.

Installing Java viii

Heres the rub, Ubiquiti still hasn't updated the controller software to run on Java ix, so nosotros have to install an older version of the software. Once again pay attention to the output, it will ask you to press enter. Here's the lawmaking:

          sudo add-apt-repository ppa:webupd8team/java sudo apt-go update sudo apt-get install oracle-java8-installer        
          sudo apt install openjdk-8-jdk java -version                  

You should see this output for the coffee version command. If yous do not something went wrong:

Yous demand to configure the time zone for the controller. DO so by entering this command and following the on-screen instructions

          sudo dpkg-reconfigure tzdata                  

Installing the Unifi Controller Software

Sugariness, we've set the stage now we demand to jump in. We're going to install the controller software now and brand sure it runs every bit a service. Make sure to follow the prompts and press Due north to verify and Y to install! Stay tuned for the code!!

          echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list sudo apt-get update sudo apt-become install unifi  service unifi status        

Alrighty, now make certain you see green text to verify that the Unifi service is running. If you see green, you're golden!! Push q to exit to bring you back to console

There's the green text!!

Registering the Domain for your controller

Okay, in order for us to secure the controller and encrypt the traffic nosotros're going to need HTTPS, which means you're gonna demand a domain. I don't want to dive in deep here, but your best bet is to either piggyback off of a domain you own and create a subdomain OR just buy a new one. Make certain to go into your DNS records and forward your domain's records to your server. I'1000 going to enclose a screenshot on how to practise it using google's domain, but they're all similar. Where the red arrow is where I added my subdomain. I added an A record and pointed it to the IP address of my server hosting the controller software. When you lot save the record, information technology may take some time for everything to update (an hour or so) before you tin can access it through that domain.

Accessing the controller software through the deject

now its time to log in to your fresh server. Type HTTPS://[server IP]:8443 . At present Chrome will give yous a big fat security alarm when you sign in. Ignore it. Click advanced setting and go on. Stupid Chrome.

Unifi Login screen

We're in!! Sweet deal. At present I'thou not going to delve in deep here. Y'all're going to setup the controller just like you do on any other type of install. Just follow the instructions, remember your passwords, and keep moving.

Setting up your HTTPS:// domain using let's encrypt

Give thanks the lord for the Electronic Frontier Foundation! Earlier them https cost a fortune, now it's free!! But we have to set it up on your server. I'm gonna dump some code on you, just it's worth it.

          sudo add together-apt-repository ppa:certbot/certbot Press enter sudo apt-go update  sudo apt-become install python-certbot-apache -y        

The side by side footstep is going to be generating your document from Lets Encrypt. You lot demand to suspend your domain name afterwards the code.

          sudo certbot --apache -d [YOUR DOMAIN URL GOES Here DO NOT INCLUDE HTTP (IE. google.com)]                  

Okay, Lets Encrypt is going to give y'all some options. Brand sure to input your email accost and follow the onscreen instructions. Press ii for domain redirect.

Setting up the Let'southward Encrypt Script

A much smarter guy than me came upwards with this wonderful script to automate the rest of the process. All nosotros have to practise is alter a few details in the code and Whala! SSL is done. Stay with me here we're about done

          sudo wget https://raw.githubusercontent.com/stevejenkins/unifi-linux-utils/chief/unifi_ssl_import.sh -O /usr/local/bin/unifi_ssl_import.sh  sudo chmod +x /usr/local/bin/unifi_ssl_import.sh        

Okay, at present we need to open the text file to change the settings. We're going to utilize the built-in editor to do that.

          sudo nano -w /usr/local/bin/unifi_ssl_import.sh                  
Here's what you lot should see in the editor

If you run across this we're in. I desire you to push the down cursor until you the line that says UNIFI_HOSTNAME=hostname.example.com and modify it to your domain that you ready up. Information technology should be similar: UNIFI_HOSTNAME=YOURHOSTNAME.COM

Press enter

Whorl down again until you see the UNIFI_DIR line. You need to put a # sign in front of this text to comment (basically tells the reckoner not to read this text) out this. Practice THIS FOR ALL THREE LINES

Once that's washed you need to uncomment the Debian/ Ubuntu lines since our server uses that OS

Information technology should look like this when washed!!

Ane more thing, scroll down to LE_MODE=no. We want to change that to Aye because nosotros're using Permit's Encrypt!!

Make certain to modify the LE_MODE to Yes!!

Okay, we're done editing. Nosotros just have to save the file. Printing CTRL-X on your keyboard. It's going to enquire y'all to save the file. Push y for "yes." Information technology will then inquire what you lot want to proper name it. Simply PUSH ENTER, don't alter the file proper name

Now we demand to run the script using this command:

          sudo /usr/local/bin/unifi_ssl_import.sh                  

Awesome, everything is gear up on the server stop. Now we need to configure the AP'southward to talk with your server

Setting up your Access Points to talk to your server Known as "Fix-inform"

Unifi devices are set to try and contact a server on a local network. You need to program them to instead talk to your server. The easiest fashion is if you lot already have an Edgerouter. Y'all tell it to use DHCP Option 43 to redirect the traffic to the controller. Yous need to login to your router and get to the services tab. In that location should exist something chosen LAN nether the name list (depends on how its setup). Click the deportment tab on the right side and go to view details. Under the "Ubiquiti Controller" box put in the IP OF YOUR SERVER. Exercise not apply HTTP or anything merely the IP.

Blast, you should see your AP'southward in your Ubiquiti controller. They'll testify upwardly as pending adoption. If not hard reset your APs by using a paperclip. You demand to concord the paperclip in for nearly 10 seconds for information technology to reset. Be careful, though! Unifi devices don't similar to be turned off when booting. They're kinda finicky, simply a warning. So take your fourth dimension.

If You Don't Own an Edge-router in that location are some other ways

  • Most routers have a style to setup DHCP option 43, use some Google-Fu and do some research on it.
  • You can also manually alter the setting using Putty by connecting to each individual access betoken
  • You tin use this really cool chrome app that lets you connect to the Access points through the browser. Open the App up and select the "Unifi Family" button. Your AP'due south will show upwardly if they're on and continued to your network. From there, y'all can manually modify the "gear up-inform" from within the app. Modify that to your domain you lot setup
  • Ubiquiti has washed a lot of work in making this step easier. They have a groovy write up on their website about how to practise information technology.

Source: https://cellardoorsolutions.com/uncategorized/how-to-setup-a-unifi-controller-in-the-cloud/

Posted by: ravenusio1961.blogspot.com

0 Response to "Does Theunifi Cloud Key Have The Ability To Be Dhcp For Cameras"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel