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 Add New Site 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

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

In windows this is available in C:\Users\ WINDOWS USERNAME \Ubiquiti UniFi\data\sites\ SITEID\portal

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>
Did this answer your question?