### Install RaspAP using Quick Installer Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/simple-setup.md Installs RaspAP by downloading and executing a script from a remote URL. This script automates the manual installation steps. ```bash curl -sL https://install.raspap.com | bash ``` -------------------------------- ### Install RaspAP Quick Installer Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/ap-sta.md This command downloads and executes the RaspAP quick installer script from the official source. It's a one-line command designed for easy setup. ```bash curl -sL https://install.raspap.com | bash ``` -------------------------------- ### Get RaspAP Installer Usage Notes Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/quick-installer.md Retrieves usage notes for the RaspAP Quick installer from the command shell using curl. ```shell curl -sL https://install.raspap.com | bash -s -- --help ``` -------------------------------- ### Minwrite Installation Output Example Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/minwrite.md This is an example output from the minwrite installation process, showing the RaspAP banner, OS detection, package removal prompts, and service disabling steps. ```bash $ curl -sL https://install.raspap.com | bash -s -- --minwrite 888888ba .d888888 888888ba 88 8b d8 88 88 8b a88aaaa8P' .d8888b. .d8888b. 88d888b. 88aaaaa88a a88aaaa8P 88 8b. 88 88 Y8ooooo. 88 88 88 88 88 88 88 88. .88 88 88. .88 88 88 88 dP dP 88888P8 88888P 88Y888P 88 88 dP 88 dP version 3.2.1 The Quick Installer will guide you through a few easy steps RaspAP Minwrite: Modify the OS to minimize microSD card write operation Detected OS: Debian GNU/Linux 11 (bullseye) RaspAP Minwrite: Removing packages The following packages will be removed: dphys-swapfile logrotate Proceed? [Y/n]: The following packages will be REMOVED: dphys-swapfile* logrotate* 0 upgraded, 0 newly installed, 3 to remove and 65 not upgraded. After this operation, 351 kB disk space will be freed. (Reading database ... 65355 files and directories currently installed.) Removing dphys-swapfile (20100506-7+rpt1) ... Removing logrotate (3.18.0-2+deb11u1) ... Processing triggers for man-db (2.9.4-2) ... (Reading database ... 65313 files and directories currently installed.) Purging configuration files for logrotate (3.18.0-2+deb11u1) ... Purging configuration files for dphys-swapfile (20100506-7+rpt1) ... [ ✓ ok ] RaspAP Minwrite: Disabling services The following services will be disabled: bootlogd.service bootlogs console-setup apt-daily Proceed? [Y/n]: ``` -------------------------------- ### Update Raspberry Pi OS Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/simple-setup.md Updates the Raspberry Pi OS to the latest version, including kernel and firmware, and then reboots the system. This is a prerequisite for the RaspAP Quick Installer. ```bash sudo apt-get update sudo apt-get full-upgrade sudo reboot ``` -------------------------------- ### RaspAP hostapd Configuration Example Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/ap-sta.md This snippet shows example configuration values for RaspAP's hostapd service, stored in `/etc/raspap/hostapd.ini`. These settings control logging, WiFi AP enablement, bridging, and the managed WiFi interface. ```ini LogEnable = 1 WifiAPEnable = 1 BridgedEnable = 0 WifiManaged = wlan0 ``` -------------------------------- ### Get RaspAP Release Information Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/quick-installer.md Runs the RaspAP installer script locally to request and display release information. ```bash raspbian.sh --version ``` -------------------------------- ### Install with Specific Repository and Branch Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/quick-installer.md Installs RaspAP using a specified Git repository and branch. This is useful for installing from a feature branch or a custom fork. ```bash curl -sL https://install.raspap.com | bash -s -- --repo foo/bar --branch my-feature ``` -------------------------------- ### Deploy and Enable RaspAP Service Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Moves the raspapd systemd service file to the correct location, reloads the systemd daemon, and enables the raspapd service to start on boot. ```shell sudo mv installers/raspapd.service /lib/systemd/system sudo systemctl daemon-reload sudo systemctl enable raspapd.service ``` -------------------------------- ### Apply Default RaspAP Configuration Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Copies default configuration files for dhcpcd, dnsmasq, hostapd, and defaults.json to their respective locations. It also includes optional backup of the existing hostapd.conf. This facilitates a faster setup by using known-good configurations. ```bash sudo mv /etc/default/hostapd ~/default_hostapd.old sudo cp /etc/hostapd/hostapd.conf ~/hostapd.conf.old 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/config.php /var/www/html/includes/ sudo cp config/defaults.json /etc/raspap/networking/ ``` -------------------------------- ### Clone and Compile NoDogSplash Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/captive.md Clones the NoDogSplash repository from GitHub and compiles the source code, followed by installation. ```bash cd ~/ git clone https://github.com/nodogsplash/nodogsplash.git cd nodogsplash make sudo make install ``` -------------------------------- ### Run RaspAP Installer Locally with Custom Repo Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/quick-installer.md Executes the RaspAP installer script locally, specifying a custom GitHub repository and branch for the installation. ```bash raspbian.sh --repo foo/bar --branch my/branch ``` -------------------------------- ### Install with GitHub Username and Token Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/quick-installer.md Installs RaspAP, authenticating with GitHub using a username and personal access token. This is required for accessing private repositories. ```bash curl -sL https://install.raspap.com | bash -s -- --name octocat --token my-token ``` -------------------------------- ### Set up NoDogSplash systemd Service Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/captive.md Copies the NoDogSplash systemd service file and enables it for automatic startup, then starts and checks the service status. ```bash sudo cp ~/nodogsplash/debian/nodogsplash.service /lib/systemd/system/ sudo systemctl enable nodogsplash.service sudo systemctl start nodogsplash.service sudo systemctl status nodogsplash.service ``` -------------------------------- ### Install NoDogSplash Dependency Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/captive.md Installs the libmicrohttpd-dev package, a required dependency for compiling and running NoDogSplash. ```bash sudo apt-get update sudo apt-get install libmicrohttpd-dev ``` -------------------------------- ### Install Core RaspAP Packages Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Installs essential packages for RaspAP, including web server (lighttpd), PHP, WiFi management (hostapd), DNS/DHCP (dnsmasq), and other utilities. ```bash sudo apt-get install lighttpd git hostapd dnsmasq iptables-persistent vnstat qrencode php8.2-cgi jq isoquery ``` -------------------------------- ### Create and Bring Up Virtual AP Interface Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/ap-sta.md These bash commands demonstrate how to create a virtual AP interface named `uap0` from the physical wireless device `wlan0` and then bring the `uap0` interface up. This is a crucial step before starting the access point software. ```bash iw dev wlan0 interface add uap0 type __ap ifconfig uap0 up ``` -------------------------------- ### Enable hostapd Service Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Unmasks and enables the hostapd service, which is responsible for managing the Wi-Fi access point. This command ensures that hostapd starts automatically on boot. ```bash sudo systemctl unmask hostapd.service sudo systemctl enable hostapd.service ``` -------------------------------- ### Example RaspAP Debug Log Content Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/troubleshooting.md This is an example of the content found within a RaspAP debug log file. It provides detailed information about the system's hardware, operating system, kernel, installed packages, and RaspAP configuration. ```text System Info =========== Hardware: Raspberry Pi 3 Model B Rev 1.2 Detected OS: Debian GNU/Linux 12 (bookworm) 64-bit Kernel: Linux raspberrypi 6.1.0-rpi4-rpi-v8 (2023-10-05) aarch64 GNU/Linux System Uptime: 4 days, 20 hours, 45 minutes Memory Usage: 29.0749% Installed Packages ================== PHP Version: 8.2.7 (cli) (built: Jun 9 2023 19:37:27) (NTS) Dnsmasq Version: 2.89 dhcpcd Version: 9.4.1 lighttpd Version: 1.4.69 vnStat Version: 2.10 RaspAP Install ============== RaspAP Version: 2.9.9 RaspAP Installation Directory: /var/www/html RaspAP hostapd.ini contents: WifiInterface = wlan0 ``` -------------------------------- ### Add PHP Repository and Install Dependencies Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Installs 'software-properties-common' and adds the 'ppa:ondrej/php' repository for newer PHP versions, required for some non-Raspberry Pi OS installations. ```bash sudo apt-get install software-properties-common sudo add-apt-repository ppa:ondrej/php ``` -------------------------------- ### Install and Enable OpenVPN Client Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Installs the OpenVPN package, enables OpenVPN in RaspAP's configuration file, and enables the openvpn-client service. This allows RaspAP to function as an OpenVPN client. ```bash 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 ``` -------------------------------- ### Install and Enable WireGuard Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Installs the WireGuard package, enables WireGuard in RaspAP's configuration file, and enables the wg-quick service for the default WireGuard interface (wg). ```bash sudo apt-get install wireguard sudo sed -i "s/('RASPI_WIREGUARD_ENABLED', )false/1true/g" /var/www/html/includes/config.php sudo systemctl enable wg-quick@wg ``` -------------------------------- ### Install and Run Docker (Bash) Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/docker.md This set of commands first downloads the Docker convenience script to the home directory and then executes it with `sudo sh` to install the latest stable version of Docker Engine. It is followed by a command to run the `hello-world` Docker image, which verifies the installation by pulling and running a test container. ```Bash cd ~/ curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh ``` ```Bash sudo docker run hello-world ``` -------------------------------- ### Configure RaspAP with Captive Portal using nodogsplash Source: https://github.com/raspap/raspap-docs/blob/master/docs/faq.md Explains how to configure RaspAP to work with a captive portal using the nodogsplash project. A setup guide is available for detailed instructions. -------------------------------- ### Install RaspAP RestAPI Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/restapi.md This snippet shows the prompt for installing and enabling the RestAPI during the RaspAP Quick installer process. It requires user confirmation. ```Shell RaspAP Install: Configure RestAPI Install and enable RestAPI? [Y/n]: ``` -------------------------------- ### Manually Install isoquery on Armbian Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Downloads and installs the 'isoquery' package manually from the Debian repository for Armbian systems, as it's not available in their default repositories. ```bash 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 ``` -------------------------------- ### Install Network Activity Monitor Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Installs the network activity monitor by compiling C code, linking the monitor file, setting permissions, and managing the systemd service. ```bash 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 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 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 ``` -------------------------------- ### Perform a New Installation of RaspAP Insiders Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-insiders/index.md This command performs a fresh installation of the RaspAP Insiders Edition. It downloads and executes the Quick installer script with the '--insiders' flag. ```bash curl -sL https://install.raspap.com | bash -s -- --insiders ``` -------------------------------- ### Run RaspAP Installer Non-interactively Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/quick-installer.md Invokes the RaspAP installer remotely via curl, running non-interactively with specified option flags for WireGuard and Adblock. ```shell curl -sL https://install.raspap.com | bash -s -- --yes --wireguard 1 --adblock 0 ``` -------------------------------- ### Install Tailscale VPN Plugin in RaspAP Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-insiders/tailscale.md This describes the process of installing the Tailscale VPN integration plugin within RaspAP. The installation is handled through the RaspAP interface, automating the addition of GPG keys, system cache updates, and package installation. ```bash sudo apt update && sudo apt install tailscale ``` -------------------------------- ### Prepare Web Root Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Removes the existing web root directory to prepare for a clean installation of the RaspAP web application. ```shell sudo rm -rf /var/www/html ``` -------------------------------- ### VPN Provider Definition in JSON Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/defaults.md An example of a VPN provider definition in JSON format for RaspAP. It includes fields like provider ID, name, binary path, installation and account page URLs, and command overrides for managing VPN connections. ```JSON { "id": 1, "name": "ExpressVPN", "bin_path": "/usr/bin/expressvpn", "install_page": "https://www.expressvpn.com/support/vpn-setup/app-for-linux/", "account_page": "https://www.expressvpn.com/subscriptions", "cmd_overrides": { "countries": "list all", "log": "diagnostics", "version": "-v" } } ``` -------------------------------- ### Install dhcpcd on Raspberry Pi OS (Bookworm) Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Installs 'dhcpcd' and 'dhcpcd-base' on Raspberry Pi OS 32- and 64-bit (Bookworm) as a dependency. ```bash sudo apt-get install dhcpcd dhcpcd-base ``` -------------------------------- ### Install NTP Server Plugin Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-insiders/ntp.md Instructions for installing the NTP server plugin via the RaspAP web interface. The plugin is available as an Insiders-only feature. ```Markdown The NTP server is available as an Insiders-only plugin that may be installed from the **System > Plugins** tab. Simply choose **Details** corresponding to the plugin, then **Install now** from the modal dialog. The plugin installer will automatically refresh the UI; the NTP server plugin will then appear in the sidebar and be immediately available to configure. ``` -------------------------------- ### Upgrade RaspAP using the Installer Source: https://github.com/raspap/raspap-docs/blob/master/docs/faq.md This command upgrades an existing RaspAP installation to the latest version using the quick installer script. It fetches the script and executes it with the --upgrade flag. The process is idempotent, meaning it can be run multiple times without adverse effects. ```shell curl -sL https://install.raspap.com | bash -s -- --upgrade ``` -------------------------------- ### Install dhcpcd5 on Debian/Armbian Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Installs the 'dhcpcd5' package, which is a dependency for RaspAP on Debian and Armbian systems. ```bash sudo apt-get install dhcpcd5 ``` -------------------------------- ### Install Ad Blocking via Installer Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/adblock.md This snippet shows the prompt and output from the RaspAP installer when ad blocking is enabled. It confirms the download of blocklists, configuration of RaspAP, and integration with dnsmasq. ```shell Install ad blocking and enable list management? [Y/n] RaspAP Install: Creating ad blocking base configuration (Beta) Creating /etc/raspap/adblock Fetching latest hostnames list /tmp/hostnames.txt 100%[===================>] 7.83M 1.17MB/s in 8.0s Fetching latest domains list /tmp/domains.txt 100%[===================>] 10.93M 1.12MB/s in 11.0s Adding blocklists to /etc/raspap/adblock Moving and setting permissions for blocklist update script Adding 090_addblock.conf to /etc/dnsmasq.d Enabling local DNS name resolution for DHCP clients Enabling ad blocking management option ``` -------------------------------- ### Install iotop Utility Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/minwrite.md Installs the 'iotop' package using apt-get. This utility is used to monitor disk I/O usage. ```bash sudo apt-get install iotop -y ``` -------------------------------- ### Install NordVPN CLI Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/providers.md This snippet shows the command to download and install the NordVPN Linux CLI. It uses curl to fetch the installation script and pipes it to bash for execution. ```shell sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh) ``` -------------------------------- ### Automate Certificate Generation with Quick Installer Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/ssl.md Uses curl to download and execute a script that automates the installation of mkcert and the generation of SSL certificates, including configuring lighttpd. ```shell curl -sL https://install.raspap.com | bash -s -- --cert ``` -------------------------------- ### Install mkcert and Generate Certificate (Manual) Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/ssl.md Installs the mkcert binary on Arch Linux ARM, installs the local CA, generates a certificate for raspap.local and its wildcard, and combines the key and certificate into a single PEM file. ```shell sudo wget https://github.com/FiloSottile/mkcert/releases/download/v1.3.0/mkcert-v1.3.0-linux-arm -O /usr/local/bin/mkcert sudo chmod +x /usr/local/bin/mkcert mkcert -install cd /home/pi mkcert raspap.local "*.raspap.local" raspap.local cat raspap.local+2-key.pem raspap.local+2.pem > raspap.local.pem ``` -------------------------------- ### Update and Upgrade System Packages Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Updates the package list and performs a full upgrade of installed packages and the kernel/firmware. 'full-upgrade' is used to handle dependency changes. ```bash sudo apt-get update sudo apt-get full-upgrade ``` -------------------------------- ### Update with Custom Path and Unattended Mode Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/quick-installer.md Performs an unattended update of an existing RaspAP installation to the latest release version, specifying a custom installation path. The `--yes` flag bypasses prompts. ```bash curl -sL https://install.raspap.com | bash -s -- --update --path /var/www/html --yes ``` -------------------------------- ### Install RaspAP Insiders with Username and Token Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-insiders/index.md This command installs or upgrades RaspAP to the Insiders Edition, using provided GitHub username and a personal access token for authentication. It streams the installer script and passes credentials securely. ```bash curl -sL https://install.raspap.com | bash -s -- --upgrade --insiders --name [username] --token [my-token] ``` -------------------------------- ### Install mkcert Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/ssl.md Instructions for installing the mkcert tool, which is used to generate locally trusted SSL certificates. This tool simplifies the process of enabling HTTPS for local web servers. ```bash brew install mkcert # or choco install mkcert # or apt install mkcert ``` -------------------------------- ### Create RaspAP Configuration Directories Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Creates the necessary directories for RaspAP configuration files, including backups, networking, hostapd, lighttpd, system, and plugins. ```shell sudo mkdir /etc/raspap/ sudo mkdir /etc/raspap/backups sudo mkdir /etc/raspap/networking sudo mkdir /etc/raspap/hostapd sudo mkdir /etc/raspap/lighttpd sudo mkdir /etc/raspap/system sudo mkdir /etc/raspap/plugins ``` -------------------------------- ### Troubleshooting API Service Log Entry Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/restapi.md Example log entry from the RaspAP RestAPI service, showing a successful GET request for '/clients/wlan0' with a 200 OK status. ```shell raspberrypi python3[3033]: INFO: 192.168.0.102:58844 - "GET /clients/wlan0 HTTP/1.1" 200 OK ``` -------------------------------- ### Disable systemd-networkd and Configure Bridge Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Stops and disables the systemd-networkd service, then copies bridge configuration files for creating a network bridge (br0) with eth0 as a member. This is part of the network setup for RaspAP. ```bash 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 ``` -------------------------------- ### Connect via SSH Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/ap-sta.md This command demonstrates how to connect to a Raspberry Pi device running RaspAP using SSH. It assumes the default hostname 'raspberrypi.local' and the default username 'pi'. ```bash ssh pi@raspberrypi.local ``` -------------------------------- ### Clone RaspAP Repository Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Clones the RaspAP web GUI source repository, including submodules, and updates the plugins submodule to the latest version. ```shell sudo git clone --recurse-submodules https://github.com/RaspAP/raspap-webgui /var/www/html sudo git -C /var/www/html submodule update --remote plugins ``` -------------------------------- ### Configure hostapd.conf for AP Interface Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/ap-sta.md This snippet for `hostapd.conf` specifies the network interface that `hostapd` will use to operate as an access point. In AP-STA mode, this is typically the virtual interface `uap0`. ```ini # RaspAP wireless client AP mode interface=uap0 ``` -------------------------------- ### Schedule RaspAP Activation/Deactivation with Cron Source: https://github.com/raspap/raspap-docs/blob/master/docs/faq.md Demonstrates how to create an AP activation schedule for RaspAP using cron jobs. Provides example cron entries to stop and start RaspAP's service control script at specified times. ```Bash # Stop RaspAP services at 02:00 on Monday through Friday 0 2 * * 1-5 sudo /etc/raspap/hostapd/servicestart.sh --action stop ``` ```Bash # Start RaspAP services at 08:00 on Monday through Friday 0 8 * * 1-5 sudo /etc/raspap/hostapd/servicestart.sh --seconds 3 ``` -------------------------------- ### Enable Lighttpd Configuration and Restart Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Links the custom lighttpd configuration file into the enabled directory and restarts the lighttpd service to apply changes. ```shell sudo ln -s /etc/lighttpd/conf-available/50-raspap-router.conf /etc/lighttpd/conf-enabled/50-raspap-router.conf sudo systemctl restart lighttpd.service ``` -------------------------------- ### Configure RaspAP wlan0 Routing with dhcpcd.conf Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/repeater.md This snippet shows the manual configuration within `/etc/dhcpcd.conf` to set static IP, router, metric, and disable gateway for the wlan0 interface, ensuring proper routing for the AP. ```Shell # RaspAP wlan0 configuration interface wlan0 static ip_address=10.3.141.1/24 static routers=10.3.141.1 metric 305 nogateway ``` -------------------------------- ### Enable PHP for Lighttpd Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Enables the PHP FastCGI module for the lighttpd web server and restarts the service to apply the changes. ```bash sudo lighttpd-enable-mod fastcgi-php sudo service lighttpd force-reload sudo systemctl restart lighttpd.service ``` -------------------------------- ### Granting Systemctl Permissions in Sudoers Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/custom-plugins.md This example illustrates how to add specific permissions to the sudoers file for the 'www-data' user, enabling control over a 'sample.service' using systemctl commands (start, stop, status) without requiring a password. ```Shell www-data ALL=(ALL) NOPASSWD:/bin/systemctl start sample.service www-data ALL=(ALL) NOPASSWD:/bin/systemctl stop sample.service www-data ALL=(ALL) NOPASSWD:/bin/systemctl status sample.service ``` -------------------------------- ### Configure dhcpcd.conf for uap0 Interface Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/ap-sta.md This configuration snippet for `dhcpcd.conf` sets up a static IP address for the virtual `uap0` interface, which is used for the access point functionality in AP-STA mode. It also prevents `wpa_supplicant` from managing this interface. ```ini # RaspAP uap0 configuration interface uap0 static ip_address=192.168.50.1/24 nohook wpa_supplicant ``` -------------------------------- ### Configure dnsmasq.conf for Network Interfaces Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/ap-sta.md This configuration for `dnsmasq.conf` defines the network interfaces that `dnsmasq` should listen on for DNS and DHCP requests. It includes both the loopback interface (`lo`) and the virtual AP interface (`uap0`), ensuring that services are bound to these specific interfaces. ```ini # RaspAP uap0 configuration interface=lo,uap0 # Use interfaces lo and uap0 bind-interfaces # Bind to the interfaces domain-needed # Don't forward short names bogus-priv # Never forward addresses in the non-routed address spaces ``` -------------------------------- ### Check USB WiFi Adapter AP Mode Support Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/repeater.md This command checks if a connected USB WiFi adapter supports Access Point (AP) mode, which is crucial for setting up a WiFi repeater. The output should include 'AP' in the supported interface modes. ```Shell $ iw list ... Supported interface modes: * IBSS * managed * AP * P2P-client * P2P-GO * P2P-device ``` -------------------------------- ### Clone SamplePlugin Repository Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/custom-plugins.md Instructions for cloning the SamplePlugin repository into the RaspAP plugins directory. This involves navigating to the RaspAP installation path and using git clone. ```bash cd /var/www/html sudo mkdir plugins cd plugins sudo git clone https://github.com/[your-username]/SamplePlugin ``` -------------------------------- ### Check Interface Combinations with iw list Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-experimental/ap-sta.md This command checks the valid interface combinations supported by the wireless device, specifically looking for configurations that allow both managed (client) and AP modes simultaneously. The output indicates if a single device can operate in both modes, with a constraint on the number of channels used. ```bash iw list | grep -A 4 'valid interface' valid interface combinations: * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1, total <= 3, #channels <= 2 * #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1, total <= 4, #channels <= 1 ``` -------------------------------- ### Copy OpenVPN Auth Control Script Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Copies the OpenVPN authentication control script to the appropriate directory, sets ownership to root, and sets execute permissions for the owner and group. ```bash sudo mkdir /etc/raspap/openvpn/ sudo cp installers/configauth.sh /etc/raspap/openvpn/ sudo chown -c root:root /etc/raspap/openvpn/*.sh sudo chmod 750 /etc/raspap/openvpn/*.sh ``` -------------------------------- ### Move Control Scripts Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Moves various control scripts for hostapd logging, service management, system operations, and plugin handling to their respective RaspAP configuration directories. ```shell sudo mv installers/enablelog.sh /etc/raspap/hostapd sudo mv installers/disablelog.sh /etc/raspap/hostapd sudo mv installers/servicestart.sh /etc/raspap/hostapd sudo mv installers/debuglog.sh /etc/raspap/system sudo mv installers/plugin_helper.sh /etc/raspap/plugins ``` -------------------------------- ### Install certutil for Browser Trust Store Source: https://github.com/raspap/raspap-docs/blob/master/docs/features-core/ssl.md This command provides instructions on how to install the 'certutil' package, which is necessary for automatically installing the mkcert local CA into Firefox and Chrome/Chromium trust stores. Proper installation ensures that certificates generated by mkcert are trusted by web browsers. ```bash apt install libnss3-tools ``` -------------------------------- ### Configure Ad Blocking Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Sets up ad blocking by downloading host lists, copying them to the RaspAP adblock directory, setting permissions, and configuring dnsmasq to use these lists. It also disables a specific dhcp-option and enables ad blocking in RaspAP's config. ```bash sudo mkdir /etc/raspap/adblock 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/*.* sudo chmod 750 /etc/raspap/adblock/*.sh sudo touch /etc/dnsmasq.d/090_adblock.conf 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_raspap.conf sudo sed -i "s/('RASPI_ADBLOCK_ENABLED', )false/1true/g" includes/config.php ``` -------------------------------- ### Unattended RaspAP Installation Source: https://github.com/raspap/raspap-docs/blob/master/docs/faq.md This command performs an unattended installation of RaspAP by appending the --yes flag to the installer script. This bypasses all prompts and assumes 'yes' for all questions. ```shell curl -sL https://install.raspap.com | bash -s -- --yes ``` -------------------------------- ### Perform Unattended RaspAP Update Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/quick-installer.md Remotely invokes the RaspAP installer to perform an unattended update to the latest release version, specifying the installation path. ```shell curl -sL https://install.raspap.com | bash -s -- --yes --update --path /var/www/html ``` -------------------------------- ### Configure Sudoers for www-data User Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Copies the raspap.sudoers file to the /etc/sudoers.d/ directory to grant specific permissions to the www-data user. ```shell cd /var/www/html sudo cp installers/raspap.sudoers /etc/sudoers.d/090_raspap ``` -------------------------------- ### Configure Lighttpd Routing Source: https://github.com/raspap/raspap-docs/blob/master/docs/get-started/manual.md Copies and modifies a lighttpd configuration file to support application routing, dynamically adjusting the document root path. ```shell 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/ ```