Simple Tahoe LAFS storage node with OpenVPN for NAT traversal.
Tested on Vultr's $5/mo single CPU/512 MB RAM/160 GB storage node.
Setup a Tahoe-LAFS OpenVPN server. I recommend looking at kylemanna/openvpn trusted build.
Generate a certificate for each Tahoe-LAFS client.
Create an empty directory (used to store persistent data) and initialize Tahoe-LAFS:
mkdir storage0 && cd storage0
docker run -v $PWD:/tahoe --rm -it kylemanna/tahoe-lafs tahoe create-node
Expected Output:
Node created in '/.tahoe'
Please set [client]introducer.furl= in tahoe.cfg!
The node cannot connect to a grid without it.
Please set [node]nickname= in tahoe.cfg
Configure Tahoe-LAFS. At minimum set introducer.furl and name. Refer to Tahoe-LAFS documentation.
vim tahoe.cfg
Install the OpenVPN client configuration file in this directory so it can be
picked up the OpenVPN service that will run in the container, default name is
openvpn.conf. If using kylemanna/openvpn, this would be the output of the
ovpn_getclient command.
Optionally lock down permissions a bit tighter:
sudo chown root:root *
sudo chmod 400 openvpn.conf tahoe.cfg
Expected permissions:
-r-------- 1 root root 8588 Jul 8 23:03 openvpn.conf
drwx------ 2 root root 4096 Jul 8 22:59 private
-r-------- 1 root root 1298 Jul 8 22:59 tahoe.cfg
-rw-r--r-- 1 root root 291 Jul 8 22:59 tahoe-client.tac
Test Tahoe-LAFS and OpenVPN by running it in blocking + interactive mode, logs should appear:
docker run -v $PWD:/tahoe --rm -it --cap-add=NET_ADMIN kylemanna/tahoe-lafs
Optionally install an upstart script to automatically start the container on Ubuntu by using upstart.init, be sure to update the path to update the path for the volume share (-v) from above and stop the previously running container:
curl https://raw.githubusercontent.com/kylemanna/docker-tahoe-lafs/master/upstart.init | sudo tee /etc/init/docker-tahoe.conf
sudo vim /etc/init/docker-tahoe.conf
start docker-tahoe
Start the docker introducer node, copy the introducer FURL (form: "pb://[email protected]:3455,127.0.0.1:3455/secret")
mkdir introducer0 && cd introducer0
docker run -v $PWD:/tahoe --rm -it kylemanna/tahoe-lafs tahoe create-introducer
INTRO=$(cat private/introducer.furl)
Create 10 storage nodes:
tests/run-storage-nodes.sh -i $INTRO
Caveats: Uses internal docker0 bridge to communicate.
Content type
Image
Digest
sha256:8b145bc92…
Size
103.4 MB
Last updated
over 10 years ago
docker pull kylemanna/tahoe-lafs