This CloudFormation template was designed for new and experienced AWS users to launch a UniFi controller with minimal effort.
- Creates a VPC and public subnet for your controller
- Allocates an EIP for your controller
- Launches an EC2 instance with the required firewall rules
- Installs MongoDB and UniFi Controller.
- Can
optionallysetup Let's Encrypt and import the SSL certs in to UniFi automatically (thanks to Steve Jenkins).
This template is still a work in progress. As of now, Let's Encrypt is being setup whether or not you select Yes/No on the parameter page. This requires you to update your DNS A record as soon as the template launches for Let's Encrypt to successfully run. Set your TTL on the DNS record to 1 minute or the minimum time so that it will update and propagate faster. I am currently researching how I can enable/disable this conditionally. If you have any issues running this template, please post the errors on the GitHub Issues page.
For these instructions, I will assume you have signed up for a free AWS account and are logged in to the AWS console.
- Download the UniFi-Controller.yaml file from this repo.
- From the AWS console, navigate to Services > CloudFormation.
- Click "Create Stack".
- Select the Upload File option and choose the UniFi-Controller.yaml file you previously downloaded. Click Next.
- Enter a Stack Name (just for your future reference) and fill out all the parameters. Note: The t2.micro instance type is available for free tier. Click Next.
- On the Stack Options page, click next. Then, click Create Stack.
- At this point, you should click on the Resources tab for your stack. Shortly after the template begins creating the resources, you will see an EIP listed. You will need to create a DNS A record for the FQDN that points to this IP address.
- You should now be able to navigate to https://:8443 and setup your UniFi Controller.
Thanks to the following sources! These were referenced/used in creating this template.