Skip to content

Manual installation

Overview

These steps apply to the latest release of RaspAP, Raspberry Pi OS Lite, Debian, Kali Linux and Armbian. Please refer to this regarding currently supported operating systems.

Alternatives

If your goal is to use RaspAP as a component of a larger project, or wish to isolate its dependencies from existing software on your system, consider deploying RaspAP in a Docker container instead.

Prerequisites

Start off by updating your system's package list, then upgrade the kernel, firmware and installed packages to their latest versions:

sudo apt-get update
sudo apt-get full-upgrade

Note that full-upgrade is used rather than a simple upgrade, as this also picks up any dependency changes that may have been made. The kernel and firmware are installed as a Debian package, and so will also get updates when using the procedure above. These packages are updated infrequently and after extensive testing.

Enable wireless operation

Telecommunications radio bands are subject to regulatory restrictions to ensure interference-free operation. The Linux OS complies with these rules by requiring users to configure a two-letter "WiFi country code". In RPi OS, 5 GHz wireless networking is disabled until this country code has been set, usually as part of the initial installation process. If you have not set your country code or are unsure, check the "WLAN Country" setting in raspi-config's Localisation Options:

sudo raspi-config

To ensure the WiFi radio is not blocked on the Raspberry Pi, execute the following command:

sudo rfkill unblock wlan

Non-RPi OS dependencies

Operating systems other than Raspberry Pi OS have some additional dependencies. If you are using RPi OS, skip this section.

On Debian and Kali Linux, install dhcpcd5, iw and rsync with the following:

sudo apt-get install dhcpcd5 iw rsync

On Armbian, install dhcpcd5 and net-tools:

sudo apt-get install dhcpcd5 net-tools

Armbian distributions do not include the isoquery dependency in their package repositories. Install it manually from the Debian package repository. On 64-bit Armbian, use the ARM64 package:

wget https://ftp.debian.org/debian/pool/main/i/isoquery/isoquery_3.3.4-1+b1_arm64.deb -P /tmp
sudo dpkg -x /tmp/isoquery_3.3.4-1+b1_arm64.deb /tmp/isoquery/
sudo cp /tmp/isoquery/usr/bin/isoquery /usr/local/bin/
sudo chmod +x /usr/local/bin/isoquery
isoquery -v

Note

On 32-bit Armbian, replace isoquery_3.3.4-1+b1_arm64.deb in the commands above with isoquery_3.3.4-1_armhf.deb. If you're using a different architecture, modify the URI used in wget accordingly.

The systemd-networkd and systemd-resolved services can't be used alongside RaspAP. In particular, systemd-resolved listens on port 53 and prevents dnsmasq from starting. If either service is running, stop and disable it:

sudo systemctl stop systemd-networkd systemd-resolved
sudo systemctl disable systemd-networkd systemd-resolved

Caution

On Armbian 23.11, perform the pre-install steps in the next section before disabling systemd-resolved, or name resolution will fail.

Armbian-specific steps

Note

This section concerns manual pre- and post-install steps required for the Armbian 23.11 (Jammy) release. They are not necessary with other distributions.

Disabling the systemd-resolved service listening on port 53 is required before installing dnsmasq. On Armbian 23.11 this results in a name resolution failure and the installation cannot continue. To resolve this, perform the following pre-install steps:

  1. Stop systemd-resolved with sudo systemctl stop systemd-resolved.service.
  2. Edit the systemd-resolved config file: sudo nano /etc/systemd/resolved.conf, un-hash and specify DNS=9.9.9.9 (for example) and set DNSStubListener=no. Save and exit the file.
  3. Symlink /etc/resolv.conf with sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf.
  4. Proceed with the RaspAP install as normal, disabling the systemd services as described above.

Post-install: The dnsmasq service will report errors such as "config error is REFUSED (EDE: not ready)". DNS 'A' record queries will fail and the AP will not be usable for clients. This is easily resolved with the following steps:

  1. Edit the dnsmasq configuration with sudo nano /etc/default/dnsmasq and un-hash IGNORE_RESOLVCONF=yes. Save and exit the file.
  2. Restart the dnsmasq service with sudo systemctl restart dnsmasq.service.

