Sign inSign up

ahmadnassri/unifi-api-browser

By ahmadnassri

•Updated 10 months ago

A docker image for UniFi-API-Browser

Image
0

10K+

ahmadnassri/unifi-api-browser repository overview

⁠UniFi API Browser

A Docker image for UniFi API Browser

license release size docker github

⁠UniFi-API-Browser

A Docker image for UniFi API Browser⁠

This tool is for browsing data that is exposed through Ubiquiti's UniFi Controller API, written in PHP, JavaScript and the Bootstrap CSS framework.

The API Browser lets you pull raw, JSON formatted data from the API running on your controller.

⁠Environment Variables

VariableRequiredDefaultDescription
CONTROLLER_IP✅IP address of the Unifi Controller
CONTROLLER_PASS✅the password for access to the Unifi Controller
CONTROLLER_USER✅the user name for access to the Unifi Controller. NOTE: use a 'Local Access' account, not a 'Ubiquiti Account'.
CONTROLLER_PORT❌443Port if you changed the port UniFi is running on
CONTROLLER_NAME❌UniFi Controllername for this controller which will be used in the dropdown menu
DEBUG❌falseset to 'true' (without quotes) to enable debug output to the browser and the PHP error log when fetching the sites collection after selecting a controller
UI_AUTH❌falseenable/disable authentication
UI_NAVBAR_BG_CLASS❌darkclass for the main navigation bar background, valid options are: primary, secondary, success, danger, warning, info, light, dark, white, transparent
UI_NAVBAR_CLASS❌darkclass for the main navigation bar, valid options are: light, dark
UI_PASS❌sha512(admin)Generate a SHA512 of the password you want and put here, you can use a tool like https://sha512.online/⁠ by default the password is 'admin'
UI_THEME❌darklyyour default theme of choice, pick one from the list below: bootstrap, cerulean, cosmo, cyborg, darkly, flatly, journal, lumen, paper readable, sandstone, simplex, slate, spacelab, superhero, united, yeti
UI_USER❌adminusername to secure the API Browser instance

⁠Usage

To get started this is the minimum number of options:

docker run \
  --name unifi-api-browser \
  --publish 8000:8000 \
  --env CONTROLLER_IP= \
  --env CONTROLLER_PASS= \
  --env CONTROLLER_USER= \
  ahmadnassri/unifi-api-browser

The container will run on port 8000 by default.

⁠Connecting to Multiple UniFi Controllers

Unifi-API-Browser supports multiple controllers. To use them create a copy of users-tempalte.php and config-template.php and mount them as volumes:

docker run \
  --name unifi-api-browser \
  --publish 8000:8000 \
  --env CONTROLLER_IP= \
  --env CONTROLLER_PASS= \  
  --env CONTROLLER_USER= \
  -v <HostPath>/config.php:/app/config/config.php \
  -v <HostPath>/users.php:/app/config/users.php \
  ahmadnassri/unifi-api-browser

Author: Ahmad Nassri⁠ • Twitter: @AhmadNassri⁠

Tag summary

Content type

Image

Digest

sha256:a8788b3c5…

Size

16.6 MB

Last updated

10 months ago

docker pull ahmadnassri/unifi-api-browser