GreenOWL
(Green OWL)
7. März 2022 um 14: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 „Gefällt mir“
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 „Gefällt mir“
GreenOWL
(Green OWL)
7. März 2022 um 20: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)
8. März 2022 um 08:52
4
Maybe I need install new nginx? 1. apt install nginx tor
f1r4s
(Eddie)
10. Januar 2023 um 10:19
5
Bhanu Sharma:
DISCOURSE_ONION
Hi mate, did you find solution to setting up TOR correctly ?
1 „Gefällt mir“
rhatto
24. Januar 2023 um 20: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 „Gefällt mir“
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)
29. Juni 2025 um 23: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 „Gefällt mir“