Article #: KA-04160
Published: 04/06/2026
Last reviewed: 04/30/2026
How to install FreeRADIUS on Linux (Ubuntu)
Description
FreeRadius is a free open source RADIUS server, designed to provide centralized Authentication, authorization and accounting (AAA) for network access.Introduction
FreeRADIUS is the most widely used RADIUS server in the world. It powers most major internet service providers and telecomunication companies and it is the number one choice in the datacenter for authentication.Purpose
The purpose of this aricle is to provide the end-user with a comprehensive step by step guide in how to install FreeRADIUSRequirements
- Ubuntu 20.04, 22.04 or newer
- Sudo/root access
- Internet access
- Comprehensive knowledge of the vi editor or nano
Procedure
The procedure is executed using the command line installation, all commands are depicted exactly as they should be executed (in bold) in the user’s terminal.- Update the system to the latest version
- Install FreeRADIUS (latest version available from the repository)
- Verify installation
- (Optional) Install the absolute latest version of FreeRADIUS
curl -fsSL https://packages.freeradius.org/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/freeradius.gpg
- Add repository
- Update and install
sudo apt install freeradius freeradius-utils -y
- Directory structure (This is just an overview; no commands are executed in this step)
| Path | Purpose |
| /etc/freeradius/3.0/ | Main configuration |
| /etc/freeradius/3.0/clients.conf | RADIUS clients |
| /etc/freeradius/3.0/users | Test users |
| /var/log/freeradius/ | Logs |
- Run FreeRADIUS in Debug mode (shows real-time logs and helps with troubleshooting)
If you see the following message, then it is working correctly
Ready to process requests
- Configure a client, edit the users file
- In the user's file, add the clients, where ipaddr is the IP address of the client (PDU/UPS) and secret is the shared key
ipaddr = 127.0.0.1
secret = testing123
}
- Test authentication
radtest testuser password123 127.0.0.1 0 testing123
Expected result
Access-Accept
- Enable and start the service
sudo systemctl enable freeradius
sudo systemctl start freeradius
- Check status
- Firewall configuration (if ufw firewall is installed)
sudo ufw allow 1813/udp
Troubleshooting
- Port already in use → Stop existing service before debug
- Permission errors → Ensure correct file ownership
- Client not defined → Check clients.conf
- Authentication fails → Verify shared secret & user config
