Guide: How to run UniFi Controller on the Firewalla Gold Series Boxes

Follow

Comments

145 comments

  • Avatar
    Michael Bierman

    Hi Jen I’m not sure I understand the issue can you describe in more detail?

    1
    Comment actions Permalink
  • Avatar
    Blake

    Is there something that should be done after step 1 and before step 2?  I tried running the command in step 2 and got the following error:

    Error: No such network: unifi_default

    Error: any valid prefix is expected rather than "null".

    0
    Comment actions Permalink
  • Avatar
    Zach Schramm

    Now that Blue Plus contains docker support, will this become available on those as well?

     

    0
    Comment actions Permalink
  • Avatar
    Support Team

    Yes, there will be a separate doc on Blue Plus.

    0
    Comment actions Permalink
  • Avatar
    Blake

    So I had to reboot my firewalla and attempted to follow this guide again and I can't get the controller functioning.  I even removed everything I could find related to unif and run through the process and I can't get to the controller by using my LAN IP.  When I try to run the compose command I get this error:

    ERROR: for unifi  Cannot start service unifi: Invalid address 172.16.1.2: It does not belong to any of this network's subnets

    I'm pretty sure you updated the guide since the first time I went through it and I can't figure out what all changed to troubleshoot.  Any help would be appreciated.

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    Did you check steps 2 & 3 which aren't permanent ?

    0
    Comment actions Permalink
  • Avatar
    Blake

    Yes, I completed steps 2 and 3 again.  I went through the whole thing, and then when I tried to reach the controller it failed to load the page.  It says failed to reach the server.

    0
    Comment actions Permalink
  • Avatar
    Nicolas Evens

    @Michael thank you, your guide is great!

    Homebridge seems to be more of an interface to HomeKit than a standalone software. I do not have Apple devices so not sure it's a good fit for me.

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    Nicolas, you are right Homebridge is mostly about homekit. It does have some plugins for Google,  zwave, and alexa. 

    0
    Comment actions Permalink
  • Avatar
    Blake

    So now that I have 1.971 I've added the new file necessary to kick start the controller after every reboot.  However, and forgive me if this is a dumb question, but what does this part of the guide mean:

    If you have installed unifi controller before 1.971, please change your docker-compose.yaml file accordingly and run the following commands

    In what way would I need to update the compose file?

    0
    Comment actions Permalink
  • Avatar
    Support

    @Blake If your controller is up and running then you are good. We made a change in network section of docker-compose file. A previous configured docker container might cause conflict with the recommended settings now.

    0
    Comment actions Permalink
  • Avatar
    Christopher J. Shaker

    I had the earlier configuration, and am having a hard time updating it to the new instructions.

    Is there some easy way to remove the entire docker configuration, without reflashing the router?

    Thank you,
    Chris Shaker

    0
    Comment actions Permalink
  • Avatar
    Blake

    Try running sudo docker compose down. Then start over. If that works it’s much easier than the method I used.

    docker compose down is supposed to remove the container.  So running that and then starting over using this guide should work.  Also, I found it easier to use Filezilla to connect to the Firewalla to create the directories and upload the yaml file since I don't really have much experience in using commands to do that.  Just in case that helps anyone as inexperienced as I am accomplish this.

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @Blake to upgrade the controller you update the docker container. Updating devices happensmfrom the controller software.

    0
    Comment actions Permalink
  • Avatar
    Dave

    Could this method be adapted to install TP-Link's Omada Software Controller? I have a few EAP245 and this would save me having to get their hardware controller

    0
    Comment actions Permalink
  • Avatar
    Alex

    Is the ip route command with table wan_routable really necessary? I only used the command with lan_routable and cannot see any problems (also I removed the two lines in the start_unifi.sh script).

    What's wan_routable doing?

    @Chris: Also without the wan_routable command I could connect to the unifi controller from my guest network .. so I add in the firewalla app a custom block rule for my guest network .. block ip range 172.16.1.0/24. It's working fine.

    0
    Comment actions Permalink
  • Avatar
    Dave B

    I'm trying to do this on a Firewalla Blue Plus.  My controller adopted and provisioned the initialized WAP and it seems to work just fine. 

    When I run:

    sudo ip route add 172.16.1.0/24 dev br-$(sudo docker network ls | awk '$2 == "unifi_default" {print $1}') table lan_routable
    sudo ip route add 172.16.1.0/24 dev br-$(sudo docker network ls | awk '$2 == "unifi_default" {print $1}') table wan_routable

    I get this:

    Error: argument "lan_routable" is wrong: "table" value is invalid

    My docker-compose file is identical to what is provided in the procedure above. Any advice?

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @Chris, I am not sure how you have configured your guest network. If it is a different VLAN then you can make a rule on Firewalla preventing the guest VLAN from reaching the LAN. 

     

    0
    Comment actions Permalink
  • Avatar
    Blake

    Ran into an issue that I think is related to the controller setup and the googles has let me down.

    I created a separate network from my LAN for my WFH computers. When I try to assign the “Work” port profile to the switch uplink in my office the switch disconnects from the controller. I suspect that the controller can’t reach it on that network? Any ideas?

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    Thanks for asking this @Blake. I was thinking about moving the management to another vlan but hadn’t taken the time to sort out the steps involved.

    0
    Comment actions Permalink
  • Avatar
    Blake

    So here is what I was thinking (and apparently this isn't an easy thing to do based on my research).  I want to create a separate network for my Unifi network equipment.  This involves 2 switchs, the controller and the APs when I get them.  Currently my controller is in docker and it has an IP of 172.16.1.2.  I can also access it from 192.168.30.1, but I'm not sure why.  I've created a MGMT VLAN in the FWG (192.168.20.1/24).  I also made this a corporate network in the controller.

    I first set the Management Network on the Flex Mini switch to MGMT VLAN and it disconnected from the controller.  After fiddling a bit I discovered and checked the box in the controller settings for "make controller discoverable on L2 network" and after a few minutes the switch changed from Disconnected to Adding.  It was stuck in Adding for a while and then surprisingly it finished provisioning and showed as connected in the controller.  It has an IP address in my MGMT VLAN, and the connected devices still have IPs in their correct subnets.  Sometime this weekend I'm going to attempt to move my main switch over as well.  But I still don't know how to move my controller to that network yet.  I also would love to know why I can access my controller from both the 172 and the 192 networks.

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    If anyone is interested, I wrote a script that I run on my firewalla (via cron) to turn on/off the LEDs of my Unifi APs every day. (One of the APs is in a bedroom.) 

     
    0
    Comment actions Permalink
  • Avatar
    Josh Hunsaker

    During step 1, when I try 

    sudo systemctl start docker-compose@unifi

    I get the following error:

    Error response from daemon: No such container: docker-compose@unifi
    Error: failed to start containers: docker-compose@unifi

    I have the file created, but it almost seems like Docker is not installed. Is it not installed on the Gold out of the box? I created the directories and saved the .yaml file, but I am wondering if I needed to install docker before starting this. Any help is appreciated, I'm pretty new to this.

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    To see if Docker is installed , you can check

    which docker 

    or see what containers are running!

    sudo docker ps

    You could also have a look at https://github.com/oznu/docker-homebridge/wiki/Running-Homebridge-on-Firewalla-Gold although it is for a different Docker container.

    0
    Comment actions Permalink
  • Avatar
    Josh Hunsaker

    Thank you for your help on this, I got through step 3 and everything appears to be working correctly, but when I try to access the controller through a browser I can't reach anything. So, a couple of questions here:

    1. I set up a Lan network on port 1 of the Firewalla Gold specifically for this, at the beginning of the guide when it says "a static IP for your unifi controller instance, we use 172.16.1.2 in this tutorial" are you doing anything other than the steps in this guide to assign that static ip to the controller? I just selected an ip in that range to use in the instructions, is there anything else I should have done there?
    2. In my app, the network I created for this is 192.168.215.1/24, in step 2 I get an error when I use that number, but the error goes away when I swap it with 192.168.215.0/24. Could that be preventing me from accessing the controller?
    0
    Comment actions Permalink
  • Avatar
    Abbas Jaffar Ali

    Step 2 says to Create the following file

    /home/pi/.firewalla/run/docker/unifi/docker-compose.yaml

    If I try to type "nano /home/pi/.firewalla/run/docker/unifi/docker-compose.yaml" and then pste the contents in it, then when I try to save, it says the file doesnt exists.

    If I manually mkdir the unif folder in /home/pi/.firewalla/run/docker/ and then try to "nano docker-compose.yaml" , I get a permissions dnied error

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @Abbas, if you are using nano you have to use the, “write out” command before exiting. 

    0
    Comment actions Permalink
  • Avatar
    StackIOI

    The controller runs fine but I see my devices as disconnected, do you have to set the controller ip under Settings > Controller > Controller Settings or leave it blank? and tick the "Override inform host with controller hostname/IP" box? 

    0
    Comment actions Permalink
  • Avatar
    Michael Bierman

    @StackIOI do not tick the, "Override inform host" 

    The IP for Controller Hostname/IP will be the Firewalla.

    If you have never adopted the devices before you may need to the device where the controller is. 

    https://community.ui.com/questions/What-is-correct-command-to-set-inform-url-and-also-to-factory-reset-via-SSH/9d219587-76d5-4c8e-bc81-63a70a8bb212

    0
    Comment actions Permalink
  • Avatar
    StackIOI

    Thanks @Michael Bierman, for some reason it seems that the devices are not finding the controller... I double checked my UniFi dnsmasq_local entry and is correct, also reconfigured the controller from scratch, as the previous time I restored the configuration from a backup of the working controller (running in my computer) into this new one... Which is why I saw the devices as disconnected... now, with the new controller running (the one in my computer is off) I can't see any of the devices, so obviously, I can't adopt them into this new controller.

    Did reboot them manually hoping for a refresh, but still can't reach them. Any suggestions? I can reach them from the FWG, I can ping them just fine.

    0
    Comment actions Permalink

Please sign in to leave a comment.