<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>guide &amp;mdash; Nat Knight</title>
    <link>http://natknight.xyz/tag:guide</link>
    <description>Reflections, diversions, and opinions from a progressive ex-physicist programmer dad with a sore back.</description>
    <pubDate>Tue, 20 Oct 2026 16:46:07 -0700</pubDate>
    <item>
      <title>Self-Hosting Obsidian Backups</title>
      <link>http://natknight.xyz/self-hosting-obsidian-backups</link>
      <description>&lt;![CDATA[#self-hosting #guide #backups #obsidian&#xA;&#xA;I use Obsidian to store all my notes (not because I&#39;m a Zettelkasten sicko, I just like having a nice Markdown editor that syncs to my phone). But I want my own copy outside the app, just in case.&#xA;&#xA;!--more--&#xA;&#xA;I&#39;m not rebuilding their paid sync service (I&#39;m happy to pay for them to store and sync my notes), but I want to guard against:&#xA;&#xA;extended network outage&#xA;data loss or ransomware attacks&#xA;me losing my end-to-end encryption password&#xA;&#xA;It turns out it&#39;s fairly easy to take offline backups of your Obsidian vaults.&#xA;&#xA;First, you&#39;ll need a host for this to run on. I run mine on my home server with direct-attached storage where all my files live (and get encrypted and backed up to the cloud nightly).&#xA;&#xA;Install obsidian-headless, a command-line client for Obsidian Sync (I happen to use mise; you could use npm or Nix or whatever you prefer). Note that this requires an Obsidian Sync account, so it won&#39;t work if you&#39;re not paying for one of those.&#xA;&#xA;mise use --global node@24 npm:obsidian-headless&#xA;&#xA;You should now have a command called ob; use it to log in and set up the sync. If $VAULTNAME is the name of the vault you&#39;re backing up and $BACKUPDIR is the path to the directory where you want to store your notes locally:&#xA;&#xA;ob login  # this takes your Obsidian account password&#xA;ob sync-setup --vault &#34;$VAULTNAME&#34; --path &#34;$BACKUPDIR&#34;  # this takes your E2EE password&#xA;ob sync-config --path &#34;$BACKUPDIR&#34; --mode pull-only&#xA;&#xA;I set it to pull-only to prevent my backup from interfering with the vault (e.g. a disk fails, the vault looks empty, and syncing deletes the remote).&#xA;&#xA;Finally, set up a recurring job (I used a systemd timer; again, you could use any number of things) to run the sync regularly.&#xA;&#xA;The sync command is:&#xA;&#xA;mise exec -- ob sync --path &#34;$BACKUPDIR&#34;&#xA;&#xA;Check that it runs automatically and you&#39;re set: you now have a backup copy of your notes that gets updated in the background.&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="http://natknight.xyz/tag:self" class="hashtag"><span>#</span><span class="p-category">self</span></a>-hosting <a href="http://natknight.xyz/tag:guide" class="hashtag"><span>#</span><span class="p-category">guide</span></a> <a href="http://natknight.xyz/tag:backups" class="hashtag"><span>#</span><span class="p-category">backups</span></a> <a href="http://natknight.xyz/tag:obsidian" class="hashtag"><span>#</span><span class="p-category">obsidian</span></a></p>

<p>I use <a href="https://obsidian.md">Obsidian</a> to store all my notes (not because I&#39;m a Zettelkasten sicko, I just like having a nice Markdown editor that syncs to my phone). But I want my own copy outside the app, just in case.</p>



<p>I&#39;m not rebuilding their paid sync service (I&#39;m happy to pay for them to store and sync my notes), but I want to guard against:</p>
<ul><li>extended network outage</li>
<li>data loss or ransomware attacks</li>
<li>me losing my end-to-end encryption password</li></ul>

<p>It turns out it&#39;s fairly easy to take offline backups of your Obsidian vaults.</p>

<p>First, you&#39;ll need a host for this to run on. I run mine on my home server with direct-attached storage where all my files live (and get encrypted and backed up to the cloud nightly).</p>

<p>Install <a href="https://www.npmjs.com/package/obsidian-headless"><code>obsidian-headless</code></a>, a command-line client for Obsidian Sync (I happen to use <code>mise</code>; you could use npm or Nix or whatever you prefer). Note that this requires an Obsidian Sync account, so it won&#39;t work if you&#39;re not paying for one of those.</p>

<pre><code class="language-sh">mise use --global node@24 npm:obsidian-headless
</code></pre>

<p>You should now have a command called <code>ob</code>; use it to log in and set up the sync. If <code>$VAULTNAME</code> is the name of the vault you&#39;re backing up and <code>$BACKUP_DIR</code> is the path to the directory where you want to store your notes locally:</p>

<pre><code class="language-sh">ob login  # this takes your Obsidian account password
ob sync-setup --vault &#34;$VAULTNAME&#34; --path &#34;$BACKUP_DIR&#34;  # this takes your E2EE password
ob sync-config --path &#34;$BACKUP_DIR&#34; --mode pull-only
</code></pre>

<p>I set it to <code>pull-only</code> to prevent my backup from interfering with the vault (e.g. a disk fails, the vault looks empty, and syncing deletes the remote).</p>

<p>Finally, set up a recurring job (I used a <a href="https://wiki.archlinux.org/title/Systemd/Timers">systemd timer</a>; again, you could use any number of things) to run the sync regularly.</p>

<p>The sync command is:</p>

<pre><code class="language-sh">mise exec -- ob sync --path &#34;$BACKUP_DIR&#34;
</code></pre>

<p>Check that it runs automatically and you&#39;re set: you now have a backup copy of your notes that gets updated in the background.</p>
]]></content:encoded>
      <guid>http://natknight.xyz/self-hosting-obsidian-backups</guid>
      <pubDate>Tue, 20 Oct 2026 03:44:50 +0000</pubDate>
    </item>
  </channel>
</rss>