MirrorNest
← Todas las guías

RadiusDesk

RadiusDesk is an open-source, web-based management front end for FreeRADIUS, used to run hotspots and manage network access for routers/APs (MikroTik, CoovaChilli, and more) from one dashboard.

Sistema: Ubuntu 22.04 LTSNetworkingRADIUSSitio oficial ↗Documentación oficial ↗
Esta guía se elaboró a partir de la documentación oficial de RadiusDesk, enlazada arriba — verifica siempre ahí los nombres exactos de paquetes/versiones antes de ejecutar estos comandos en un servidor de producción, ya que las versiones de la distribución y del proyecto cambian con el tiempo.
  1. 1Start from a clean Ubuntu 22.04 server

    RadiusDesk's official guide assumes a fresh install with no Apache already present — it uses Nginx, not Apache, in the current documented setup.

    sudo apt-get update
    sudo apt-get upgrade -y
  2. 2Install Nginx

    sudo apt-get -y install language-pack-en-base
    sudo apt-get -y install nginx
    sudo systemctl enable nginx
    sudo systemctl restart nginx
  3. 3Install PHP 8.3

    RadiusDesk's current release targets PHP 8.3 via the Ondřej Surý PPA, since Ubuntu 22.04's own default PHP version is older.

    sudo apt install software-properties-common -y
    sudo add-apt-repository ppa:ondrej/php -y
    sudo apt install php8.3 php8.3-fpm -y
    sudo systemctl enable php8.3-fpm
    sudo systemctl start php8.3-fpm

    You still need to edit /etc/nginx/sites-enabled/default afterward: add index.php to the index line, and uncomment the PHP-FPM location block pointing at unix:/var/run/php/php8.3-fpm.sock — see the official docs for the exact block.

  4. 4Install MariaDB (not stock MySQL)

    The official docs specifically call out that Ubuntu 22.04's default MySQL package causes problems with RadiusDesk — MariaDB is used instead.

    sudo apt-get -y install mariadb-server php8.3-mysql
    sudo systemctl enable mariadb
    sudo systemctl restart mariadb
  5. 5Configure MariaDB for RadiusDesk

    Disable strict SQL mode and enable the event scheduler — both are required for RadiusDesk to work correctly.

    echo '[mysqld]\nsql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' | sudo tee /etc/mysql/conf.d/disable_strict_mode.cnf
    echo '[mysqld]\nevent_scheduler=on' | sudo tee /etc/mysql/conf.d/enable_event_scheduler.cnf
    sudo systemctl restart mariadb
  6. 6Install remaining PHP extensions and clone RadiusDesk

    sudo apt-get -y install php8.3-cli php8.3-mysql php8.3-gd php8.3-curl php8.3-xml php8.3-mbstring php8.3-intl php8.3-sqlite3 git wget
    sudo systemctl restart php8.3-fpm
    cd /var/www
    sudo git clone https://github.com/RADIUSdesk/rdcore.git
    sudo git clone https://github.com/RADIUSdesk/rd_cake5.git
    sudo git clone https://github.com/RADIUSdesk/rd_mobile.git
  7. 7Link the application into the web root

    cd /var/www/html
    sudo ln -s ../rdcore/rd ./rd
    sudo ln -s ../rd_cake5 ./cake4
    sudo ln -s ../rd_cake5 ./cake3
    sudo ln -s ../rdcore/login ./login
    sudo ln -s ../rdcore/AmpConf/build/production/AmpConf ./conf_dev
    sudo ln -s ../rd_cake5/rd_cake/setup/scripts/reporting ./reporting
    sudo ln -s ../rd_mobile/build/production/RdMobile ./rd_mobile
  8. 8Create required directories and set ownership

    sudo mkdir -p /var/www/html/cake4/rd_cake/logs
    sudo mkdir -p /var/www/html/cake4/rd_cake/webroot/files/imagecache
    sudo mkdir -p /var/www/html/cake4/rd_cake/tmp
    sudo chown -R www-data. /var/www/html/cake4/rd_cake/tmp
    sudo chown -R www-data. /var/www/html/cake4/rd_cake/logs
    sudo chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/realms
    sudo chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/dynamic_details
    sudo chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/dynamic_photos
    sudo chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/access_providers
    sudo chown -R www-data. /var/www/html/cake4/rd_cake/webroot/img/hardwares
    sudo chown -R www-data. /var/www/html/cake4/rd_cake/webroot/files/imagecache
  9. 9Create the database and import the schema

    sudo mysql_tzinfo_to_sql /usr/share/zoneinfo | sudo mysql -u root mysql
    sudo mysql -u root -e "create database rd; GRANT ALL PRIVILEGES ON rd.* to 'rd'@'127.0.0.1' IDENTIFIED BY 'rd'; GRANT ALL PRIVILEGES ON rd.* to 'rd'@'localhost' IDENTIFIED BY 'rd';"
    sudo mysql -u root rd < /var/www/html/cake4/rd_cake/setup/db/rd.sql

    Change the 'rd' database password from the example before using this on a real network-facing server.

  10. 10Add the RadiusDesk location blocks to Nginx

    Edit /etc/nginx/sites-enabled/default and add these blocks under the existing server_name section, then reload Nginx.

    sudo nano /etc/nginx/sites-enabled/default
    sudo systemctl reload nginx

    location /cake4/rd_cake/node-reports/submit_report.json { try_files $uri $uri/ /reporting/reporting.php; } location /cake4/rd_cake { rewrite ^/cake4/rd_cake(.+)$ /cake4/rd_cake/webroot$1 break; try_files $uri $uri/ /cake4/rd_cake/index.php$is_args$args; }

  11. 11Install FreeRADIUS and its dependencies

    sudo apt-get -y install libdatetime-perl libdbd-mysql-perl libdigest-hmac-perl eapoltest libdatetime-format-rfc3339-perl
    sudo apt-get -y install freeradius freeradius-mysql
  12. 12Replace the default FreeRADIUS config with RadiusDesk's own

    RadiusDesk ships a pre-built, matching FreeRADIUS configuration (raddb equivalent) inside its own repo — this replaces the stock config entirely rather than editing it by hand.

    sudo systemctl stop freeradius
    sudo mv /etc/freeradius /etc/freeradius.orig
    sudo tar xzf /var/www/html/cake4/rd_cake/setup/radius/freeradius-radiusdesk.tar.gz --directory /etc
    sudo chown -R freerad. /etc/freeradius/3.0/
    sudo mkdir /var/run/freeradius
    sudo chown freerad. /var/run/freeradius
  13. 13Set the dynamic-clients shared secret

    Edit /etc/freeradius/3.0/sites-enabled/dynamic-clients and change FreeRADIUS-Client-Secret from the placeholder 'testing123' to your own secret — this is what your routers/APs authenticate to FreeRADIUS with.

    sudo nano /etc/freeradius/3.0/sites-enabled/dynamic-clients
  14. 14Fix known systemd/tmpfiles issues before starting

    The official docs note the stock freeradius.service unit and tmpfiles config need two small fixes on Ubuntu 22.04, or the service fails to start.

    sudo nano /lib/systemd/system/freeradius.service
    sudo nano /usr/lib/tmpfiles.d/freeradius.conf
    sudo systemctl daemon-reload

    In freeradius.service, comment out the EnvironmentFile and ExecStartPre lines. In tmpfiles.d/freeradius.conf, add: d /run/freeradius 750 freerad freerad -

  15. 15Start FreeRADIUS and set up the cron job

    sudo systemctl enable freeradius
    sudo systemctl restart freeradius
    sudo systemctl status freeradius
    sudo cp /var/www/html/cake4/rd_cake/setup/cron/rd_cake5 /etc/cron.d/
  16. 16Log in

    Open the web UI and log in, then change the default password immediately.

    UI: http://your-server-ip/rd/build/production/Rd/ — default login is root / admin. Mobile UI is at http://your-server-ip/rd_mobile.