Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light editing, tor_onion_service.md document in web directory #1776

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 0 additions & 104 deletions docs/guides/proxies/tor_onion_service.md

This file was deleted.

16 changes: 8 additions & 8 deletions docs/guides/web/tor_onion_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tags:
- proxies
---

# Tor Onion Service
# Tor Onion service

## Introduction

Expand Down Expand Up @@ -56,22 +56,22 @@ HiddenServicePort 80 127.0.0.1:80

### Taking a closer look

* The "HiddenServiceDir" is the location of your onion service's hostname and cryptographic keys. We are storing these keys at `/var/lib/tor/onion-site/`
* The "HiddenServicePort" is the port forwarding from your local server to the onion service. We are forwarding 127.0.0.1:80 to port 80 on our Tor-facing service
* The "HiddenServiceDir" is the location of your onion service's hostname and cryptographic keys. You are storing these keys at `/var/lib/tor/onion-site/`
* The "HiddenServicePort" is the port forwarding from your local server to the onion service. You are forwarding 127.0.0.1:80 to port 80 on our Tor-facing service

!!! warning

If you plan to use a directory for your onion service signing keys outside of `/var/lib/tor/`, you will need to make sure the permissions are `0700` and the owner is `toranon:toranon`.

## Configuring a web server

We will also need a web server on our machine in order to service clients to our onion service. The author likes Caddy, but Apache or Nginx can also be used. For simplicity's sake, let's install Caddy:
You will also need a web server on our machine to service clients to your onion service. Any web server is usable (Caddy, Apache, or Nginx). The author prefers Caddy. For simplicity's sake, install Caddy:

```bash
dnf -y install caddy
```

Next, we should insert the following to `/etc/caddy/Caddyfile`:
Next, you will insert the following to `/etc/caddy/Caddyfile`:

```bash
http:// {
Expand All @@ -94,12 +94,12 @@ You can get your onion service's hostname with this command:
cat /var/lib/tor/onion-site/hostname
```

Within a few minutes, your onion service will propagate via the Tor network and you can view your new onion service in Tor Browser:
Within a few minutes, your onion service will propagate via the Tor network and you can view your new onion service in the Tor browser:

![Tor Browser showing our Onion Service](../images/onion_service.png)

## Conclusion

Onion services are an invaluable tool if you're hosting a website privately or need to bypass your ISP's Carrier Grade NAT using only open source software.
Onion services are an invaluable tool if you are hosting a website privately or need to bypass your ISP's Carrier Grade NAT using only open source software.

While onion services aren't as fast as hosting a website directly (understandable due to Tor's privacy-first design), it's way more secure and private than the public internet.
While onion services are not as fast as hosting a website directly (understandable due to Tor's privacy-first design), it is way more secure and private than the public internet.
Loading