GreenOWL
(Green OWL)
March 7, 2022, 2:51pm
1
Hello! I’m using a standard installation of Docker Discourse on Ubuntu and want to setup a forum mirror in .onion Tor network.
I have installed Tor on server and now I have myonionsite.onion address.
#install
apt install -y tor
#uncomment in /etc/tor/torrc
HiddenServiceDir /var/lib/tor/myonionsite/
HiddenServicePort 80 127.0.0.1:8080
HiddenServiceVersion 3
#restart
systemctl restart tor
systemctl enable tor
cat /var/lib/tor/myonionsite/hostname
But this address show default nginx page, not my community.
Need help
1 Like
There is a TOR template for discourse:
It was last updated 6 years ago so I’m not sure if it’d still work but if it still works, this should get you going. Read the template to understand how it works.
You’ll need to include the template in your app.yml and define DISCOURSE_ONION
link (which is your .onion address.
Further discussion: Template for serving through an .onion address with Docker
5 Likes
GreenOWL
(Green OWL)
March 7, 2022, 8:09pm
3
Doesn’t work or am I doing something wrong…
My steps:
apt install tor
edit file /etc/tor/torrc
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:8080
HiddenServiceVersion 3
restart
systemctl restart tor
systemctl enable tor
check my onion domain
cat /var/lib/tor/hidden_service/hostname
go to cd /var/discourse/
and edit app.yml
add templates web.onion.template.yml
add DISCOURSE_ONION
look like:
DISCOURSE_HOSTNAME example.com
DISCOURSE_ONION example.onion
./launcher rebuild app
After these settings, the forum is not available in clearnet and in Tor. Maybe I need change post?
GreenOWL
(Green OWL)
March 8, 2022, 8:52am
4
Maybe I need install new nginx? 1. apt install nginx tor
f1r4s
(Eddie)
January 10, 2023, 10:19am
5
Bhanu Sharma:
DISCOURSE_ONION
Hi mate, did you find solution to setting up TOR correctly ?
rhatto
January 24, 2023, 8:56pm
6
The web.onion.template.yml
needs some updates in order to work.
Please try this patch .
Besides that, you probably also need to point HiddenServicePort
to 80 127.0.0.1:80
instead of 80 127.0.0.1:8080
.
2 Likes
How we can do it if we are not exposing Discourse directly because using aproxy like Nginx?
Using the container IP should work? (: