General information
- Scripts and config files related to bridgestrap's deployment are in the bridgestrap-admin repository.
- The service runs on bridges.torproject.org.
- The username is bridgestrap.
- Its home directory is in /home/bridgestrap.
- It listens on 127.0.0.1:5001.
- Bridgestrap invokes the statically-compiled tor process located at /home/bridgestrap/bin/tor-static. Take a look at this comment for why this is necessary.
- Bridgestrap's systemd script is at /home/bridgestrap/.config/systemd/user/bridgestrap.service.
- There's a crontab entry (run
crontab -e
as user bridgestrap) that invokes logrotate once a day to rotate bridgestrap's log files. - You can find the current tor log in
/tmp/tor-datadir-...
- Take a look at bridgestrap's metrics for a quick check if the service is running.
- Bridgestrap is currently deployed and can be accessed at https://bridges.torproject.org/status
(Re)starting bridgestrap
- Log into bridges.torproject.org.
- Change to the bridgestrap user by running
sudo -u bridgestrap -s
. - (Re)start the bridgestrap process via its systemd script:
systemctl --user [start|stop|status] bridgestrap
. - Take a look at bridgestrap's log file at /home/bridgestrap/logs/bridgestrap.log to make sure that the service (re)started successfully.
Deploying a new version
The following script takes as argument a bridgestrap executable and it deploys it on bridges.torproject.org. Replace POLYANTHUM
with how you log into bridges.torproject.org.
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 EXECUTABLE"
exit 1
fi
path="$1"
executable=$(basename "$path")
scp "$path" POLYANTHUM:/tmp
ssh -t POLYANTHUM \
"chmod 777 /tmp/${executable} && " \
"sudo -u bridgestrap bash -i -c '" \
"systemctl --user stop bridgestrap && " \
"cp /tmp/${executable} /home/bridgestrap/bin/bridgestrap && " \
"systemctl --user start bridgestrap' && " \
"rm -f /tmp/${executable}"