How to configure Unifi controller with spotipo

Add a Site

Each location is represented by a Site. A site can have multiple routers (of the same type)

After adding the client add a new site by clicking on the button in the drop down menu on top right.

Select the client you have just created, Site type as Unifi and configure the correct timezone and Save

Activate Site

Next step is to activate the site and choose a subscription. Please follow this.

Configure Unifi Controller Settings

Go to Dashboard -> UniFi -> Unifi Management

Enter there details of your Unifi Controller/ Cloud Key and press Save

Select the Unifi Site

After activation, go to the site and select the Settings tab.

There select the name of the Unifi site you want deploy hotspot  under Site ID

Enable Guest Settings with no authentication

Configure Pre-Auth settings correctly

Enable Guest Policy for the correct WiFi Network

Remember to apply settings

Enable required ports on the site

Please enable following ports in your firewall/AWS console if required.

    22
    80
    443
    8081
    8080
    8443
    8880
    8843
Figure out the site id

Each site in unifi controller is identified by a parameter called siteid. To identify this, login to Unifi controller and go the correct site.

Siteid will be part of the URL.

Enable redirection to Spotipo

Now you will need to replace the unifi’s index.html file with the below script. This will redirect the Guest to correctly to spotipo.

This file is available in /var/lib/unifi/sites/{SITEID}/portal in case of Ubuntu/Debian

Remember to replace SERVERADDRESS and SITEID
<!DOCTYPE HTML>
<html lang="en-US">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="1;url=http://SERVERADDRESS/guest/s/SITEID/?ap=<unifi var="ap_mac" />&id=<unifi var="mac" />&ssid=<unifi var="ssid" />">

</html>


How did we do?