Skip to main content

Command Palette

Search for a command to run...

Taking notes with SilverBullet.md

Updated
3 min read
Taking notes with SilverBullet.md

About two years ago, I wrote about my productivity trio, which includes Notes, MindMap, and Todo lists. In that article, I explained my setup using simple Bash scripts and plain text Markdown files to organize my notes. As a big fan of simple tools and plain text note-taking, I was thrilled to discover SilverBullet.md a few months ago. I liked it immediately and ended up migrating all my notes to it.

So what makes it interesting? Here’s why I switched:

Markdown + Local Files

Like Obsidian, SilverBullet stores everything as Markdown files. That means I can keep using all my existing plain-text tools.

I run a cron job that automatically creates Git commits, so I can easily revert or browse history. I also use Syncthing to sync across multiple devices. And when I need heavy editing or bulk reorganization, I just open the folder in Neovim.

If I ever want to leave SilverBullet, I simply copy the files and move on. No vendor lock-in.

Web interface with PWA

This might sound counter-intuitive: why choose a web app over a native app?

Portability.

I host SilverBullet on a cheap $5 Hetzner cloud server that I already use for other projects. Then I install it as a PWA on my phone and tablet. Now my notes are available everywhere.

SilverBullet caches the entire space using web workers, so it works fully offline too. It honestly feels like a native app on every platform.

Here is my Podman Compose definition for SilverBullet

  psuite-wiki:
    image: docker.io/zefhemel/silverbullet:2.3.0
    container_name: psuite-wiki
    hostname: psuite-wiki
    restart: always
    environment:
      - SB_FOLDER=/psuite-data/psuite-wiki/data
      - SB_NAME=Wiki
      - SB_DESCRIPTION=Jayadeep's personal Wiki
      - GUID=1000
      - PUID=1000
      - SB_USER=wiki:${WIKI_PASSWORD}
    volumes:
      - /opt/podman-compose/mounts/syncthing/data:/psuite-data
    ports:
      - "3000:3000"
    networks:
      - psuite-network
    healthcheck:
      test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s

Programmable notes

SilverBullet comes with a built-in embedded language called Space Lua. You can add scripts directly inside your notes and render dynamic content in real time. This is a powerful feature that lets you extend your notes, for example:

  • Query your notes like a database. Filter using tags or attributes and show them as a table or in any format you like.

  • Run Network calls, execute Bash scripts. I have a script that runs git commit as a cron job, written in Space Lua

Here is an example from my notes. The MindMap page contains a custom command that can create a new MindMap page based on today’s date. Then there is a Lua query that lists all MindMap pages in a table.

The corresponding query is

${ template.each(query[[
  from index.tag "mindmap"
]], templates.fullPageItem)}

If you are interested in my setup, all my Homelab and cloud config are open source. You can find the Ansible playbook for SilverBullet and related services here