Upcoming Maintenance Alert:

The UBNT Community will be upgraded at 5pm MDT on April 25th. During this time the community forums will be set to read-only status.

Learn more

×
Reply
Highlighted
Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2
Accepted Solution

A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

[ Edited ]

 

UPDATE:  Some have had issues with this tutorial due to slight changes.  You can view our up-to-date tutorial at our Blog on our website: http://www.dashos.net/getting-the-most-out-of-unifi/

 

Title: Amazon AWS Ubiquiti Controller Setup from Scratch

Step 1.  You will want to signup for an account over at Amazon.

Step 2.  Once you have logged into your Amazon AWS Account, hover over the top right menu "My Account / Console" and click on "AWS Management Console"

management-console.png

Step 3.  At the top left, click on "Services" to bring the dropdown menu up.  Find the menu that says "EC2" and click on it.   

Step 4.  Click on "Launch Instance" to create a new Server Instance.

Launch-Instance.png

Step 5.  Choose "Classic Wizard" then press continue

Step 6.  Here we are going to select "Ubuntu Server 12.04 LTS 64-Bit"

Step 7.  Keep the default settings by just pressing "Continue" through each of the steps

  Note: Create a Key Pair and download it to your Desktop (for now).  We will need to make use of the .pem file it creates soon.

Step 8.  Once we get to the Firewall Settings you will want to click on the radio box for "Create a New Security Group."  

Step 9.  For Group Name & Description we will just use "UniFi"

Step 10.  Make sure the dropdown menu states that we will be creating a "Custom TCP Rule" and enter each of the following ports one by one.  

  • 22
  • 8080
  • 8443
  • 8843
  • 8880

SecurityGroups.png

Step 11.  Now select "Custom UDP Rule" from the dropdown and enter the following port number:

  • 3478

TCP-UDP.png

Step 12.  Click "Continue" to create your instance.


Accepted Solutions
Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

For this next Step we will be getting the Access Points on our Local Area Network to look to our newly created cloud instance to get controlled.  To do this, we will need to install the Unifi Software on our computer

Download

Note: You should check for a newer version - the Unifi Updates Blog is your best bet to see if a newer version has been released.

Once you have installed the Unifi Software, we are going to open the application "Unifi-Discover" rather than the actual Conroller Application.  This application will pop-up and show any Unifi Access Points that are on the same Subnet/Network as your computer.  

Note: You may want to add an "Elastic IP" at this point.  It can be found in the Amazon "AWS Management Console" and is generally straight forward to create (assign it to the Instance).  Once you have done this you will notice that your address changes under the main Instance Name to a new IP Address.  You should now be able to access your Unifi Cloud Controller by going to "https://<ELASTIC IP>:8443"

Step 1.  Once your Access Points are on the Network, they will show up in the "Unifi-Discover" tool, click on the "Manage" button of one of them to start.

Step 2.  Find the "Set Inform" step and change the Set Inform URL to the following: "https://<Public DNS or Elastic IP>:8080/inform

