The journey of a thousand miles begins with one step. -Lao Tzu

Well begin with programming the Amazon Web Server. We use AWS for the following reasons

  • You can check stats from anywhere
  • Program your fleet of devices from anywhere
  • Using one AWS takes the place of multiple locally hosted unifi controllers
  • AWS monthly fee costs less than the electricity would from an actual locally hosted server
  • Amazon's servers are less likely to be met with a reason to fail or go down than our own servers would.

 

 

Lets begin with browsing to https://aws.amazon.com/ then click create a new account.

 

1.Fill in your contact information. Simple stuff.

 

2. You'll need to enter payment information, but you wont be charged unless you go over a data allotment or buy a server instance that costs money. The server we will be using will be free to get started on, but wont actually charge you until you have users on it. In which case will end up being about 10 dollars a month.

 

3. Now you're ready to create your first instance. Click on "sign into the console"


 

4. Now navigate to Launch a Virtual Machine

 

5. Click get started to launch the wizard

 

6a. Here you name your instance, but the name can be changed later. This is only for you to recognize it in case you make multiple instances and you need to keep track of them. Any name will do.

 

6b. To run the specific software the way we do, we will use the Ubuntu operating system. This is the easiest and most strait forward to work with so long as you know some basic Linux commands

 

6c. t2.micro instance type keeps it totally free until you start pushing some traffic to your system. Even when its not free, its still virtually free.

 

6d. This part is very important. In order to interact with our web server, we're going to need our "Key Pair." Without it we cannot access it at all. So when you download the file, DO NOT LOSE IT. Back it up on a couple hundred different kinds of drives (slight sarcasm), because if its gone, you're locked out forever.

 

7. At this time it will take a couple minutes to boot up and become available. From here click proceed to EC2 console.

 

8. As you can see our newest instance is initializing and getting ready for our programming. Grab a soda or whatever while it finishes.

 

9. Now that our instance is up and running, lets handle its security groups. Click on the security groups link under the network & security side bar.

 

10. Find the new rule set it automatically creates for you, right click and click Edit Inbound Rules

 

11a. Here we see a still of what the rule set looks like before we edit them. Change the values in this screen on yours to match the picture after this one shown.

 

11b. Configure Security Group to define your unifi controllers firewall rules as shown below. Ubiquiti recommends setting the source IP for the SSH port 22 entry to only accept a certain IP address if you have a STATIC IP. If you log in from multiple locations or use a dynamic IP, don't change it.

 

12. After hitting save, head back to your instance overview by clicking the instances link under the instances tab in the side bar. Click view inbound security rules to double check they went through properly.

 

13. Assigning an "elastic IP" (static public ip)

Click on elastic IPs on the left menu, under network and security

click allocate new address in the top blue box

 

14. Click the blue allocate button when when you'r ready to proceed.

 

15. Receive your new IP address, then click close

 

16. The screen will return you to your Elastic IP readout. Right click your new assigned elastic IP address, then click associate address.

 

17a. In the instance drop down select your instance ID

 

17b. Under the Private IP drop down menu select the private IP available. Then click the blue associate button in the bottom right corner.

 

18. To check that your instance now has an associated IP address, head back to your instances tab and look to your IPv4 public ip next to your running instance. It should reflect the settings we just entered. 

 

Congratulations! Your Amazon web server is now fully setup and ready to accept programming. 

The Unifi controller is the software we will program the server with to allow us to program all of our WiFi access points from a centralized location no matter where they are. It's also the program we will spend the majority of our time in as a web admin when monitoring the networks and programming new devices. 

 

1. Connect to your instance by right clicking it's link in the instance console and then clicking connect.

 

2. You can connect to your instance with a variety of different SSH programs like PuTTY, however the Java SSH Client built into AWS and Firefox works just fine for now. Leave the User name as "ubuntu," and for Private key path, type the path in which your "Key Pair" .pem file you saved from earlier lives. For simplicity we left ours on the top directory of our C:\ drive.

 

3. Successful connection should leave you at this screen

 

4. Elevate your privileges to root to avoid problems going forward

Type: 
sudo -i
 

5. Next add the Unifi respository to your AWS

Type: 
echo "deb http://www.ubnt.com/downloads/unifi/debian unifi5 ubiquiti" | sudo tee -a /etc/apt/sources.list
 

6a. Next we need to add the unifi GPG Key

Type:
apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50
 

6b. If successful you should see this

 

7a. Update the Ubuntu operating system

Type: 
apt-get update
 

7b. If successful you should see this

 

8a. Install the Unifi Controller onto your AWS system

Type:

apt-get install unifi

 

8b. Typed "Y" to continue with the installation

 

8c. If successful you should get to this screen

 

9. Logout/exit the AWS SSH session

Type:
exit

Then close the window by hitting the red "X" at the top right screen

 

10. Navigate to the elastic IP you have set for yourself in the browser window. For instance type:

https://ELASIC-IP-ADDRESS-HERE:8443

If done correctly, you should be greeted with a screen like the one below. Select your time zone and click next.

 

11. These next few windows can stay blank and be skipped as we can program our fleet better outside of the wizard. Just click next on this window.

 

12. Skip this window as well by clicking SKIP in the lower right

 

13. This window cannot be skipped for good reason. Enter a user name and password of your choosing, as well as an email address to run the "forgot password" option for later on if you ever forget it. Then click next.

 

14. Ubiquiti offers cloud access, for what we're doing its not necessary. You can go through the registration if that's an option you prefer. Otherwise click SKIP.

 

15. If your information is correct on this screen, hit the finish button.

 

16. You should now be prompted for the first time to log into your AWS Unifi Controller. Type in the credentials you just created and click sign in.

 

17. If you've gotten this far it means everything has gone right! You're now logged into your cloud server unifi controller. This is the web server you will now be using to check network health, modify and program devices and much more! Feel free to click around and become a little familiar with the layout and menus. In the next tutorial we will dive deeper into the controller and how to use it!

Congratulations on setting up your cloud controller!

 

Experiment with accessing it from different devices and different internet connections. You should be able to access it from anywhere using the elastic IP you set. For extra security, in your AWS security settings change the acessable IP to a range of your design. That way limiting who the unifi controller is available to. This controller will eventually be everything to you, so treat it well, keep it clean and protect it!