Repository navigation
Home
Welcome to the RadiusStack Wiki! This guide covers everything from deployment to daily administration.
RadiusStack is a powerful, self-contained AAA (Authentication, Authorization, and Accounting) platform built on FreeRADIUS 3, MariaDB, and a custom Node.js API backend. It removes the steep learning curve traditionally associated with FreeRADIUS by providing an intuitive Web UI and a fully documented REST API.
It supports EAP (PEAP + TTLS) with PAP, CHAP and MSCHAPV2 out of the box, suitable for WIFI (WPA-Enterprise) authentication, and is pre-configured to copy reply attributes from the inner to outer packet for NAS visibility, e.g dynamic VLAN assignment.
The system relies on Docker containers, ensuring clean isolation and high portability across any host machine.
Instead of using custom container images, the platform is purposfully built using official container images. Initialization and container configuration is performed during deployment. The platfom conisits of 5 containers which are all deployed using a single docker compose script. Containers can be upgraded in-place by re-running the docker compose script.
- Radius Server: The freeradius version 3.x server.
- Database Server: MariaDB server. Used by the radius server and API server.
- PHPMyAdmin: A web frontend for direct managment access to the backend database. Warning - access to this serivice should be restrried
- Node.js APi Server: The backend API server
- WebUI: The WebUI frontend. All the functions in the WebUI are API calls via the API server.
- Docker and Docker Compose installed.
- Tested on Debain, Ubuntu, Centos and AlmaLinux. But should work on any OS because its all contained in Docker.
- Clone the repository to your host machine:
git clone https://github.com/deangoldhill/RadiusStack.git cd RadiusStack - Edit
container_config.envto set your desired exposure ports, passwords and token key. - Bring the stack online:
docker compose --env-file container_config.env up -d --build
- Access the Web UI at
http://<your-server-ip>. - Login with the default credentials (
admin/admin).
The Users module allows you to create users and assign profiles and usage plans.
TOTP (Multi-Factor Authentication):
- RadiusStack supports adding TOTP (e.g., Google Authenticator) to RADIUS users on a per user basis (TOTP only supports PAP authentication).
- To Enable: Toggle the TOTP switch next to a user. The UI will instantly generate a one-time registration code and a secure registration URL.
- Registration: Provide the user with the URL and code. They will log in via the web portal using their standard RADIUS password + the one-time code to receive their scannable QR Code. *By default the registration code is valid for 24 hours, but can be modified in the settings page.
-
Authentication: Once registered, the user authenticates by appending their 6-digit TOTP code directly to the end of their normal password (e.g.,
password123456). *Users without TOTP enabled will be able to login with just their username and password. Therefore, it is highly recomended users without TOTP (e.g. for WIFI authenticaiton) be assigned to a profile restricted by NAS IP (Access Points) otherwise a brute force attack may still be possible for these users. *Note - The freeRadius TOTP module only works with PAP because the radius server needs to see the code in order to validate it against the TOTP key on record. It will not work with a challange password protocol. It will still work with EAP but only when using PAP as the password protocol.
Profiles act as permission groups for your users. Instead of configuring attributes for every single user, you create a Profile and assign users to it.
- VLAN assignment: specify a VLAN ID. All supporting attributes for dynamic VLAN assignment will automatically be added.
-
Reply Attributes: You can inject any standard FreeRADIUS dictionary attribute (e.g.,
Filter-Id,acct-interim-interval, Vendor-Specific). Select form a list of commonly used attributes or add additional attributes to the list via the settings page. - NAS Restrictions: You can optionally lock a profile so its users can only authenticate from a list of specific NAS IP addresses. *In a standard radius deployment, only 1 NAS-IP-Address check attribute can be specified. But RadiusStack uses a custom ULANG policy that allows multiple IP addresses to be listed in the profile, a match of any one will be accepted.
Usage plans enforce strict data and or time limits on user sessions.
- Data/Time Caps: Define limits such as "10 GB data" or "24 hours connection time".
-
Reset Cycles: Set plans to reset automatically (
daily,monthly) ornever. - If a user breaches their limit, RadiusStack will dynamically reject their Access-Requests until the cycle resets.
- Manually reset usage cycle in the users page.
The NAS (Network Access Server) module defines which network devices are permitted to query RadiusStack.
- Add switches, firewalls, or Wi-Fi access points by IP address.
- Set a strong, shared
Secretkey which must be mirrored on the client device. - FreeRadius service must be restarted when adding/modifying NAS clients, via them settings page.
The Admins tab manages who has access to the RadiusStack Web UI and REST API.
- Granular Permissions: Restrict admins to specific modules (e.g., allow an admin to manage Users, but not profiles and Settings) Grant read-only or read-write permission.
-
2FA Enforcement: You can toggle 2FA on a per-admin basis. Alternatively, navigate to Settings and check
Enforce 2FA for all Administratorsto mandate security globally. When an admin with 2FA enabled logs in for the first time, they will be forced to register 2FA. -
API Keys: Every admin has a unique
X-API-Keythat can be regenerated at any time for programmatic access. *Note - when an API key is regenerated, the webui session will be terminated because the webui uses the API key to communicate with the backend API.
For advanced 802.1X enterprise network deployments (like WPA2-Enterprise), FreeRADIUS requires TLS certificates. *Upon deployment, a 10 year certificate will be generated.
- Auto-Generate: Navigate to the Settings tab and fill out the form to have the backend automatically generate a self-signed root CA and Server certificate.
- CA cert download: to avoid the trust prompt on the client device, download and install the root CA certificate
- Custom certificate Upload: You can upload your own pre-signed private key and server certificate.
- Changes to certificates automatically trigger a safe restart of the RADIUS container to apply the new keys.
Located in the Settings page. Backup is exported in JSON format with two options
- Full Backup: Generates a full database backup including all objects, settings and accounting / authenticaton / audit logs. *Note - full backups may fail to restore if imported to a different version as the database schema may be different.
- Object Backup: Generates a partial backup of users, profiles, plans and NAS clients. and optionally include accounting / authenticaton / audit logs. This contains most of the data needed to restore the server.
- The partial backup should safely import to different versions because the structure of these tables should never change.
- Backup Restore: Upload a previously generated backup. RadiusStack intelligently maps the columns, ignoring obsolete schemas to prevent database crashes when upgrading to newer server versions.
- Dashboard: The dashboard show most recent active sessions authenticaiton logs. Click an active session to view full details of the session.
- Auth Log: View Authentication logs with search capability. This log will also show authentication attempts of unknown users.
- **Accounting: View accounting records both active and closed. Filter by username, NAS client and date/time range. Click an accounting record to view full details. *You can also purge accounting records for the specified filter scope.
- Audit Log: The Audit Log tracks every action taken by Administrators (creations, deletions, setting changes). It shows the origin (webUI, API, System), result (success, failed, denied) and action attempted. *Filter by date range, result or search for action keywords.
- Reports: The top of the reports page shows the heaviest users by data usage and session time. *The failed authetnication report lists unique users with failed authentication by count, useful for detecting brute force attacks. *The user-specific report generates a detailed report of activity for a specific user including top sesssions, total requests, total data and session time for the specified date range.
- **Container logs: All containers are configured to redirect service logs to the container logs. View the container logs from the settings page.
- ** API schema:** The API Docs page lists the entire API schema
- Interactive API Tester: Click one of the API endpoints to pre-populate the tester with the correct URL and modifiable sample data. Optionally generate a curl command to test the API call from a different host. *The API tester automatically uses the API key for the logged in administrator