sudo apt update
sudo apt full-upgrade -y
sudo apt install -y vim git curl pigpio python3-pigpio python3-smbus unattended-upgrades apt-transport-https
git clone https://github.com/geekworm-com/x-c1.git
cd x-c1
sudo chmod +x *.sh
sudo bash install.sh
echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc
sudo dpkg-reconfigure --priority=low unattended-upgrades
sudo reboot
- Clone repository to home directory
git clone https://github.com/matthewshammond/NASPi.git
- Move plex from NASPi directory to HOME directory
mv NASPi/plex .
echo deb [signed-by=/usr/share/keyrings/plex-archive-keyring.gpg] https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
curl https://downloads.plex.tv/plex-keys/PlexSign.key | gpg --dearmor | sudo tee /usr/share/keyrings/plex-archive-keyring.gpg >/dev/null
sudo apt update
sudo apt install -y plexmediaserver
- edit /boot/config.txt
sudo vim /boot/config.txt
- change dtoverlay to read
vc4-fkms-v3d
- Install xserver-xorg
sudo apt install -y --no-install-recommends xserver-xorg
- Install xinit
sudo apt install -y --no-install-recommends xinit
- Install x11-xserver-utils
sudo apt install -y --no-install-recommends x11-xserver-utils
- Install chromium-browser
sudo apt install chromium-browser
- Install the kiosk dependencies
sudo apt install matchbox-window-manager xautomation unclutter
- Add following command to .bashrc
echo "xinit /home/pi/plex -- vt$(fgconsole)" >> ~/.bashrc
- Install RASPAP
curl -sL https://install.raspap.com | bash
- Stop network services
sudo systemctl stop hostapd
sudo systemctl stop dnsmasq
- Modify DHCPCD
sudo vim /etc/dhcpcd.conf
interface wlan0
static ip_address=10.13.71.1/24
nohook wpa_supplicant
sudo systemctl restart dhcpcd
- Modify HOSTAPD
sudo nano /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
hw_mode=a
channel=36
ieee80211n=0
wmm_enabled=0
macaddr_acl=0
ignore_broadcast_ssid=0
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
beacon_int=100
ssid=Discovery
wpa_passphrase=password
country_code=US
sudo vim /etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
sudo vim /etc/init.d/hostapd
DAEMON_CONF=/etc/hostapd/hostapd.conf
- Modify DNSMASQ
sudo vim /etc/dnsmasq.conf
interface=wlan0 # Use interface wlan0
server=1.1.1.1 # Use Cloudflare DNS
dhcp-range=10.13.71.10,10.13.71.20,12h # IP range and lease time
- Modify SYSCTL
sudo vim /etc/sysctl.conf
net.ipv4.ip_forward=1
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
- Forward all traffic form wlan1 to wlan0
sudo iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE
- Save rules to be used on reboot
sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
- Edit RC.local to set iptables on reboot
sudo vim /etc/rc.local
- Above
exit 0
add:
iptables-restore < /etc/iptables.ipv4.nat
sudo systemctl unmask hostapd
sudo systemctl enable hostapd
sudo systemctl start hostapd
sudo service dnsmasq start
sudo reboot
IP address: 10.3.141.1
Username: admin
Password: secret
DHCP range: 10.3.141.50 — 10.3.141.255
SSID: raspi-webgui
Password: ChangeMe