Skip to content

RaspAP/raspap-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6d96e85 · Mar 8, 2025

History

82 Commits
Mar 8, 2025
Nov 11, 2024
Mar 8, 2025
Jun 10, 2020
Mar 8, 2025
Mar 10, 2024
Feb 22, 2024
Jan 8, 2024
Feb 18, 2024
Jan 16, 2024

Repository files navigation

raspap-docker-repository

raspap-docker

A community-led docker container for RaspAP. Read the documentation or jump straight into the usage notes.

Usage

docker run --name raspap -it -d --privileged --network=host -v /sys/fs/cgroup:/sys/fs/cgroup:ro --cap-add SYS_ADMIN ghcr.io/raspap/raspap-docker:latest

Web GUI should be accessible on http://localhost by default

Workaround for ARM devices

To use this container on ARM devices you have to make cgroups writable:

docker run --name raspap -it -d --privileged --network=host --cgroupns=host -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cap-add SYS_ADMIN ghcr.io/raspap/raspap-docker:latest

Web GUI should be accessible on http://localhost by default

Allow WiFi-clients to connect to LAN and internet

Due to docker isolation and security defaults, the following rules must be added on the docker host:

iptables -I DOCKER-USER -i src_if -o dst_if -j ACCEPT
iptables -t nat -C POSTROUTING -o eth0 -j MASQUERADE || iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -C FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT || iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -C FORWARD -i wlan0 -o eth0 -j ACCEPT || iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
iptables-save

Important: if the interface names on your device are something other than wlan0 and eth0, be sure to substitute them in the rules above.

Deploying using docker-compose

Use the docker-compose.yaml file to deploy RaspAP using docker compose. Do not use docker-compose but rather docker compose. For ARM devices, be sure to uncomment the cgroup: host line before executing docker compose:

git clone https://github.com/RaspAP/raspap-docker.git
cd raspap-docker
docker compose up -d

Environment Variables

Several environment variables are made available in this docker image to aid in configuration.

Environment Variable Description Default
RASPAP_SSID The SSID name raspap-webgui
RASPAP_SSID_PASS The SSID password ChangeMe
RASPAP_COUNTRY The SSID country code GB
RASPAP_WEBGUI_USER The admin username for the RaspAP user interface admin
RASPAP_WEBGUI_PASS The admin password for the RaspAP user interface secret
RASPAP_WEBGUI_PORT The RaspAP web user interface port 80

Some further configuration is also possible through the use of the following prefixed environment variables, in the form RASAPAP_[target]_[key]

Environment Variable Prefix Target File
RASPAP_hostapd_ /etc/hostapd/hostapd.conf
RASPAP_raspap_ /etc/dnsmasq.d/090_raspap.conf
RASPAP_wlan0_ /etc/dnsmasq.d/090_wlan0.conf

For example, RASPAP_hostapd_driver would set the driver value in /etc/hostapd/hostapd.conf