Step 3.  Login to your Unifi Cloud Controller and click the "Refresh" button in the top right corner of the screen.  You should see the top menu reflect that you now have "1 Pending" Access Point.  Hover over that part of the menu and select your Access Point (it's MAC ID should be displayed).  You will see a screen like below.  

unifi-ap-select.png

Note: At this time it may be best to use the top right dropdown menu to select a refresh time of 5 seconds so that we aren't waiting long periods of time between steps.  I'd recommend switching this back to 2 mintues later on.

Step 3.  Click the "adopt" button.  The status area should now say "Adopting" give it some time while it adopts the new Access Point into the Cloud Controller.

Note: if the Adoption fails, exit the Access Point Window then drag the Access Point from the left menu onto your project.  Open the AP Menu again and click "Adopt" and wait.  If this continues, you may want to try the steps over.  Open the Access Point menu, click on "Configuration" then "Forget this AP" to start over.

Once it is adopted, you are set!

View solution in original post

New Member
Posts: 3
Registered: ‎12-04-2014
Kudos: 2
Solutions: 1

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

I have registered simply  to say thank you to the OP. BRadyNapier

 

Your tutorial and step by step guide has been of some great help in setting up a cloud unifi controller.

 

I had a few issues which I am taking the liberty to discuss to hopefully avoid same pitfalls from others. As a side note you might have already covered these points in your "troubleshooting..."

 

1- could not log on to instance using putty.

 

Had to convert private key from *.pem to *.ppk //

converted but connection was denied consistently.

 

Problem solved/bypassed using java ssh console

.

2- Even though have java installed, still could not see console when trying to log into instance.

 

Had to unhide console in control panel (windows 8) >> Java>>Advanced>>Show/unhide console

But still could not log into instance because the console did not appear

 

Problem finally solved by RE-ENBLING  Java 7 plugin. firefox felt thaT JAVA 7 had too many vulnerabilities and disabled it.

 

3- vi was a pain in the neck. Never used it on linux (gedit  or nano) but on windows, pressing "x" deleted letters

 

Solved by using ":wq" to exit and save

 

4- once controller  was installed got the dreaded "cannot locate JAVA HOme"

 

Problem solved by adding (-amd64)

 

4- smooth sailing from there until I went on site to change the inform url of the APs

 

First used public DNS and it worked fine until after I provissionned APs, uplinked them and it felt too easy.

BUT I had forgotent to tick on "upgrade aps automatically."

 

Whilst on wire, they connected fine

but once removed from wire, I COULD SEe THEM BUT could not connect.

 

This was because the UAP-LR could not talk to them even though they all ran the same version (controller is 2.4.6) but APs were 3.2.5.2791  and old controlled was the latter.

 

UAP_LR was showing its version number (albeit different than controller) but picos did not have a version and they therefore refused to connect.

 

Once upgrade aps was ticked, I had to restart the entire install process but it went really smooth this time.

in almost half an hour, had 1 UAP LR and 3 pico M2 (running unifi) talking to each other as if they were mates from past lives.

 

Elastic IP:

 

Emphasis must be made that those who wish to have an elastic IP must do so immediately after setting up the controller.

 

I made the mistake of setting everything according to tutorial but ignored elastic IP until last step because the URL looked rather long (public DNS).

 

As a last thought, decided to truncate management URL by using an elastic IP.

Once it was assigned to my instance,(AND THERE WERE WARNINGS) 

Lo and Behold! All my hard work disappeared.

 

I had to start over again.

Installed - configured - managed!

 

THANKSaBunch  BradyNapier

 

 

 

View solution in original post


All Replies
Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

[ Edited ]

Once our Instance is created, we are ready to setup the server and install the Unifi Controller.  We are going to need to do some SSH commands in order to accomplish this.  I am no pro, so please feel free to correct me if I am wrong on any of these steps!  

Step 1.  Right Click on your Newly created Instance and click "Connect" 

Step 2.  We are going to use the Java SSH Console in this example.  If you are familiar with SSH you can connect using any program you'd like.

Step 3.  For "Private Key Path" we need to provide the filepath to the .pem file that we saved in the earlier step. In my example (on OS X) is: /Users/username/Desktop/privatekey.pem then click "Launch SSH Client"

Note: You do need Java in order for this to work.

Java-Console.png

Step 4.  If you correctly defined the path to the Private Key that you created when creating the Instance, you will see a Window pop up and eventually ender showing you something like the following:

  • "ubuntu@ip-###-###-###-###:~$

You will type the following in and follow the prompts.  From here I will just post in bullet-points for each SSH Step.  When you see "<Enter>" it means you should actually press the Enter (or "Return") key.

  • sudo vi /etc/apt/sources.list <Enter>
  • Use your keyboard to scroll down to an open line and enter a Capital "I" to insert text into the document (You should see "-- INSERT --" appear in the bottom of the screen.  Insert the following text
  • deb http://www.ubnt.com/downloads/unifi/distros/deb/ubuntu ubuntu ubiquiti
  • When you are done typing this text, press "CTRL+C" to finish your Text Insert. 
  • Type ":x" <Enter> to save your changes.  Once you are back on the main page enter the following
  • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50 <Enter>
  • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 <Enter>
  • sudo apt-get update <Enter>
  • You should now see a list of packages downloading from various Repositories.  Let it run its course until it says "Reading package lists... Done" and you have control of command entry again.  Now type the following
  • sudo apt-get install unifi <Enter> (or, if you want to install the latest Beta Software you can enter "unifi-beta") 
  • Through any prompts select "Y" ("yes") then press "Enter."  The installation may take some time so be patient as it runs through the installation.  

Note: You can enter "sudo service unifi status" to make sure Unifi is running as it should.  It should respond by showing you "* unifi is running"

On the next post we will enter the management prompt for the first time.

Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

[ Edited ]

Now we should be setup.  If the following steps don't work for you, you can try reading through the troubleshoot thread I created when I was working my way through this for the fir...  I ran into some pretty serious snags with the Security Groups not working properly - but you'll see it get figured out as the most moves on!

 

Step 1.  Return to your "Instances" page in the Amazon AWS Management Console.  Click on your Instance.  We are going to test to see if everything is working as it should.  

Step 2.  When you click on your Instance, a menu should popup with information about the Instance.  Find the "Public DNS" value and copy it into your clipboard (select it then do "CTRL+C").

Note: It might look something like this: "ec2-59-209-19-10.us-west-2.compute.amazonaws.com"

Step 3. Open a new Web Browser Window and type the following into the Address Bar: https://<your public dns goes here>:8443/ 

Step 3. You may get some sort of security warning when you do this.  It will look different on different browsers, provide and exception or continue through by saying that you trust the content provider.  You should now be greeted by the Ubiquiti Controller Wizard.  

In the next post we can go over getting an Access Point into the Cloud Controller.

Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

For this next Step we will be getting the Access Points on our Local Area Network to look to our newly created cloud instance to get controlled.  To do this, we will need to install the Unifi Software on our computer

Download

Note: You should check for a newer version - the Unifi Updates Blog is your best bet to see if a newer version has been released.

Once you have installed the Unifi Software, we are going to open the application "Unifi-Discover" rather than the actual Conroller Application.  This application will pop-up and show any Unifi Access Points that are on the same Subnet/Network as your computer.  

Note: You may want to add an "Elastic IP" at this point.  It can be found in the Amazon "AWS Management Console" and is generally straight forward to create (assign it to the Instance).  Once you have done this you will notice that your address changes under the main Instance Name to a new IP Address.  You should now be able to access your Unifi Cloud Controller by going to "https://<ELASTIC IP>:8443"

Step 1.  Once your Access Points are on the Network, they will show up in the "Unifi-Discover" tool, click on the "Manage" button of one of them to start.

Step 2.  Find the "Set Inform" step and change the Set Inform URL to the following: "https://<Public DNS or Elastic IP>:8080/inform

Step 3.  Login to your Unifi Cloud Controller and click the "Refresh" button in the top right corner of the screen.  You should see the top menu reflect that you now have "1 Pending" Access Point.  Hover over that part of the menu and select your Access Point (it's MAC ID should be displayed).  You will see a screen like below.  

unifi-ap-select.png

Note: At this time it may be best to use the top right dropdown menu to select a refresh time of 5 seconds so that we aren't waiting long periods of time between steps.  I'd recommend switching this back to 2 mintues later on.

Step 3.  Click the "adopt" button.  The status area should now say "Adopting" give it some time while it adopts the new Access Point into the Cloud Controller.

Note: if the Adoption fails, exit the Access Point Window then drag the Access Point from the left menu onto your project.  Open the AP Menu again and click "Adopt" and wait.  If this continues, you may want to try the steps over.  Open the Access Point menu, click on "Configuration" then "Forget this AP" to start over.

Once it is adopted, you are set!

Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

Let me know if you guys see any part missing and I will be sure to cover that as well. 

New Member
Posts: 38
Registered: ‎08-28-2013
Kudos: 9
Solutions: 1

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

Awsome write up. Appreciated!

Regular Member
Posts: 360
Registered: ‎12-11-2009
Kudos: 16
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

I have no need for the this(at this time) and have never used used any of the Unifi gear so I'm not familiar with its requirements .  With that said, your write up seems very detailed and well written.  Thanks

Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

LoL thanks!!  :-P

 

New Member
Posts: 34
Registered: ‎10-24-2012
Kudos: 14
Solutions: 1

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

Step 3. Open a new Web Browser Window and type the following into the Address Bar: https://<your public dns goes here>:8843/ 

 

Should it be 8443? 8843 won't work. Please advise. Thanks a lot!

New Member
Posts: 25
Registered: ‎05-16-2012

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

when i get to sudo apt update....i get "The list of sources could not be read" " Malformed line 9 in source list /etc/apt/sources.list

 

Any help would be appreciated...

New Member
Posts: 25
Registered: ‎05-16-2012

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

bump...

New Member
Posts: 25
Registered: ‎05-16-2012

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

Nevermind I got it....typo...

New Member
Posts: 13
Registered: ‎09-25-2013

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

[ Edited ]

Bradynapier, THANK YOU so much for your great tutorial!
I'm not a Linux expert at all, but thanks to your ssh tutorial I was finally able to have the Unifi controller installed and running (I still cannot believe that it worked in the end...)

I could not use the java-based ssh because of problems with my browser, but with the Putty tutorial it was easy to run the line commands as well.

Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

No problem!  Glad to be of assistance!  Haha I've already referenced it like 10 times for each project I go on, so it was as much selfish as it was serving the community!  :-)

New Member
Posts: 25
Registered: ‎05-16-2012

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

Yes I agree. Excellent TUT...thank you Bradynapier....

 

Now...not to be greedy any chance you can make a similar tutorial to show the steps on how to find the portal pages and replace them with custom pages...with AWS??

 

This would be helpful to a lot of AWS noob users like myself...

 

Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

[ Edited ]

Hey Mohawk, that'd be easy...

 

1. Activate Guest Portal and Guest Portal Customization

2. Get a FTP Client supporting SFTP (I use Terminal on OSX but Cyberduck should work too)

3. For password, find your .pem file

4. For login use "ubuntu" 

5. For host use the IP of your instance

Once you are in you navigate to

  • /usr/lib/unifi/data/sites/<site-to-edit>/portal/

NOTE: This differs from the standard documentation in-that you didn't have the "SITES" folders previously - it would just be /data/portal/ 

Edit the index.html etc and follow the current ubiquiti documentation from there

 

New Member
Posts: 25
Registered: ‎05-16-2012

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

Awesome...thank you...I'm sure more people are looking for the same information...

Member
Posts: 191
Registered: ‎04-02-2013
Kudos: 131
Solutions: 2

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

So I assume you figured it out ? No cli is needed ... Just use a FTP program and the standard ui
Emerging Member
Posts: 69
Registered: ‎04-20-2011
Kudos: 15

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

I am experiencing an issue with adoption/upgrade

 

My AP seems to cycle "upgrading" when connecting to my AWS instance of the UniFi controller. Basically each time it connects to my UniFi instance it simply "upgrade" then reboots and then shows as disconnected on UniFi. If i try to re-enter the AWS URL and enter username / password in UniFi Discovery Tool it just says its already adopted.

Im using putty to ssh to the AP and force to "inform" back to AWS, but it will just perform upgrade and reboot again.

Anyone experienced something similar? Ive performed hours of searching without coming up with a clear solution.

New Member
Posts: 13
Registered: ‎09-25-2013

Re: A Step-by-Step Walkthrough for Setting up Amazon Cloud Servers

What UniFi Controller version are you using?

Have you got other APs which are working fine in the same network?


Try this: install the unifi controller on a computer, and then adopt that AP. This could allow the AP to get out of the Upgrade/Reboot/Disconnect loop.

 

 

Reply