This tutorial assumings the set up below
NGINX CLEARWEB (web site hosted via SSL port 443) -> NGINX (reverse proxy for HTTPS website, converts website to HTTP and rewrites all 'DOMAIN.COM' to new .ONION address) -> TOR PROXY SERVICE
Install Tor
apt install tor
Configure Tor
nano /etc/tor/torrc
Add the lines below to the file above
HiddenServiceDir /var/lib/tor/domain.com/ HiddenServicePort 80 127.0.0.1:4879 Find Tor hostname
cat /var/lib/tor/domain.com/hostname
Now it’s time to configure NGiNX
How this blog is deployed
ClearNet: gitea (main repo) -> metroline (custom hugo build container) -> github release (via custom container to clone from gitea and push to github) -> cloudflare pages (this is auto when there’s a commit in the github repo)
TOR: gitea (main repo) -> metroline (custom hugo build container) -> rsync (custom container to push to web server) -> webserver (proxied via link HERE )
I had to do it this way since CloudFlare Pages only work with Github.