Skip to content

Instantly share code, notes, and snippets.

@rpratama123
Last active September 29, 2023 17:34
Show Gist options
  • Save rpratama123/0b35987384aee4cabaec167987de1549 to your computer and use it in GitHub Desktop.
Save rpratama123/0b35987384aee4cabaec167987de1549 to your computer and use it in GitHub Desktop.
FreeBSD Reverse Proxy with Tailscale and Caddy

Here are the steps required in order to set up reverse proxy server on FreeBSD 13.0 using Tailscale as tunnel to local server, and Caddy acted as reverse proxy agent.

Please note that almost all the commands are performed under root access.

Install and Configure Tailscale

Install Tailscale on FreeBSD using this command:

pkg install tailscale

Then enable, start, and login to Tailscale network by entering this command:

service tailscaled enable
service tailscaled start
tailscale up

Install Caddy

Install and enable Caddy using this command bellow:

pkg install caddy
service caddy enable

Configure Caddy for Reverse Proxy

Edit Caddyfile at /usr/local/etc/caddy/Caddyfile:

sample here
https://forums.unraid.net/topic/98719-caddy-reverse-proxy/

Start Caddy:

service caddy start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment