mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
47 lines
990 B
Markdown
47 lines
990 B
Markdown
# Using Yunohost as a Tor Hidden Service
|
||
|
||
See https://www.torproject.org/docs/tor-hidden-service.html.en
|
||
|
||
## Installing Tor
|
||
|
||
```bash
|
||
apt-get install tor
|
||
```
|
||
|
||
## Configuring our hidden service
|
||
|
||
Edit /ect/tor/torrc, and add these lines:
|
||
|
||
```bash
|
||
HiddenServiceDir /var/lib/tor/hidden_service/
|
||
HiddenServicePort 80 127.0.0.1:80
|
||
HiddenServicePort 443 127.0.0.1:443
|
||
```
|
||
|
||
## Restart Tor
|
||
|
||
```bash
|
||
service tor restart
|
||
```
|
||
|
||
## Get your Tor Hidden Service hostname
|
||
|
||
```bash
|
||
cat /path/to/hidden_service/keys/hostname
|
||
```
|
||
|
||
Your domain looks like *random123456789.onion*
|
||
|
||
## Add the .onion domain to Yunohost
|
||
|
||
```bash
|
||
yunohost domain add random123456789.onion
|
||
```
|
||
|
||
## Avoid SSO redirection (optional)
|
||
|
||
If you want to avoid being redirected to the SSO portal at login, you can deactivate SSOwat for this specific tor domain, by editing the file `/etc/nginx/conf.d/random123456789.onion.conf` and commenting the following line (2 times):
|
||
|
||
```bash
|
||
#access_by_lua_file /usr/share/ssowat/access.lua;
|
||
```
|