RCL Reverse Proxy
Reverse Proxy details
We have implemented a reverse proxy server in order to securely serve local services over the internet.
Install
In the unforunate event we need to reinstall the reverse proxy server, here are the steps to replicate it:
Install Raspberry Pi OS Lite (32bit) to a Sandisk Endurance Pro SD card (longer sd card life)
log in via ssh
run
sudo raspi-configchange the default pi password
expand the filesystem
run
sudo apt update && apt upgraderun
curl -sSL https://get.docker.com | shrun
sudo usermod -aG docker pirun
sudo usermod -aG docker ${USER}to set the permissions to the current userrun
sudo apt-get install -y libffi-dev libssl-devrun
sudo apt-get install -y python3 python3-piprun
sudo systemctl enable dockerto allow docker to start containers on bootrun
nano docker-compose.ymland paste the following in:
version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt12. follow quick start instructions here: https://nginxproxymanager.com/guide/#quick-setup
13. run sudo nano etc/systemd/system/nginx-reverse-proxy-app.service
paste the following in and save with ctrl+x -> y :
# /etc/systemd/system/nginx-reverse-proxy-app.service
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
WorkingDirectory=/home/pi
ExecStart=/usr/local/bin/docker-compose up
ExecStop=/usr/local/bin/docker-compose down
TimeoutStartSec=0
Restart=on-failure
StartLimitIntervalSec=60
StartLimitBurst=3
[Install]
WantedBy=multi-user.target14. run systemctl enable nginx-reverse-proxy-app.service to enable it to run on boot
Last updated
Was this helpful?