Private sharing with Magic Folderļ
Summary
- You will be able to detects local changes to files and uploads those changes to a Tahoe-LAFS grid. Magic Folder monitors a Tahoe-LAFS grid and downloads changes to the local filesystem.
Tahoe-lafs for the cryptography and resource sharing.
Magic wormhole for the transport between nodes
Magic folder for the filesystem access
Weāll call the host with storage-only the storage node
the hosts syncing the content of the magic folder are remote clients
the processes handling the transfers are the magic folder services
the directories holding the files are the āmagic foldersā
Stepsļ
Step 0 - Create and start a Tahoe-LAFS storage-only node on a mutually accessible host (public VPS?) (Transit server?) Step 0.1 Create and start (recommended) run the node as a daemon/service Step 2- Create client(s)
Prepare the storage nodeļ
Needs to be internet accessible because it will be accessed by several services running on other machines.
install tahoe-lafs using the :ref:`install tahoe client`_ process.
Note
Pro tip: create a separate terminal session (tmux new -s storage_console)
Start/Stop the node to create the keys and fURL
# Start the storage node process to create the pubkeys and fURL
tahoe --node-directory ~/tahoe/storage0/ run
# Now copy the Tahoe fURL for the storage node, for the remote clients later.
cat storage0/private/storage.furl
# Next copy the node pubkey...
cat storage0/node.pubkey
Run the storage nodeļ
- ` #Now start the Tahoe storage processes
tahoe run storage0 # later, ādaemonizeā this, so it runs in the background
Note
Congratulations, you are 30% complete
Prepare each remote clientļ
- Each remote client will need
A tahoe-lafs client installation, with the addresses and keys for the storage server
Magic folder services installed and configured with the āinviteā feature enabled.
A āmagic folderā directory to save the synced contents.
Before you beginļ
Install the tahoe client in a venv using :ref:`install tahoe client`_ process
Point the tahoe client to the storage nodeļ
:ref:`Prepare the client`_ using the fURL and pubkey from the storage node.
Install Magic-Folder on each remote clientļ
pip install -U 'git+https://github.com/tahoe-lafs/magic-folder.git#egg=magic-folder'
Note
The installation process is temporarily cumbersome
Configure the Magic Folder services on each remote clientļ
On each remote client:
magic-folder --config ./mf0 init --node-directory ./client0 --listen-endpoint tcp:8999:interface=localhost
magic-folder --config ~/tahoe/mf0 init --node-directory ~/tahoe/tahoe_client --listen-endpoint tcp:8999:interface=localhost
Enable the invite featureļ
The invite feature supports the join option and the access codes for other clients.
Warning
Currently considered experimental. invite needs to be enabled. It uses magic-wormhole to transmit the secrets.
magic-folder āconfig=./mf0 set-config āenable invites
Configure the Magic Folderļ
magic-folder āconfig ./mf0 init ānode-directory ./client0 ālisten-endpoint tcp:8999:interface=localhost
magic-folder āconfig ./mf0 add āname funny-photos āauthor $USER ~/photos
Run the Magic Folder service on the remote clientļ
magic-folder āconfig ~/tahoe/mf0 run
Confirm that magic folder is runningļ
The magic folder service should be able to connect to the storage node.
- you should see something like::
2024-09-19T16:00:47-0400 Completed initial Magic Folder setup 2024-09-19T16:00:47-0400 Connected to 1 storage-servers
Prepare the magic folder content for syncingļ
Create the Invite Nameļ
Use the magic folder command:
magic-folder --config ~/.mf0 invite --node-directory ./client0 --name funny-photos --mode read-write
Each guest joins the Magic Folderļ
magic-folder āconfig=./mf0 join āname=demo 6-narrative-endorse ~/magicf