How to install UniFi controller on Synology NAS

Published onby Iron

Installing the UniFi Controller on a Synology NAS is a great way to have a dedicated, always-on solution for managing your UniFi network. Synology NAS devices are reliable, efficient, and already optimized for network-related tasks.

Let's dive in!

Table of Contents

Introduction

Why would you want to run a UniFi Controller on a Synology NAS? For one, it lets you manage your network without buying additional hardware like the UniFi Cloud Key. Plus, a NAS is usually always on, which is perfect for a controller that needs to be accessible at all times. If you're managing access points (APs), switches, or security gateways, having an always-on controller makes life easier.

This guide covers everything you need to know to get it set up — from prerequisites to final configuration.

Prerequisites

Before starting, make sure you have the following:

  1. Synology NAS: With support for Docker (recommended) or Virtual Machine Manager (VMM).
  2. Admin Access: Ensure you have administrator access to the NAS.
  3. UniFi Controller Software: We’ll download the UniFi controller image using Docker.
  4. Docker: Install Docker from the Synology Package Center (not all Synology models support Docker).
  5. Internet Connection: Required for downloading the necessary files.
  6. Static IP: Assign a static IP to your Synology NAS. This ensures the controller is always accessible on the same IP.

If your Synology device doesn’t support Docker, you can use the Virtual Machine Manager (VMM) to run a virtual instance of Ubuntu and install the UniFi controller inside it. But for this guide, we’ll focus on the Docker method since it’s easier and more efficient.

Step 1: Install Docker on your Synology NAS

  1. Open Synology Package Center: Log into your NAS and open the "Package Center" from the main menu.
  2. Search for Docker: In the search bar, type “Docker” and click Install.
  3. Launch Docker: Once installed, open the Docker application.

Note: If your Synology model does not support Docker, you may need to use Virtual Machine Manager instead.

Step 2: Download the UniFi Controller Docker Image

  1. Go to Docker Registry: In the Docker app, click on the Registry tab on the left.
  2. Search for 'UniFi': Type "UniFi" into the search bar. Look for the image by jacobalberty/unifi as it is a widely-used and stable version.
  3. Download the Image: Select the image and click Download. Choose the latest tag.
  4. Wait for the Image to Download: This may take a few minutes, depending on your internet connection.

Note: The image is maintained by the community, so if you prefer official support, consider using the UniFi Cloud Key or a dedicated UniFi device.

Step 3: Create a UniFi Controller Container

  1. Go to Docker Container: Once the image is downloaded, go to the Container tab in Docker.
  2. Click 'Create': Click the Create button at the top to start a new container.
  3. Select the UniFi Image: Choose the "jacobalberty/unifi" image from the list and click Next.
  4. Name the Container: Call it UniFi-Controller or whatever you prefer.
  5. Advanced Settings:
    • Enable Auto-Restart: Check the box for Enable auto-restart. This ensures the container starts automatically after a NAS reboot.
    • Volume Mounts: Click the Volume tab and add a mount to persist data. For example:
      • Host Path: "/docker/unifi"
      • Container Path: "/unifi"
    • Network: Set it to Bridge Mode or Host Mode. Host Mode may work better for discovery of UniFi devices.
  6. Environment Variables: You may want to add specific variables:
    • "TZ=America/New_York" (adjust for your timezone)
  7. Ports: Click on the Port Settings tab and ensure the following ports are open:
    • 8080 (Device adoption)
    • 8443 (Web access)
    • 8880 (HTTP redirection)
    • 8843 (HTTPS redirection)
    • 6789 (Speed Test)
    • 3478 (STUN)
  8. Click 'Apply': Apply the changes and review them.
  9. Start the Container: Click Next and then Done to start the container.

Step 4: Access the UniFi Controller

  1. Find the IP of the NAS: Make sure your Synology NAS is on the same local network as the devices you'll be managing.
  2. Access the Controller: In a web browser, go to:
    http://[NAS_IP]:8443
    
    Replace "[NAS_IP]" with your Synology’s IP address.
  3. Setup Wizard: Follow the UniFi Controller setup wizard:
    • Create a UniFi account or log in.
    • Set up the site name.
    • Configure your network settings.
  4. Login to Controller: Once complete, you can log in and start managing devices.

Tip: If you cannot access the web interface, check the NAS firewall to ensure port 8443 is not blocked.

Step 5: Adopt Your UniFi Devices

Now that your controller is running, it’s time to adopt your UniFi devices like Access Points (APs), Switches, and Security Gateways.

  1. Reset Devices: If your devices have been connected to another controller, reset them.
  2. Discovery: The UniFi Controller will automatically detect devices. Look for them in the Devices tab.
  3. Adopt Devices: Click Adopt next to each device.
  4. Wait for Adoption to Complete: The adoption process may take a few minutes. The status will change from Adopting to Connected.

Troubleshooting Tip: If devices do not appear, ensure the Docker container is using Host Network Mode and ports are correctly open.

Step 6: Configure Backups

To avoid losing your configuration, set up backups for the UniFi Controller.

  1. Access Settings: Go to Settings in the UniFi controller.
  2. Enable Automatic Backups: Enable automatic backups, and specify the frequency.
  3. External Backups: If possible, store backups on another location on your Synology, or use a cloud service.

Pro Tip: Use Synology’s built-in "Hyper Backup" to back up the controller data from "/docker/unifi" on a schedule.

Common Issues and Fixes

  1. Controller Not Loading: Check if the container is running by going to Docker > Containers.
  2. No Devices Found: Ensure the container uses Host Mode so it can discover devices.
  3. Web Interface Not Loading: Make sure the NAS firewall is not blocking port 8443.
  4. Adoption Issues: If devices are not adopting, try setting the "set-inform" URL on the device manually. Use:
    set-inform http://[NAS_IP]:8080/inform
    

Benefits of Running the Controller on a NAS

  • Cost-Effective: No need for additional hardware like a Cloud Key.
  • Always On: Synology NAS devices run 24/7, making them ideal for hosting.
  • Centralized Control: Manage your entire network in one place.
  • Custom Backups: Take advantage of Synology's robust backup tools.

Final Thoughts

Running a UniFi Controller on a Synology NAS gives you a professional-grade network management experience without extra hardware. It’s a budget-friendly, efficient solution for both home users and small business owners. With Docker, setup is smooth and easy.

If you’d rather avoid the DIY approach, you can try UniHosted, our cloud-hosted UniFi controller solution. It offers quick deployment, automated updates, and daily backups without the need for local hardware. No NAS, no setup headaches. If you would like me to personally walk you through UniHosted, you can schedule a call with me here.

We host UniFi Controllers in the Cloud

Are you ready to take your UniFi Network to the next level? Deploy a UniFi Cloud Controller in minutes and manage your network from anywhere.

Deploy Now

Free tier available

Get the best support

Join 1660+ customers

No credit card required