Your RaspAP install on Armbian should now function as expected.

Install packages

The PHP package depends on your operating system's release:

Release PHP package php.ini path
Debian 13 (trixie), Kali Linux 2025 php8.4-fpm /etc/php/8.4/fpm/php.ini
Debian 12 (bookworm), Armbian 23.05 php8.2-cgi /etc/php/8.2/cgi/php.ini
Debian 11 (bullseye) php7.4-cgi /etc/php/7.4/cgi/php.ini

Preseed the iptables-persistent prompts, then install git, lighttpd, PHP, hostapd, dnsmasq and some extra packages with the following, replacing php8.4-fpm with the package for your release:

echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections
sudo apt-get install lighttpd git hostapd dnsmasq iptables-persistent vnstat qrencode jq isoquery iso-codes curl dnsutils nmap php8.4-fpm

Note

iso-codes is only a recommended package of isoquery, so it isn't installed on systems that skip recommended packages, such as Armbian. Install it explicitly as shown above.

On Raspberry Pi OS 32- and 64-bit (Bookworm), install dhcpcd and dhcpcd-base:

sudo apt-get install dhcpcd dhcpcd-base

Enable PHP

Next, enable PHP for lighttpd and restart the service for the settings to take effect. If you installed a php*-fpm package, enable the fastcgi-php-fpm module and restart PHP-FPM, replacing php8.4-fpm with your installed version:

sudo lighttpd-enable-mod fastcgi-php-fpm
sudo systemctl restart php8.4-fpm.service

If you installed a php*-cgi package, enable the fastcgi-php module instead:

sudo lighttpd-enable-mod fastcgi-php

Then reload and restart lighttpd:

sudo service lighttpd force-reload
sudo systemctl restart lighttpd.service

Create the web application

In these steps we will prepare the web destination and git clone the files to /var/www/html.

Caution

If this is not a clean installation, be sure to move existing files or directories in the web root before executing the rm -rf command.

Begin by preparing the default web root location to host the application:

sudo rm -rf /var/www/html

Now, clone the source repository specifying the --recurse-submodules option to include git submodules, then update the plugins submodule by pulling the latest changes from its upstream repository:

sudo git clone --recurse-submodules https://github.com/RaspAP/raspap-webgui /var/www/html
sudo git -C /var/www/html submodule update --remote plugins

Copy an extra lighttpd config file to support application routing. This step requires some text substitutions to support user changes to lighttpd's server.document-root setting:

WEBROOT="/var/www/html"
CONFSRC="$WEBROOT/config/50-raspap-router.conf"
LTROOT=$(grep "server.document-root" /etc/lighttpd/lighttpd.conf | awk -F '=' '{print $2}' | tr -d " \"")

HTROOT=${WEBROOT/$LTROOT}
HTROOT=$(echo "$HTROOT" | sed -e 's/\/$//')
awk "{gsub(\"/REPLACE_ME\",\"$HTROOT\")}1" $CONFSRC > /tmp/50-raspap-router.conf
sudo cp /tmp/50-raspap-router.conf /etc/lighttpd/conf-available/

Link it into conf-enabled and restart the web service:

sudo ln -s /etc/lighttpd/conf-available/50-raspap-router.conf /etc/lighttpd/conf-enabled/50-raspap-router.conf
sudo systemctl restart lighttpd.service

Next, copy RaspAP's primary configuration file into place:

cd /var/www/html
sudo cp config/config.php includes/config.php

Now comes the fun part. For security reasons, the www-data user which lighttpd runs under is not allowed to start or stop daemons, or run commands like ip link, all of which we want our app to do. So we will add the www-data user to sudoers, but with restrictions on what commands the user can run. Copy the sudoers rules to their destination, restrict the file's permissions and check its syntax:

sudo cp installers/raspap.sudoers /etc/sudoers.d/090_raspap
sudo chmod 0440 /etc/sudoers.d/090_raspap
sudo visudo -cf /etc/sudoers.d/090_raspap

The remaining steps assume that your current directory is /var/www/html.

Configuration directories

RaspAP uses several directories to manage its own configuration. Create these with the following command:

sudo mkdir -p /etc/raspap/{backups,networking,hostapd,lighttpd,openvpn,system,adblock,plugins}

Note

Create every directory listed above, even for features you don't plan to install. The www-data user is permitted to run the scripts in these directories with sudo, so they must exist and belong to root. Otherwise www-data could create one of them and place its own scripts there.

Set permissions

Set ownership of the web files and backups directory to the www-data user:

sudo chown -R www-data:www-data /var/www/html
sudo chown -R www-data:www-data /etc/raspap/backups

The script directories must be owned by root, so that www-data can't rename, replace or delete the scripts it runs with sudo:

sudo chown root:root /etc/raspap/{hostapd,lighttpd,openvpn,system,adblock,plugins}
sudo chmod 755 /etc/raspap/{hostapd,lighttpd,openvpn,system,adblock,plugins}

The web interface keeps its own files in /etc/raspap and /etc/raspap/networking, so www-data may create files there. The sticky bit prevents it from renaming or deleting entries owned by root:

sudo chown root:www-data /etc/raspap /etc/raspap/networking
sudo chmod 1775 /etc/raspap /etc/raspap/networking

Important

Do not run chown -R www-data:www-data /etc/raspap. This would let www-data replace scripts that it runs as root.

Control scripts

RaspAP uses several shell scripts to manage various aspects of the application, including hostapd service control, debug logging, plugins and the lighttpd port. Copy these scripts to their destinations:

sudo cp installers/servicestart.sh /etc/raspap/hostapd/
sudo cp installers/debuglog.sh /etc/raspap/system/
sudo cp installers/raspbian.sh /etc/raspap/system/
sudo cp installers/plugin_helper.sh /etc/raspap/plugins/
sudo cp installers/configport.sh /etc/raspap/lighttpd/

Restrict the scripts to the root user:

sudo chown -c root:root /etc/raspap/{hostapd,system,plugins,lighttpd}/*.sh
sudo chmod 750 /etc/raspap/{hostapd,system,plugins,lighttpd}/*.sh

System helpers

Several helper scripts are run by root, either by systemd, udev or by www-data with sudo. They are installed in /usr/local/sbin, a directory that only root can change:

sudo install -o root -g root -m 755 installers/raspap-iptables-save.sh /usr/local/sbin/raspap-iptables-save.sh
sudo install -o root -g root -m 755 installers/settime.sh /usr/local/sbin/raspap-settime.sh
sudo install -o root -g root -m 755 installers/webaccess.sh /usr/local/sbin/raspap-webaccess.sh
sudo install -o root -g root -m 755 installers/nm-wifi.sh /usr/local/sbin/raspap-nm-wifi.sh
sudo install -o root -g root -m 755 installers/udev-rules.sh /usr/local/sbin/raspap-udev-rules.sh
sudo install -o root -g root -m 755 installers/vnstat.sh /usr/local/sbin/raspap-vnstat.sh
sudo install -o root -g root -m 755 installers/toggle-routing.sh /usr/local/sbin/raspap-toggle-routing.sh
sudo install -o root -g root -m 755 installers/uplink-watchdog.sh /usr/local/sbin/raspap-uplink-watchdog.sh

Install the uplink watchdog's systemd units. The timer is disabled by default and may be enabled from RaspAP's UI:

sudo install -o root -g root -m 644 installers/raspap-uplink-watchdog.service /etc/systemd/system/raspap-uplink-watchdog.service
sudo install -o root -g root -m 644 installers/raspap-uplink-watchdog.timer /etc/systemd/system/raspap-uplink-watchdog.timer

vnstat only monitors the interfaces that exist when it is installed. Add the interfaces that RaspAP configures with the following:

sudo /usr/local/sbin/raspap-vnstat.sh sync

Services

Install RaspAP's hostapd@.service template:

sudo cp installers/hostapd@.service /etc/systemd/system/

Next, copy the raspapd control service file to the correct location and enable it:

sudo cp installers/raspapd.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable raspapd.service

Default configuration

To facilitate a faster setup, RaspAP uses a "known-good" default configuration as a starting point. Copy the configuration files for dhcpcd, dnsmasq, hostapd and defaults.json. Optionally, backup your existing hostapd.conf first:

sudo cp /etc/hostapd/hostapd.conf ~/hostapd.conf.old
sudo mkdir -p /etc/dnsmasq.d
sudo cp config/hostapd.conf /etc/hostapd/hostapd.conf
sudo cp config/090_raspap.conf /etc/dnsmasq.d/090_raspap.conf
sudo cp config/090_wlan0.conf /etc/dnsmasq.d/090_wlan0.conf
sudo cp config/dhcpcd.conf /etc/dhcpcd.conf
sudo cp config/defaults.json /etc/raspap/networking/
sudo chown www-data:www-data /etc/raspap/networking/defaults.json

The default hostapd.conf uses the GB country code. Set it to the WiFi country you configured above, replacing US with your two-letter code:

sudo sed -i "s/^country_code=.*/country_code=US/" /etc/hostapd/hostapd.conf

