Run Obsidian as a self-hosted web app | Mudkip Mud Sport
Table of Contents
Overview
1. Ignis<br>2. Syncing<br>3. Command Line<br>4. Authentication<br>5. Summary
Mudkip
Obsidian has been my primary personal knowledge management solution for years. Since Obsidian Bases was added, my Obsidian Vault has become my source of truth for media tracking and project planning, as well as my main task manager. I respect their files over apps philosophy, and I feel at ease firmly believing that I can access my Zettelkasten notes, databases, and diary whether or not Obsidian exists.
That said, as a homelabber, I want to be able to access my Obsidian Vault from anywhere. While I use the Obsidian LiveSync plugin on my personal devices, there are times when I would prefer not to sync my entire vault locally, such as on corporate devices.
I’ve tried multiple solutions. SilverBullet is a nice open-source web app, however, its syntax isn’t 100% compatible with Obsidian. VS Code and Zed remote development, as well as code-server, are also similar solutions.
In the end, for the past few months, I’ve been using linuxserver/obsidian, which is a web VNC (Selkies) wrapper for Obsidian. It works, and I’m thankful it has proper IME and clipboard support, which is often difficult to achieve with remote desktops. However, the experience, especially when dealing with high latency, is not ideal and doesn’t feel like a true web app. Since Obsidian is an Electron app anyway, I wonder if it’s possible to run the frontend of Obsidian on the web, similar to code-server.
Ignis
To my surprise, I recently discovered a project called Ignis through Self-Host Weekly. Unlike other VNC-based solutions that allow users to access their vaults from the browser, Ignis leverages Obsidian’s Electron APIs to provide a semi-native web-based experience connected to a vault stored on a central server, which is exactly what I was looking for.
Deploying Ignis is straightforward using either Docker or Podman. Personally, I run it via a rootless Podman Quadlet on a development VM inside my homelab PC.
10<br>11<br>12<br>13<br>14<br>15<br>16<br>17<br>[Unit]<br>Description=Ignis Container<br>After=network-online.target
[Container]<br>Image=docker.io/nobbe/ignis:latest<br>ContainerName=ignis<br>AutoUpdate=registry<br>Environment=PUID=0<br>Environment=PGID=0<br>Volume=/home/mudkip/Containers/ignis/data:/app/data:z<br>Volume=/home/mudkip/Containers/ignis/obsidian-app:/app/obsidian-app:z<br>Volume=/home/mudkip/Containers/obsidian/vault:/vaults:z<br>PublishPort=8086:8080
[Install]<br>WantedBy=default.target
Syncing
While Ignis supports the official Obsidian Sync via Obsidian Headless, I use Obsidian LiveSync, so I had to figure out how to properly handle my vault synchronization. My initial idea was simply to keep the linuxserver/obsidian container running in parallel to handle the syncing on the same vault, but things got interesting when I turned on community plugins inside Ignis.
Technically, Ignis supports most community plugins, and seemingly including LiveSync. When I enabled community plugins, it just started syncing right away because the configuration files were already sitting in the vault’s .obsidian folder. However, the moment I opened Ignis in a second browser, it began uploading everything all over again.
This happens because LiveSync’s index database doesn’t live on the server. It lives in the browser’s local storage. To LiveSync, every new browser looks like a completely separate device. This behavior is a dealbreaker for a self-hosted setup and introduces a scary risk of data corruption.
To prevent this, I had to disable community plugins in Ignis entirely. Unfortunately, this also disabled essential plugins like Calendar and Tasks, meaning the web experience no longer matched my setup on other devices.
Luckily, while digging back into the LiveSync repository, I discovered they recently added a dedicated CLI tool. I struggled to get it working at first, but after diving into the source code, I uncovered a mismatch between the documentation and the actual implementation. In a nutshell, you can run LiveSync headlessly using the following commands:
10<br>11<br># Set up an alias. Replace the data and vault directories with your own.<br># Switch 'podman' to 'docker' if that is your container runtime of choice.<br>alias livesync-cli='podman run -it --rm -v /var/home/mudkip/Containers/obsidian/data:/data:z -v /var/home/mudkip/Containers/obsidian/vault/Mudkip:/vault:z ghcr.io/vrtmrz/livesync-cli:latest'
# CRITICAL: Do NOT run `livesync-cli init-settings` as it will break the setup command.
# Import your LiveSync configuration via a Setup URI<br>livesync-cli setup "obsidian://setuplivesync?settings=..."
# Trigger the initial synchronization<br>livesync-cli --vault /vault --verbose sync
To fully automate the setup, I wrapped this headless LiveSync CLI into a Podman Quadlet so it runs as a background daemon.
10<br>11<br>12<br>13<br>14<br>15<br>16<br>17<br>18<br>19<br>20<br>21<br>[Unit]<br>Description=Obsidian LiveSync...