Views:
 
 
 
 

 

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.
 
  1. Introduction
  2. Purpose
  3. Requirements
  4. Procedure
  5. Troubleshooting
 

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 FreeRADIUS

Requirements

  • 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.
 
  1. Update the system to the latest version
sudo apt update && sudo apt upgrade -y
 
  1. Install FreeRADIUS (latest version available from the repository)
sudo apt install freeradius freeradius-utils -y
 
  1. Verify installation
freeradius -v
 
  1. (Optional) Install the absolute latest version of FreeRADIUS
sudo apt install curl gnupg -y
curl -fsSL https://packages.freeradius.org/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/freeradius.gpg
 
  1. Add repository
echo "deb [signed-by=/usr/share/keyrings/freeradius.gpg] http://packages.freeradius.org/apt/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/freeradius.list
 
  1. Update and install
sudo apt update
sudo apt install freeradius freeradius-utils -y
 
  1. Directory structure (This is just an overview; no commands are executed in this step)
PathPurpose
/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
 
  1. Run FreeRADIUS in Debug mode (shows real-time logs and helps with troubleshooting)
sudo freeradius -X

If you see the following message, then it is working correctly
Ready to process requests
 
  1. Configure a client, edit the users file
vi /etc/freeradius/3.0/users
 
  1. 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
client localhost {
                                    ipaddr = 127.0.0.1
                                    secret = testing123
}

 
  1. Test authentication
Open a new terminal window (while debug mode is running), then run:
radtest testuser password123 127.0.0.1 0 testing123

Expected result
Access-Accept
 
  1. Enable and start the service
Stop debug mode (Ctrl-C), then:
sudo systemctl enable freeradius
sudo systemctl start freeradius
 
  1. Check status
sudo systemctl status freeradius
 
  1. Firewall configuration (if ufw firewall is installed)
sudo ufw allow 1812/udp
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