Tip

If you wish to modify RaspAP's default configuration for dnsmasq and dhcp, you may do so by changing these files and editing config/defaults.json.

On Raspberry Pi OS (Bookworm), install and enable the dhcpcd service:

sudo cp installers/dhcpcd.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable dhcpcd.service

Next, disable systemd-networkd and copy the bridge configuration with the following:

sudo systemctl stop systemd-networkd
sudo systemctl disable systemd-networkd
sudo cp config/raspap-bridge-br0.netdev /etc/systemd/network/raspap-bridge-br0.netdev
sudo cp config/raspap-br0-member-eth0.network /etc/systemd/network/raspap-br0-member-eth0.network 

Optimize PHP

Optionally, you may optimize PHP with the following, replacing the php.ini path with the one for your installed version (see Install packages):

sudo sed -i -E 's/^session\.cookie_httponly\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/session.cookie_httponly = 1/' /etc/php/8.4/fpm/php.ini
sudo sed -i -E 's/^;?opcache\.enable\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/opcache.enable = 1/' /etc/php/8.4/fpm/php.ini
sudo phpenmod opcache

Routing and IP masquerading

These steps allow WLAN clients to access computers on the main wired eth0 network, and from there the internet. Begin by enabling IP forwarding with the following commands:

echo "net.ipv4.ip_forward=1" | sudo tee /etc/sysctl.d/90_raspap.conf > /dev/null
sudo sysctl -p /etc/sysctl.d/90_raspap.conf
sudo /etc/init.d/procps restart

To enable traffic between clients on the WLAN and the internet, we add two iptables network address translation (NAT) "masquerade" firewall rules. Create these rules and persist them with RaspAP's save script, which writes /etc/iptables/rules.v4 without the temporary rules of the WireGuard kill switch and captive portal mode:

sudo iptables -t nat -A POSTROUTING -j MASQUERADE
sudo iptables -t nat -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE
sudo /usr/local/sbin/raspap-iptables-save.sh

Enable hostapd

The hostapd service is disabled by default, as there is no configuration for it after its initial installation. Unmask and enable it with the following:

sudo systemctl unmask hostapd.service
sudo systemctl enable hostapd.service

Additional features

The Quick installer also configures the following features. The WLAN routing helper was installed in System helpers above.

Firewall

Create the firewall configuration directory and copy its rule templates:

sudo mkdir /etc/raspap/networking/firewall
sudo cp config/iptables_rules.json /etc/raspap/networking/firewall/
sudo chown -R www-data:www-data /etc/raspap/networking/firewall

USB tethering

udev runs the USB tethering script as root when a device is attached. Install the script and its udev rule:

sudo install -o root -g root -m 755 installers/usb-tethering.sh /usr/local/sbin/raspap-usb-tethering.sh
sudo cp installers/90-raspap-usb-tethering.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules

Mobile data clients

Support for mobile data modems requires a few extra packages, scripts and udev rules.

Caution

These steps replace /etc/network/interfaces. Back up the existing file first if you have customized it.

sudo apt-get install wvdial socat bc
sudo cp /etc/network/interfaces /etc/raspap/backups/interfaces
sudo cp config/client_config/*.sh /usr/local/sbin/
sudo chmod a+rx /usr/local/sbin/*.sh
sudo cp config/client_config/mcc-mnc-table.csv /usr/local/sbin/
sudo cp config/client_config/wvdial.conf /etc/
sudo cp config/client_config/interfaces /etc/network/interfaces
sudo cp config/client_config/70-mobile-data-sticks.rules /etc/udev/rules.d/
sudo cp config/client_config/80-raspap-net-devices.rules /etc/udev/rules.d/
sudo chown root:root /etc/udev/rules.d/70-mobile-data-sticks.rules /etc/udev/rules.d/80-raspap-net-devices.rules
sudo chmod 644 /etc/udev/rules.d/70-mobile-data-sticks.rules /etc/udev/rules.d/80-raspap-net-devices.rules
sudo cp config/client_config/*.service /etc/systemd/system/
sudo cp config/client_udev_prototypes.json /etc/raspap/networking/

Optional components

The following components are not required to operate RaspAP, but extend its usefulness in several ways. Each is independent of the others, so you may choose to add whichever one you need.

OpenVPN

Install OpenVPN, enabling the option in RaspAP's config and the openvpn-client service, like so:

sudo apt-get install openvpn
sudo sed -i "s/\('RASPI_OPENVPN_ENABLED', \)false/\1true/g" /var/www/html/includes/config.php
sudo systemctl enable openvpn-client@client

Copy the OpenVPN auth control and logging scripts to their destination, setting ownership and permissions with the following:

sudo cp installers/configauth.sh /etc/raspap/openvpn/
sudo cp installers/openvpnlog.sh /etc/raspap/openvpn/
sudo chown -c root:root /etc/raspap/openvpn/*.sh
sudo chmod 750 /etc/raspap/openvpn/*.sh

WireGuard

The WireGuard application files are already present in RaspAP. Begin by installing the package:

sudo apt-get install wireguard

On Debian 12 (bookworm), also install resolvconf:

sudo apt-get install resolvconf

On Debian 13 (trixie), or on any system where resolvconf isn't installed, add a shim to prevent DNS conflicts:

sudo ln -sf /usr/bin/true /usr/local/bin/resolvconf

Install the kill switch and forwarding scripts. These run as root when a tunnel starts or stops:

sudo install -o root -g root -m 750 installers/wg-killswitch.sh /etc/raspap/networking/wg-killswitch.sh
sudo install -o root -g root -m 750 installers/wg-forward.sh /etc/raspap/networking/wg-forward.sh

The kill switch option "Allow captive portal login" uses a helper that probes the uplink as the system user raspap-probe. Create the user and install the helper with its systemd units:

sudo useradd --system --no-create-home --home-dir /nonexistent --shell /usr/sbin/nologin raspap-probe
sudo apt-get install psl
sudo install -o root -g root -m 755 installers/captive-portal.sh /usr/local/sbin/raspap-captive-portal.sh
sudo install -o root -g root -m 644 installers/raspap-captive-portal.service /etc/systemd/system/raspap-captive-portal.service
sudo install -o root -g root -m 644 installers/raspap-captive-portal.timer /etc/systemd/system/raspap-captive-portal.timer
sudo install -o root -g root -m 644 installers/raspap-captive-portal-cleanup.service /etc/systemd/system/raspap-captive-portal-cleanup.service
sudo systemctl daemon-reload
sudo systemctl enable raspap-captive-portal-cleanup.service

Don't start the timer. wg-killswitch.sh starts it when a tunnel starts with this option, and stops it with the tunnel.

A WireGuard handshake fails if the system clock is behind. Unless your device has a battery-backed real-time clock, install fake-hwclock and save the time every 5 minutes, so that it's restored at boot:

sudo apt-get install fake-hwclock
echo "*/5 * * * * root /usr/sbin/fake-hwclock save" | sudo tee /etc/cron.d/raspap-fake-hwclock > /dev/null

