Personal scripts for raspberry pi
Run make setup-docker to install Docker, Docker Compose, and add your user to the docker group.
Note: You may need to logout and login again (or reboot) after installation for group permissions to apply.
Note: You may need to logout and login again (or reboot) after installation for group permissions to apply.
Run make setup-rasp-bridge to install and start the Python API bridge.
This API allows you to control the VPN via simple HTTP requests, suitable for Apple Shortcuts.
Endpoints:
GET /vpn/status: Check VPN status.GET /vpn/on: Turn VPN on.GET /vpn/off: Turn VPN off.
- sudo nano /etc/openvpn/client/clearvpn.conf
- Copy config from clearvpn
- Edit line with auth-user-pass and change it to:
auth-user-pass /etc/openvpn/client/clearvpn-pass.txt
- sudo nano /etc/openvpn/client/clearvpn-pass.txt
- Add your credentials
Run make setup-vpn-aliases to add the following aliases to your .bashrc:
vpn-start: Start the VPN connection.vpn-stop: Stop the VPN connection.vpn-status: Check the VPN connection status.
Run make setup-pihole to configure and start Pi-hole. This script will:
- Check if port 53 is free (and offer to fix it if
systemd-resolvedconflicts). - Create necessary data directories.
- Generate or set a password in
.env. - Enable Docker to start on boot.
- Start the Pi-hole container (configured to restart automatically).
Useful Commands:
make setup-pihole: Initial setup and start.make start-pihole: Start containers.make stop-pihole: Stop containers.make logs-pihole: View logs.make change-password-pihole: Change the admin password.
Run make setup-homebridge to start Homebridge.
- Access UI:
http://<raspberry-pi-ip>:8581 - Use the UI to install plugins (like
homebridge-http-switch) to connect your VPN API or other devices to Apple Home.
Run make setup-syncthing to start Syncthing.
- Access UI:
http://<raspberry-pi-ip>:8384 - Default folders are stored in
~/syncthing(in your home directory).
Run make setup-homepage to start the dashboard.
- Access UI:
http://<raspberry-pi-ip>:3000 - Config files are in
./homepage/config. - Note: You need to edit
./homepage/config/services.yamlto add API keys for Pi-hole and Syncthing widgets to work properly.