This guide will help you set up a WebTunnel bridge compiled from the source to help censored users connect to the Tor network.

0. Configurez votre domaine et votre serveur web

Avant de suivre les instructions ci-dessous, il est nécessaire de configurer votre domaine et votre serveur Web. Refer to the first part of the WebTunnel guide to see how to set up your web server.

1. Installer Golang

To build the WebTunnel server binary, you need to install Golang. Vous pouvez installer Go sur Debian en exécutant :

$ sudo apt install golang

2. Cloner et compiler

Clone the WebTunnel git repository:

$ git clone

And compile the WebTunnel server binary:

$ cd webtunnel/main/server
$ go build

Finally, copy the binary to another location:

$ sudo cp server /usr/local/bin/webtunnel

3. Installer Tor

On a Debian-like system, install Tor from the Tor Debian repository.

$ sudo apt install apt-transport-https lsb-release

And run these commands to enable the Tor Debian repository:

$ CODENAME=$(lsb_release -cs)

$ cat <<EOF > /etc/apt/sources.list.d/tor.list
   deb     [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] $CODENAME main
   deb-src [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] $CODENAME main

Import the Tor Project keyring:

$ wget -qO- | gpg --dearmor | sudo tee /usr/share/keyrings/tor-archive-keyring.gpg >/dev/null

Finally, update your package list and install Tor:

$ sudo apt update && sudo apt install tor -y

4. Modifier votre torrc

Edit your Tor config file, usually located at /etc/tor/torrc and replace its contents with:

  • url=https://yourdomain/path with your WebTunnel url including your domain and secret path;
  • <> with your contact email address;
  • Nickname WebTunnetTest with the nickname of your bridge.
BridgeRelay 1
AssumeReachable 1
ServerTransportPlugin webtunnel exec /usr/local/bin/webtunnel
ServerTransportListenAddr webtunnel
ServerTransportOptions webtunnel url=https://yourdomain/path
ExtORPort auto
ContactInfo <>
Nickname WebTunnelTest
SocksPort 0

5. Redémarrer Tor

Activer et démarrer Tor :

$ sudo systemctl enable --now tor.service

Ou redémarrez-le s'il était déjà en cours d'exécution, afin que les configurations prennent effet :

$ sudo systemctl restart tor.service

6. Éditer et recharger les permissions AppArmor tor

To allow tor to run your WebTunnel binary, edit the AppArmor system_tor profile at /etc/apparmor.d/system_tor and add an entry allowing tor to execute WebTunnel:

  # During startup, tor (as root) tries to open various things such as
  # directories via check_private_dir().  Let it.
  /usr/local/bin/webtunnel ix,

Reload the AppArmor profile:

$ sudo apparmor_parser -r /etc/apparmor.d/system_tor

After modifying the profile and reloading it, test to see if the tor process can now execute /usr/local/bin/webtunnel without any AppArmor denials. Check the system logs (e.g., dmesg or /var/log/syslog) to ensure the error doesn't reappear.

7. Surveiller vos journaux

To confirm your bridge is running with no issues, you should see something like this (usually in /var/log/syslog or run sudo journalctl -e -u tor@default):

[notice] Your Tor server's identity key fingerprint is '<NICKNAME> <FINGERPRINT>'
[notice] Your Tor bridge's hashed identity key fingerprint is '<NICKNAME> <HASHED FINGERPRINT>'
[notice] Tor has successfully opened a circuit. Looks like client functionality is working.
[notice] Bootstrapped 100%: Done

You can monitor your WebTunnel bridge's usage on Relay Search. Just enter your bridge's <HASHED FINGERPRINT> in the form and click "Search". After having set up the bridge, it takes approximately three hours for the bridge to show up in Relay Search.

8. Notes finales

Your WebTunnel bridge will by default be automatically distributed via the Bridges website, also known as the HTTPS distributor. This default applies unless an operator explicitly configures the BridgeDistribution setting in the torrc file to a different option. If set to any option other than HTTPS, the bridge will not be distributed to users. If you are having trouble setting up your bridge, have a look at our help section.

If your bridge is now running, you can test it by copying and pasting your bridge line into Tor Browser. To build your WebTunnel bridge line, you need to copy your bridge FINGERPRINT, but don't confuse it with your hashed fingerprint, which is the fingerprint that you will find on the Tor Relay Search website. If you copy the hashed fingerprint instead of your bridge fingerprint, you won't be able to connect. You can find your bridge fingerprint in the /var/lib/tor/fingerprint file. Remember to copy only the fingerprint and do not include the bridge nickname.

Finally, you can replace the URL contents with your domain and secret path. You can find this in your torrc line under ServerTransportOptions.

Now, just replace the content below to create your WebTunnel bridge line:

webtunnel FINGERPRINT url=https://yourdomain/path