<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>Breathe</title><id>https://breatheoutbreathe.in/feeds/tags/p2p.xml</id><subtitle>Tag: p2p</subtitle><updated>2026-07-23T21:34:52Z</updated><link href="https://breatheoutbreathe.in/feeds/tags/p2p.xml" rel="self" /><link href="https://breatheoutbreathe.in" /><entry><title>Mirror Worg to a Hyperdrive</title><id>https://breatheoutbreathe.in/posts/mirror-worg-to-a-hyperdrive.html</id><author><name>Joseph Turner</name><email>contact@breatheoutbreathe.in</email></author><updated>2024-12-16T12:00:00Z</updated><link href="https://breatheoutbreathe.in/posts/mirror-worg-to-a-hyperdrive.html" rel="alternate" /><content type="html">&lt;p&gt;During the Q&amp;amp;A session of the &lt;a href=&quot;https://emacsconf.org/2024/talks/hyperdrive/&quot;&gt;EmacsConf 2024 hyperdrive.el talk&lt;/a&gt;, Ihor
Radchenko suggested using hyperdrive to distribute &lt;a href=&quot;https://git.sr.ht/~bzg/worg/&quot;&gt;worg&lt;/a&gt;, the
community-driven Org documentation written in Org format.&lt;/p&gt;
&lt;p&gt;Thanks, Ihor!&lt;/p&gt;
&lt;h1&gt;Mirror &lt;code&gt;worg&lt;/code&gt; to a hyperdrive&lt;/h1&gt;
&lt;p&gt;You can run these commands on a local or remote machine.  I chose to
mirror &lt;code&gt;worg&lt;/code&gt; to a hyperdrive on a remote Debian 12 VPS so that the
content stays available when I turn off my computer.&lt;/p&gt;
&lt;p&gt;Install &lt;code&gt;git&lt;/code&gt;, &lt;code&gt;dtach&lt;/code&gt; and &lt;a href=&quot;https://github.com/holepunchto/drives/&quot;&gt;drives cli&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt install git dtach npm
npm install -g drives
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Clone &lt;code&gt;worg&lt;/code&gt;, then create a new corestore and hyperdrive:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://git.sr.ht/~bzg/worg/
cd worg
drives init
drives touch # Copy hyperdrive public key from output
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mirror the &lt;code&gt;worg&lt;/code&gt; repository into the newly created hyperdrive:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# drives mirror --dry-run . bpb1bq6sdfajw4bok7k9tdmrq153pbwzcyfkrqrfxw3hhihyddhy # Dry run first
dtach -n /tmp/drives-worg-session drives mirror --live . bpb1bq6sdfajw4bok7k9tdmrq153pbwzcyfkrqrfxw3hhihyddhy # From output of `drives touch`
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that &lt;a href=&quot;https://github.com/holepunchto/drives/?tab=readme-ov-file#mirror-any-drive-into-another&quot;&gt;&lt;code&gt;drives&lt;/code&gt; ignores the &lt;code&gt;.git&lt;/code&gt; folder&lt;/a&gt; out of the box.  Running
the command inside a &lt;code&gt;dtach&lt;/code&gt; session is a quick and dirty way to make
the process persist after we've disconnected from the VPS.  A better
approach would be to write a service file to register the &lt;code&gt;drives&lt;/code&gt;
process with the init system (Debian 12 uses &lt;code&gt;systemd&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;To automatically pull the latest changes from the remote &lt;code&gt;worg&lt;/code&gt;
repository, add a cronjob with &lt;code&gt;crontab -e&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;30 0 * * * git -C ~/worg pull
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Voilá!  &lt;code&gt;worg&lt;/code&gt; is now continuously mirrored to a hyperdrive, which can
be explored, linked to, transcluded, and more using &lt;a href=&quot;https://ushin.org/hyperdrive/hyperdrive-manual.html&quot;&gt;hyperdrive.el&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;hyper://bpb1bq6sdfajw4bok7k9tdmrq153pbwzcyfkrqrfxw3hhihyddhy/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you're viewing this file in Emacs with &lt;code&gt;hyperdrive.el&lt;/code&gt; installed,
follow this link to view the &amp;quot;Introduction to Org-Mode and Worg&amp;quot; in
the hyperdrive mirror:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;hyper://bpb1bq6sdfajw4bok7k9tdmrq153pbwzcyfkrqrfxw3hhihyddhy/index.org#%3A%3A%2AIntroduction%20to%20Org-Mode%20and%20Worg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I hope this helps you.  Feel free to &lt;a href=&quot;../contact.md&quot;&gt;contact me&lt;/a&gt; with suggestions,
corrections, or questions!&lt;/p&gt;
</content></entry></feed>