GreenOWL
(Green OWL)
2022 年 3 月 7 日午後 2:51
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
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
「いいね!」 6
GreenOWL
(Green OWL)
2022 年 3 月 7 日午後 8:09
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)
2022 年 3 月 8 日午前 8:52
4
Maybe I need install new nginx? 1. apt install nginx tor
f1r4s
(Eddie)
2023 年 1 月 10 日午前 10:19
5
Bhanu Sharma:
DISCOURSE_ONION
Hi mate, did you find solution to setting up TOR correctly ?
「いいね!」 1
rhatto
2023 年 1 月 24 日午後 8:56
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
How we can do it if we are not exposing Discourse directly because using aproxy like Nginx?
Using the container IP should work? (:
meglio
(Anton)
2025 年 6 月 29 日午後 11:41
9
Can Discourse theoretically serve the same instance under two domains?(.com and .onion)
For instance, can it generate links dependent on what domain it is being accessed from. What would be the “primary” domain name (i.e. for links in emails). Etc.
「いいね!」 1