etiennecollin/unifi-voucher-manager
حول
A touch-friendly and secure interface for streamlined creation and management of guest Wi-Fi vouchers on UniFi controllers.
تطوير الويب والتطبيقاتما يمكنك فعله
- Docker Ready - Easy deployment with Docker Compose and included healthcheck
- UniFi Integration - Direct API connection to UniFi controllers
- Secure Architecture - Next.js (TypeScript + Tailwind CSS) frontend with an Axum-based Rust backend that handles all UniFi Controller communication, keeping credentials isolated from the user-facing UI
النمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- +٢
- خلال 15 يومًا
- +٨٧
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلUniFi Voucher Manager
UVM is a modern, touch-friendly web application for managing WiFi vouchers on UniFi controllers. Perfect for businesses, cafes, hotels, and home networks that need to provide guest WiFi access.

✨ Features
Voucher Management & WiFi QR Code
- Multiple Sites - Manage multiple UniFi sites with the same UVM instance
- Browse Vouchers - Browse and search existing vouchers by name
- Bulk Operations - Select and delete multiple vouchers at once
- Print Vouchers - Print vouchers in either list or grid format; thermal printers friendly
- Quick Create - Generate guest vouchers with preset durations (1 hour to 1 week)
- Custom Create - Full control over voucher parameters:
- Custom name
- Duration (minutes to days)
- Guest count limits
- Data usage limits
- Upload/download speed limits
- Auto-cleanup - Remove expired vouchers with a single click
- QR Code - Easily connect guests to your network
- Rolling Vouchers - Automatically generate a voucher for the next guest when the current one gets used
![]() |
![]() |
![]() |
![]() |
Kiosk Display
The kiosk page (/kiosk) provides a guest-friendly interface displaying:
- QR Code: For easy network connection (if configured in Environment Variables)
- Current Voucher: The active rolling voucher code
- Real-time Updates: Automatically refreshes when the rolling voucher changes

Modern Interface
- Touch-Friendly – Optimized for tablet, mobile, and desktop
- Dark/Light Mode – Follows system preference, with manual override
- Responsive Design - Works seamlessly across all screen sizes
- Smooth Animations – Semantic transitions for polished UX
- Real-time Notifications - Instant feedback for all operations
- Custom SVG Logo - Display your own logo on the main page
Technical Features
- Docker Ready - Easy deployment with Docker Compose and included healthcheck
- UniFi Integration - Direct API connection to UniFi controllers
- Secure Architecture - Next.js (TypeScript + Tailwind CSS) frontend with an Axum-based Rust backend that handles all UniFi Controller communication, keeping credentials isolated from the user-facing UI
🚀 Quick Start
Using Docker Compose (Recommended)
- Create the configuration files
# Download the compose file curl -o compose.yaml https://raw.githubusercontent.com/etiennecollin/unifi-voucher-manager/main/compose.yaml - Configure your environment
- Set the required environment variables (see Environment Variables) in the
compose.yamlfile.
- Set the required environment variables (see Environment Variables) in the
- Start the application
docker compose up -d --force-recreate - Access the interface
- Open your browser to
http://localhost:3000.
- Open your browser to
Without Docker
Install the dependencies (older versions may work, but are not tested)
rust >= 1.98.0nodejs >= 26.13.0npm >= 12.2.2
Clone the repository
git clone https://github.com/etiennecollin/unifi-voucher-managerConfigure your environment
- In your shell, set the required environment variables (see Environment Variables)
or set them in a
.envfile at the root of the repository and use thedotenvfeature of the rust backend.
- In your shell, set the required environment variables (see Environment Variables)
or set them in a
Start the frontend and backend
# Backend (without using a .env file) cd backend && cargo run --release # Backend (using a .env file) cd backend && cargo run --release --features dotenv # Frontend (development) cd frontend && npm install && npm run dev # Frontend (release) cd frontend && npm ci && npm run build && npm run startAccess the interface
- Open your browser to
http://localhost:3000orhttp://127.0.0.1:3000.
- Open your browser to
⚙️ Configuration
Getting UniFi API Credentials
- Access your UniFi Controller
- Navigate to Settings -> Control Plane -> Integration
- Create a new API key by giving it a name and an expiration.
Rolling Vouchers and Kiosk Page
Rolling vouchers provide a seamless way to automatically generate guest network access codes. When one voucher is used, a new one is automatically created for the next guest.
[!IMPORTANT] Setup Required
For rolling vouchers to work properly, you must configure your UniFi Hotspot:
- Go to your UniFi Controller -> Insights -> Hotspot
- Set the Success Landing Page to:
https://your-uvm-domain.com/welcome, the/welcomepage of UVMWithout this configuration, vouchers will not automatically roll when guests connect.
[!CAUTION] To restrict UVM access to the guest subnetwork users while still allowing access to
/welcomepage, set theGUEST_SUBNETWORKenvironment variable. This makes sure guests do not have access to other UVM pages, such as the voucher management interface (the root/page).Without this configuration, guests will be able to access the voucher management interface of UVM. This means they will be able to both create and delete vouchers by themselves.
How Rolling Vouchers Work
- Initial Setup: Rolling vouchers are generated automatically when needed
- Guest Connection: When a guest connects to your network, they're redirected to the
/welcomepage - Automatic Rolling: The welcome page triggers the creation of a new voucher for the next guest
- Rolling vouchers are created with special naming conventions to distinguish them from manually created vouchers, making them easy to identify in your voucher management interface
- IP-Based Uniqueness: Each IP address can only generate one voucher per session (prevents abuse from page reloads)
- Daily Maintenance: To prevent clutter, expired rolling vouchers are automatically deleted at midnight (based on your configured
TIMEZONEin Environment Variables)
QR Code
For the WiFi QR code to be displayed, you are required to configure the WIFI_SSID and WIFI_PASSWORD variables. See Environment Variables.
Custom SVG Logo
To display your own custom logo:
- If you are using docker, simply mount the SVG file in the container at
/app/frontend/public/logo.svg. An example is in./compose.yaml.- The mount destination (including the file name) CANNOT BE CHANGED.
- If you are not using docker, place the SVG file in
./frontend/public/logo.svg.- The path to the logo (including the file name) CANNOT BE CHANGED.
See IS_LOGO_INVERTIBLE in the Environment Variables to configure whether the logo's colours should be "inverted" when switching between light and dark mode.
Environment Variables
Make sure to configure the required variables. The optional variables generally have default values that you should not have to change.
[!IMPORTANT] Make sure to read what the environment variables are doing. Some variables are required, they are placed at the top of the list.
UNIFI_CONTROLLER_URL:string(Required)- Description: URL to your UniFi controller with protocol (
http://orhttps://). - Example (Local):
https://unifi.example.comorhttps://192.168.8.1:443 - Example (Remote):
https://api.ui.com/v1/connector/consoles/<consoleId>, where<consoleId>can be found in the URL on unifi.ui.com after selecting your console.
- Description: URL to your UniFi controller with protocol (
UNIFI_API_KEY:string(Required)- Description: API key used to authenticate with your UniFi controller.
- Local connection: Create the API key from the Integrations tab in your local console's Network application.
- Remote connection (via
api.ui.com): Create the API key through the UniFi Site Manager. Ensure the key has access to the Network application and all specific sites you intend to manage.
- Example:
abc123...
- Description: API key used to authenticate with your UniFi controller.
[!WARNING] Improperly setting the
UNIFI_HAS_VALID_CERTvariable will prevent UVM from communicating with the UniFi controller.
UNIFI_HAS_VALID_CERT:bool(Optional)- Description: Whether your UniFi controller uses a valid SSL certificate. This should normally be set to
true, especially if you access the controller through a reverse proxy or another setup that provides trusted certificates (e.g., Let's Encrypt). If you connect directly to the controller’s IP address (which usually serves a self-signed certificate), you may need to set this tofalse. - Example:
true(default)
- Description: Whether your UniFi controller uses a valid SSL certificate. This should normally be set to
UNIFI_SITES:JSON object(Optional)- Description: A list of UniFi sites to manage. If omitted, all available sites are managed.
nameshall contain a non-empty string representing a user-defined site name.idshall either bedefault, in which case default site configured in your UniFi controller, or a valid UniFi site identifier.
- Example:
[{"name":"Default","id":"default"}](default) - Example:
[{"name":"Site 1","id":"site-1-id"},{"name":"Site 2","id":"site-2-id"}]
- Description: A list of UniFi sites to manage. If omitted, all available sites are managed.
[!NOTE] A site ID should have this format
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.If you are unable to find your site ID, you may run the following command to get it through the UniFi network API:
curl -k -X GET 'https://<your-unifi-controller-address>/proxy/network/integrations/v1/sites' -H 'X-API-KEY: <your-api-key>' -H 'Accept: application/json'Make sure to substitute the right address and API key.
BACKEND_BIND_HOST:IPv4(Optional)- Description: Address on which the server binds.
- Example:
127.0.0.1(default)
BACKEND_BIND_PORT:u16(Optional)- Description: Port on which the backend server binds.
- Example:
8080(default)
BACKEND_LOG_LEVEL:trace|debug|info|warn|error(Optional)- Description: Log level of the Rust backend.
- Example:
info(default)
FRONTEND_BIND_HOST:IPv4(Optional)- Description: Address on which the frontend server binds.
- Example:
0.0.0.0(default)
FRONTEND_BIND_PORT:u16(Optional)- Description: Port on which the frontend server binds.
- Example:
3000(default)
FRONTEND_TO_BACKEND_URL:URL(Optional)- Description: URL where the frontend will make its API requests to the backend.
- Example:
http://127.0.0.1(default)
[!CAUTION] To restrict UVM access to the guest subnetwork users while still allowing access to
/welcomepage, set theGUEST_SUBNETWORKvariable. This makes sure guests do not have access to other UVM pages, such as the voucher management interface (the root/page).Without this configuration, guests will be able to access the voucher management interface of UVM. This means they will be able to both create and delete vouchers by themselves.
GUEST_SUBNETWORK:IPv4 CIDR(Optional)- Description: Restrict guest subnetwork access to UVM while still permitting access to the
/welcomepage, which users are redirected to from the UniFi captive portal. For more details, see Rolling Vouchers and Kiosk Page. - Example:
10.0.5.0/24
- Description: Restrict guest subnetwork access to UVM while still permitting access to the
IS_LOGO_INVERTIBLE:bool(Optional)- Description: Whether the logo can/should be inverted in dark mode.
- Example:
false(default)
PRINT_CONFIG:JSON object(Optional)- Description: Controls which fields are included when printing vouchers. Any omitted fields default to
true. Keep in mind the string must contain valid JSON.- All values are
boolthat take either the valuetrueorfalse.
- All values are
- Example:
{"showName":true,"showLogo":true,"showDuration":true,"showMaxGuests":true,"showDataUsageLimit":true,"showRxRateLimit":true,"showTxRateLimit":true,"showId":true,"showPrintTime":true}(default)
- Description: Controls which fields are included when printing vouchers. Any omitted fields default to
PURGE_ALL_EXPIRED_VOUCHERS:bool(Optional)- Description: When
true, periodically purge all expired vouchers. Whenfalse, periodically only purge expired rolling vouchers. - Example:
false(default)
- Description: When
QUICK_VOUCHER_CONFIG:JSON object(Optional)- Description: Controls how vouchers created from the "Quick Create" tab are configured. Keep in mind the string must contain valid JSON.
authorizedGuestLimitshall either benull(unlimited) or a positive number between 1 and 1000 inclusively.dataUsageLimitMBytesshall either benull(unlimited) or a positive number between 1 and 1048576 inclusively.rxRateLimitKbpsandtxRateLimitKbpsshall either benull(unlimited) or a positive number between 2 and 100000 inclusively.
- Example:
{"authorizedGuestLimit":1,"dataUsageLimitMBytes":null,"rxRateLimitKbps":null,"txRateLimitKbps":null}(default) - Example:
{"authorizedGuestLimit":10,"dataUsageLimitMBytes":1024,"rxRateLimitKbps":30720,"txRateLimitKbps":10240}
- Description: Controls how vouchers created from the "Quick Create" tab are configured. Keep in mind the string must contain valid JSON.
ROLLING_VOUCHER_DURATION_MINUTES:minutes(Optional)- Description: Number of minutes a rolling voucher will be valid for once activated.
- Example:
480(default)
TIMEZONE:timezone identifier(Optional)- Description: Timezone identifier used to format dates and time.
- Example:
UTC(default)
WIFI_HIDDEN:bool(Optional)- Description: Whether the WiFi SSID is hidden or broadcasted.
- Example:
false(default)
WIFI_PASSWORD:string(Optional)- Description: WiFi password used for the QR code. If the WiFi network does not have a password, set to an empty string
"". (required for QR code to be generated) - Example:
My WiFi Password
- Description: WiFi password used for the QR code. If the WiFi network does not have a password, set to an empty string
WIFI_SSID:string(Optional)- Description: WiFi SSID used for the QR code. (required for QR code to be generated)
- Example:
My WiFi SSID
WIFI_TYPE:WPA|WEP|nopass(Optional)- Description: WiFi security type used. Defaults to
WPAif a password is provided andnopassotherwise. - Example:
WPA
- Description: WiFi security type used. Defaults to
🐛 Troubleshooting
Common Issues
- Vouchers not appearing or connection issue to UniFi controller
- Verify
UNIFI_CONTROLLER_URLis correct and accessible - Verify
UNIFI_HAS_VALID_CERTis correct (depending on whether yourUNIFI_CONTROLLER_URLhas a valid SSL certificate or not) - Check if the UniFi controller is running and reachable (DNS issues?)
- Ensure API key is valid
- Ensure the site has the hotspot/guest portal enabled
- Verify
- Application won't start
- Check all environment variables are set
- Verify Docker container has network access to UniFi controller
- Check logs:
docker logs unifi-voucher-manager
- The WiFi QR code button is disabled
- Check the Environment Variables section and make sure you configured the variables required for the WiFi QR code
- Check the browser console for variable configuration errors (generally by hitting
F12and going to the 'console' tab)
Getting Help
- Check the Issues page
- Create a new issue with detailed information about your problem
- Include relevant logs and environment details (redact sensitive information)
- Run the container/backend with
BACKEND_LOG_LEVEL="debug" - Include Docker logs:
docker logs unifi-voucher-manager - Include browser logs: generally by hitting
F12and going to the 'console' tab of your browser
- Run the container/backend with
⭐ If this project helped you, please consider giving it a star!
Disclaimer: This is an independent, unofficial project. It is not affiliated with, endorsed by, or sponsored by Ubiquiti Inc. UniFi, Ubiquiti, and all associated trademarks, logos, and intellectual property are the property of Ubiquiti Inc. Their use in this project is for identification and compatibility purposes only.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…