Note

The real-time clock of the Raspberry Pi 5 needs an optional battery, so install fake-hwclock on it as well.

When the tunnel is down and DNS goes through the tunnel, NTP server names don't resolve. Add NTP servers by IP address (here, time.cloudflare.com) as fallback servers for systemd-timesyncd:

sudo mkdir -p /etc/systemd/timesyncd.conf.d
printf '[Time]\nFallbackNTP=162.159.200.1 162.159.200.123 2606:4700:f1::1 2606:4700:f1::123\n' | sudo tee /etc/systemd/timesyncd.conf.d/90-raspap.conf > /dev/null
sudo systemctl try-restart systemd-timesyncd.service

If you use ntpsec (for example, with the NTP Server plugin), add the same servers to its ntp.d directory instead:

sudo mkdir -p /etc/ntpsec/ntp.d
printf 'server %s iburst\n' 162.159.200.1 162.159.200.123 2606:4700:f1::1 2606:4700:f1::123 | sudo tee /etc/ntpsec/ntp.d/90-raspap-fallback.conf > /dev/null
sudo systemctl try-restart ntpsec.service

Finally, enable the service and activate the management option:

sudo systemctl enable wg-quick@wg0
sudo sed -i "s/\('RASPI_WIREGUARD_ENABLED', \)false/\1true/g" /var/www/html/includes/config.php

Ad blocking

There are several steps to enable Ad blocking, including downloading the blocklists, setting permissions and adding a dnsmasq configuration:

wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts -O /tmp/hostnames.txt
wget https://big.oisd.nl/dnsmasq -O /tmp/domains.txt
sudo cp /tmp/hostnames.txt /etc/raspap/adblock/
sudo cp /tmp/domains.txt /etc/raspap/adblock/
sudo cp installers/update_blocklist.sh /etc/raspap/adblock/
sudo chown -c root:www-data /etc/raspap/adblock/*.txt
sudo chown -c root:root /etc/raspap/adblock/*.sh
sudo chmod 750 /etc/raspap/adblock/*.sh
echo "conf-file=/etc/raspap/adblock/domains.txt" | sudo tee -a /etc/dnsmasq.d/090_adblock.conf > /dev/null 
echo "addn-hosts=/etc/raspap/adblock/hostnames.txt" | sudo tee -a /etc/dnsmasq.d/090_adblock.conf > /dev/null
sudo sed -i '/dhcp-option=6/d' /etc/dnsmasq.d/090_wlan0.conf
sudo sed -i "s/\('RASPI_ADBLOCK_ENABLED', \)false/\1true/g" /var/www/html/includes/config.php

Removing dhcp-option=6 forces DHCP clients to use RaspAP for local DNS resolution, so that the blocklists apply to them.

RestAPI

The RestAPI runs from /etc/raspap/api, outside the web root. Move its files there and make them belong to root:

sudo mv /var/www/html/api /etc/raspap/api
sudo chown -R root:root /etc/raspap/api

Install Python's modules for the API into a virtual environment owned by root:

sudo apt-get install python3 python3-venv
sudo python3 -m venv /etc/raspap/api/venv
sudo /etc/raspap/api/venv/bin/pip install -r /etc/raspap/api/requirements.txt

The service runs as the system user raspap-api. Create the user and install the systemd unit:

sudo useradd --system --user-group --no-create-home --home-dir /nonexistent --shell /usr/sbin/nologin raspap-api
sudo install -o root -g root -m 644 installers/restapi.service /lib/systemd/system/restapi.service

The API refuses each request until a key is set. Create a random key in /etc/raspap/api/.env, readable only by root and the web UI, and have systemd pass it to the service:

KEY=$(od -An -N16 -tx1 /dev/urandom | tr -d ' \n')
echo "RASPAP_API_KEY=$KEY" | sudo tee /etc/raspap/api/.env > /dev/null
sudo chown root:www-data /etc/raspap/api/.env
sudo chmod 640 /etc/raspap/api/.env
sudo mkdir -p /etc/systemd/system/restapi.service.d
printf '[Service]\nEnvironmentFile=-/etc/raspap/api/.env\n' | sudo tee /etc/systemd/system/restapi.service.d/raspap-env.conf > /dev/null

Finally, enable the service and activate the management option:

sudo systemctl daemon-reload
sudo systemctl enable restapi.service
sudo sed -i "s/\('RASPI_RESTAPI_ENABLED', \)false/\1true/g" /var/www/html/includes/config.php

VPN provider

RaspAP can control the CLI of a supported VPN provider. Install your provider's CLI first, then find its ID and binary path:

ID Provider Binary
1 ExpressVPN /usr/bin/expressvpn
2 Mullvad VPN /usr/bin/mullvad
3 NordVPN /usr/bin/nordvpn
4 AdGuard VPN /usr/local/bin/adguardvpn-cli

The list of providers is maintained in config/vpn-providers.json. Allow www-data to run the CLI, activate the management option and save the provider ID. For example, for NordVPN:

echo "www-data ALL=(ALL) NOPASSWD:/usr/bin/nordvpn *" | sudo tee -a /etc/sudoers.d/090_raspap > /dev/null
sudo visudo -cf /etc/sudoers.d/090_raspap
sudo sed -i "s/\('RASPI_VPN_PROVIDER_ENABLED', \)false/\1true/g" /var/www/html/includes/config.php
echo "providerID = 3" | sudo tee /etc/raspap/provider.ini > /dev/null

TCP BBR congestion control

Network performance can be improved by changing TCP congestion control to BBR (Bottleneck Bandwidth and RTT). First, check that your kernel supports it. The following outputs Y if it does:

modinfo -F intree tcp_bbr

Load the module, add the BBR configuration and apply it:

sudo modprobe tcp_bbr
echo "net.core.default_qdisc=fq" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Verify that BBR is enabled. The following should output net.ipv4.tcp_congestion_control = bbr:

sysctl net.ipv4.tcp_congestion_control

Network activity monitor

RaspAP's real-time network activity monitor is enabled by default by the Quick installer. This requires compiling C code, so ensure gcc is present on your system, then compile the code from its source:

sudo apt-get update
sudo apt-get install -y build-essential
sudo gcc -O2 -o /usr/local/bin/raspap-network-monitor /var/www/html/installers/raspap-network-monitor.c

Next, install, enable and start the systemd service for your AP interface:

sudo cp /var/www/html/installers/raspap-network-activity@.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable raspap-network-activity@wlan0.service
sudo systemctl start raspap-network-activity@wlan0.service

Note

All instances of the service write to the same file, so only enable one. If your AP uses an interface other than wlan0, substitute it above.

Finally, symbolically link the monitor file to the web application and set permissions:

sudo ln -sf /dev/shm/net_activity /var/www/html/app/net_activity
sudo chown www-data:www-data /var/www/html/app/net_activity 

Restart

Finally, restart your device and verify that the wireless access point is available:

sudo systemctl reboot

After your device has restarted, search for wireless networks with your wireless client. The default SSID is raspi-webgui. The default username is "admin" and the default password is "secret".

Important

It is strongly recommended that you change these default login credentials in RaspAP's Authentication panel. APs managed by RaspAP in the wild have been administered by third parties with the default login. After three logins with the default password, RaspAP will require you to set a new one.

Discussions

Questions or comments about RaspAP's manual install? Join the discussions here.