<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vinícius Costa on Medium]]></title>
        <description><![CDATA[Stories by Vinícius Costa on Medium]]></description>
        <link>https://medium.com/@viniciusnevescosta?source=rss-58c8329aeb7e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xS9EmWJpwK-B8DpLPfS25Q.jpeg</url>
            <title>Stories by Vinícius Costa on Medium</title>
            <link>https://medium.com/@viniciusnevescosta?source=rss-58c8329aeb7e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 20:51:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@viniciusnevescosta/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Syncing and Backing Up Your Thoughts with Obsidian, Syncthing, and Gitwatch]]></title>
            <link>https://viniciusnevescosta.medium.com/syncing-and-backing-up-your-thoughts-with-obsidian-syncthing-and-gitwatch-a55670b2b63f?source=rss-58c8329aeb7e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a55670b2b63f</guid>
            <category><![CDATA[gitwatch]]></category>
            <category><![CDATA[obsidian]]></category>
            <category><![CDATA[synchronization]]></category>
            <category><![CDATA[syncthing]]></category>
            <category><![CDATA[notetaking]]></category>
            <dc:creator><![CDATA[Vinícius Costa]]></dc:creator>
            <pubDate>Sat, 30 Dec 2023 15:54:23 GMT</pubDate>
            <atom:updated>2024-01-17T17:22:59.112Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>The PERFECT Suite — Syncing and Backing Up Your Thoughts with Obsidian, Syncthing, and Gitwatch</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r458DWaalJX-Pq0BNf0d9A.png" /></figure><p>In this article, I’ll guide you through the seamless integration of Obsidian, Syncthing, and Gitwatch to enhance your note-taking experience. This setup not only allows you to synchronize all your files across all your devices but also provides an automated backup solution.</p><h3>Introduction</h3><p>Before we dive in, let’s briefly explore why this setup can be beneficial and clarify our target audience. If you’re a user seeking a comprehensive solution for note-taking synchronization and backup, this guide is for you.</p><p><strong>Note: </strong>Please note that the installation process may vary depending on your operating system. As I’m using Fedora, a Linux distribution, I’ll demonstrate how to obtain and configure these tools on Fedora. However, the essence of the installation and configuration process remains the same across different operating systems. With that clarification, let’s get started.</p><h3>Acknowledgements</h3><p>Let’s tip our hats to the stars of the show:</p><p><a href="https://obsidian.md/"><strong>Obsidian</strong></a><br><a href="https://syncthing.net/"><strong>Syncthing</strong></a><br><a href="https://github.com/gitwatch/gitwatch"><strong>Gitwatch</strong></a></p><h3>Installation</h3><h4>1. Installing the Tools</h4><h4><strong>Obsidian:</strong></h4><p>Obsidian is easily installable through various methods. The simplest is via your software manager (e.g., Gnome Software). Alternatively, you can download it from the official <a href="https://obsidian.md/download">website</a>.</p><h4><strong>Syncthing:</strong></h4><p>Install Syncthing on all devices you want to synchronize using the following terminal command:</p><pre>sudo dnf install syncthing</pre><p>Alternatively, you can <a href="https://syncthing.net/downloads/">download</a> it from the official website.</p><h4><strong>Gitwatch:</strong></h4><p>For Gitwatch, you’ll need to download, install, and configure Git. Run the following commands in your terminal:</p><pre>sudo dnf install git inotify-tools<br>git clone https://github.com/gitwatch/gitwatch.git<br>cd gitwatch<br>sudo install -b gitwatch.sh /usr/local/bin/gitwatch</pre><h3>Configuration</h3><h4>2. Configuring the Tools</h4><h4>Obsidian:</h4><p>Create a folder named <em>Obsidian</em> in your documents directory. Inside this folder, create a subfolder to serve as your Obsidian vault and store all your annotations (e.g., Sync). We’ll synchronize this subfolder later.</p><h4>Syncthing:</h4><p>Run the following command in the terminal:</p><pre>syncthing</pre><p>Open a browser and access the Syncthing web GUI at 127.0.0.1:8384. Link your remote devices by selecting &quot;Add Remote Device&quot; and providing the device ID and a name for identification. To sync the Obsidian folder, click &quot;Add Folder,&quot; set a name and the folder path (e.g., /home/user/Documents/obsidian), and select the devices for synchronization. Accept the sync invite on your devices. — your annotations are now synced across all devices!</p><p>However, a potential issue arises. What if a mistake is made or an annotation gets corrupted? Syncthing will sync that error across all devices. If we look at the Syncthing <a href="https://docs.syncthing.net/users/faq.html#is-syncthing-my-ideal-backup-application">FAQ</a>, they say:</p><blockquote>“Syncthing is not a great backup application… use other tools to keep your data safe from your (or our) mistakes.”</blockquote><p>To address this, we’ll implement a backup using Git.</p><p>But before we use the Gitwatch script, if you want the backup to be done to a repository of another account on Github, you need to set up another account on your computer.</p><p>Personally, I recommend using an SSH. But don’t worry, it’s very simple. Here is a <a href="https://gist.github.com/rahularity/86da20fe3858e6b311de068201d279e3">Gist</a> showing how to configure it step-by-step.</p><h4>Gitwatch</h4><p>Here we’ll be using Gitwatch for automatically commit and push the changes. And Github for host all the files and commits.</p><p>Initialize a Git repository in your Obsidian subfolder:</p><pre>cd /path/to/obsidian/subfolder<br>git init</pre><p>Run Gitwatch with the following command (replace placeholders with actual values):</p><pre>cd /<br>gitwatch -s [seconds] -r [remote repo] -b main [folder path, e.g., /home/user/Documents/obsidian/Sync]</pre><p>Now, you’re versioning your changes and pushing them automatically to GitHub.</p><h3>Automating the Process</h3><h4>3. Automating Startup</h4><p>To streamline the entire process, consider starting these tools during boot.</p><pre>cd /<br>mkdir -p &quot;$HOME/.config/systemd/user &amp;&amp; cd $HOME/.config/systemd/user&quot;</pre><h4>Syncthing</h4><p>Create a file named ‘syncthing@.service’ and add the content.</p><pre>[Unit]<br>Description=Syncthing - Open Source Continuous File Synchronization for %I<br>Documentation=man:syncthing(1)<br>After=network.target<br>StartLimitIntervalSec=60<br>StartLimitBurst=4<br><br>[Service]<br>User=%i<br>ExecStart=/usr/bin/syncthing serve --no-browser --no-restart --logflags=0<br>Restart=on-failure<br>RestartSec=1<br>SuccessExitStatus=3 4<br>RestartForceExitStatus=3 4<br><br># Hardening<br>ProtectSystem=full<br>PrivateTmp=true<br>SystemCallArchitectures=native<br>MemoryDenyWriteExecute=true<br>NoNewPrivileges=true<br><br># Elevated permissions to sync ownership (disabled by default),<br># see https://docs.syncthing.net/advanced/folder-sync-ownership<br>#AmbientCapabilities=CAP_CHOWN CAP_FOWNER<br><br>[Install]<br>WantedBy=multi-user.targetcd /<br>mkdir -p &quot;$HOME/.config/systemd/user &amp;&amp; cd $HOME/.config/systemd/user&quot;</pre><p>Start the service, replace ‘myuser’ with your system username:</p><pre>systemctl enable syncthing@myuser.service<br>systemctl start syncthing@myuser.service</pre><h4>Gitwatch</h4><p>Create ‘gitwatch@.service’ in the same folder. Customize the ExecStart configuration:</p><pre>[Unit]<br>Description=Watch file or directory and git commit all changes. run with: systemctl --user --now enable gitwatch@$(systemd-escape &quot;&#39;-r url/to/repository&#39; /path/to/folder&quot;).service<br><br>[Service]<br>Environment=&quot;SCRIPT_ARGS=%I&quot;<br>ExecStart=/usr/local/bin/gitwatch -s [seconds until committing] -r [remote repo link] -b main [folder path, ex: /home/user/Documents/obsidian/Sync]<br><br>[Install]<br>WantedBy=default.target</pre><p>Start the service:</p><pre>systemctl --user --now enable gitwatch@$(systemd-escape &quot;&#39;-r url/to/repository&#39; /path/to/folder&quot;).service</pre><h3>Conclusion</h3><p>Congratulations! You can now effortlessly create, sync, and automatically backup your notes across all your devices. For more information, refer to the documentation of <a href="https://docs.syncthing.net/index.html">Syncthing</a>, guidelines on <a href="https://docs.syncthing.net/users/autostart.html">Starting Syncthing Automatically</a>, and <a href="https://github.com/gitwatch/gitwatch">Gitwatch</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a55670b2b63f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>