SilverBullet install using Alpine Linux (with go)

Last night I migrate from 0.10.4 to 2.1.9. It was an adventure, but loving SilverBullet v2. Wanted to give back to the community and looking for feedback to improve the guide.

SilverBullet install using Alpine Linux

Container

I use Proxmox, but this process should work for other containers and virtual machines using Alpine Linux (Alpine).

Alpine LXC container.

  • Memory: 512 MiB
  • Swap: 512 MiB
  • Cores: 1
  • Root disk: 2 GB

As of October 17, 2025, Alpine v3.22 (stable) does not have a go package meeting SilverBullet’s go 1.25.1 dependency. However, Alpine edge (testing) does.

Migrate from Alpine v3.22 to edge

Upgrade

Upgrade v3.22 packages before proceeding.

apk update
apk upgrade
reboot

Reboot if kernel or core package updates.

Update repositories

Edit /etc/apk/repositories and replace current version, v3.22, with new version, edge.

Results

https://dl-cdn.alpinelinux.org/alpine/edge/main
https://dl-cdn.alpinelinux.org/alpine/edge/community

Migrate

Upgrade to the new version.

apk update
apk upgrade --available && sync
reboot

Check os-release.

cat /etc/os-release

Results from migrating to edge.

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.23.0_alpha20251016
PRETTY_NAME="Alpine Linux edge"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Packages

Install build and utility packages.

apk update && apk upgrade && apk add make deno go git zip curl

User account

Create a group and system account silverbullet for running SilverBullet.

addgroup -S silverbullet
adduser -D -S -G silverbullet silverbullet

-S sets group and user as system account.
-D sets no password for the account.

The user account’s home, /home/silverbullet, will be where SilverBullet stores markdown files.

Building

SilverBullet releases are not built against musl so downloading the binary release for linux is not an option. (Is this true? Unverified.) Correction: binary release should work per Zef.

mkdir /tmp/working
cd /tmp/working
curl -LO https://github.com/silverbulletmd/silverbullet/archive/refs/tags/2.1.9.tar.gz
tar xvf 2.1.9.tar.gz
cd silverbullet-2.1.9
make
cp /tmp/working/silverbullet-2.1.9/silverbullet /usr/local/bin/

OpenRC

Create OpenRC init script.

touch /etc/init.d/silverbullet
chmod +x /etc/init.d/silverbullet

copy+paste

#!/sbin/openrc-run

description="SilverBullet note taking app"
pidfile="/run/silverbullet.pid"
command_background=true
command="/usr/local/bin/silverbullet -"
command_args="-L0.0.0.0 /home/silverbullet"
command_user="silverbullet:silverbullet"

depend() {
        need net
}

Test using rc-service silverbullet start. If all works, then

rc-update add silverbullet default

Done!

Testing

I found it useful during the initial install to execute silverbullet from the terminal, however, a system account by default does not have a shell set (/sbin/nologin). Either edit /etc/passwd or install the shadow package, apk add shadow, and use chsh command to set the shell to /bin/sh. Once complete, launch silverbullet to review its output.

su - silverbullet silverbullet -L0.0.0.0 /home/silverbullet

Once testing is complete, restore the account’s shell to /sbin/nologin.

Nice. As a note, if you’re ok with simply using the binary Linux releases you don’t need to compile any code, so the Go requirement isn’t there either. The docker images for instance are based on alpine without Go in them.

Well, heck. :slight_smile: Good to know and I should not assume.

I attempted to use the binary for 2.1.9 and it did not work. I didn’t spend time troubleshooting and immediately pivoted to installing go and compiling. I should have posted here and asked for help first.

Using your binary would simplify the installation. Next time I update SilverBullet, I will spin up a new container, use the binary, and reach out to the community for help with any problems.

Hopefully the guide would be useful if someone wants to contribute code. If not, feel free to delete it. I didn’t mean to post nonsense.

1 Like