stuff/homeservers/RPI.md
Moni Ghaoui 47aa1a3484 FC
2025-04-14 19:51:40 +02:00

1.3 KiB

Raspberry PI

On the Raspberry PI I am running FreeBSD with Bastille which currently has 1 jail:

sudo bastille list
ID  IP Address      Hostname                      Path
1   192.168.1.200   caddy                         /usr/local/bastille/jails/caddy/root

The ip address 192.168.1.200 is chosen deliberately. On my router (192.168.1.1) I have the following port mappings:

  • 32222 to 192.168.1.108:22 (ssh) - Maps to the Raspberry PI 8 for external access
  • 80 to 192.168.1.200:80 (http) - Maps to the Caddy jail
  • 443 to 192.168.1.200:443 (https) - Maps to the Caddy jail
  • 3478 to 192.168.1.10 (Nextcloud talk) - This is a direct connection to the Lenovo machine.

To view the Caddy setup in the Caddy jail, run this:

sudo -i
bastille console caddy
cat /usr/local/etc/caddy/Caddyfile

Result:

www.allisonandmoni.online {
        reverse_proxy 192.168.1.10:8081
}

photos.allisonandmoni.online {
        reverse_proxy 192.168.1.10:2342 
}

nextcloud.allisonandmoni.online {
        reverse_proxy 192.168.1.10:11000
}

jellyfin.allisonandmoni.online {
        reverse_proxy 192.168.1.10:8096
}

As you can see I have setup reverse proxies for www, photos and nextcloud for allisonandmoni.online.

The instructions for the caddy setup on my RPI4 can be found in this file: