[tor-commits] [community/staging] Improve docker setup instructions.

hiro at torproject.org hiro at torproject.org
Sun Mar 21 19:17:27 UTC 2021


commit bfe821bc6466793d8cffdec579b43df219dd28e5
Author: Philipp Winter <phw at nymity.ch>
Date:   Wed Oct 30 12:35:29 2019 -0700

    Improve docker setup instructions.
    
    This partially fixes: <https://bugs.torproject.org/31834>
---
 .../technical-setup/bridge/docker/contents.lr      | 50 +++++++++++++++++++---
 1 file changed, 44 insertions(+), 6 deletions(-)

diff --git a/content/relay-operations/technical-setup/bridge/docker/contents.lr b/content/relay-operations/technical-setup/bridge/docker/contents.lr
index f82a65e..f401b1e 100644
--- a/content/relay-operations/technical-setup/bridge/docker/contents.lr
+++ b/content/relay-operations/technical-setup/bridge/docker/contents.lr
@@ -6,17 +6,55 @@ title: Docker
 ---
 body:
 
-We are maintaining a docker container that allows you to quickly set up an obfs4 bridge. First, fetch the container:
+We are maintaining a docker container that runs an obfs4 bridge.  This guide
+walks you through setting up this container.  First, download the container:
 
-`docker pull phwinter/obfs4-bridge:latest`
+```
+docker pull phwinter/obfs4-bridge:latest
+```
 
-Now, it's time to run the container.  We maintain a script that automatically determines a free OR and obfs4 port for you. The script only requires your email address as argument:
+Now, it's time to run the container.  You can choose between two options:
+
+1. We maintain a script that determines a free OR and obfs4 port for you, and
+   then runs the docker container.
+   [Download the script here](https://dip.torproject.org/torproject/anti-censorship/docker-obfs4-bridge/raw/master/deploy-container.sh).
+   When running this script, provide your email address as argument:
+   ```
+   bash deploy-container.sh address at email.com
    ```
-   $ curl https://dip.torproject.org/torproject/anti-censorship/docker-obfs4-bridge/raw/master/deploy-container.sh > deploy-container.sh
-   $ bash deploy-container.sh address at email.com
+   The script will tell you what ports it chose, and your container ID.  Make
+   sure that **both** ports are forwarded in your firewall.
+
+2. If you would rather provide your own ports, run the following command and
+   replace `XXX` with your OR port, `YYY` with your obfs4 port, and
+   `admin at example.com` with your email address.
+
    ```
+    OR_PORT=XXX PT_PORT=YYY EMAIL=admin at example.com; docker run -d -e OR_PORT=$OR_PORT -e PT_PORT=$PT_PORT -e EMAIL=$EMAIL -p $OR_PORT:$OR_PORT -p $PT_PORT:$PT_PORT phwinter/obfs4-bridge:latest
+    ```
+
+    Again, make sure that **both** ports are forwarded by your firewall.
+
+That's it! Your container should now be bootstrapping your new obfs4 bridge.
+You can inspect its logs by running:
+
+```
+docker logs CONTAINER_ID
+```
+
+To use your new bridge in Tor Browser, you need its "bridge line".  Here's how
+you can get your bridge line:
+
+```
+docker exec CONTAINER_ID get-bridge-line
+```
+
+This will return a string similar to the following:
+
+```
+obfs4 1.2.3.4:1234 B0E566C9031657EA7ED3FC9D248E8AC4F37635A4 cert=OYWq67L7MDApdJCctUAF7rX8LHvMxvIBPHOoAp0+YXzlQdsxhw6EapaMNwbbGICkpY8CPQ iat-mode=0
+```
 
-That's it! Your container should now be bootstrapping your new obfs4 Tor bridge.
 Make sure to check out the [post-install
 notes](https://community.torproject.org/relay/setup/bridge/post-install/).  If
 you are having troubles setting up your bridge, have a look at [our help





More information about the tor-commits mailing list