This is a simple guide to setup SilverBullet on any 64-bit Debian derivative (Debian, RaspianOS, Ubuntu) and exposing it to the Internet using Tailscale.
Features:
- Quick to set up
- Enables simple username/password authentication
- Exposes your SilverBullet to the Internet (or local Tailscale VPN) via HTTPS, via a
*.ts.net
domain - Auto upgrades (daily in case of new releases)
- Automatically comes back up if your machine restarts
Requirements:
- A free tailscale account
- A 64-bit Linux machine (e.g. a Raspberry Pi 3B+, or a cheap VPS from e.g. Linode, DigitalOcean, Vultr, or Hetzner) running a Debian-derivative OS with 1GB of RAM (to be safe, but less may be possible)
Login to the Linux machine and install Docker and Tailscale:
$ sudo apt update
$ sudo apt install curl docker.io
$ curl -fsSL https://tailscale.com/install.sh | sh
$ sudo tailscale up
Click the auth link, login to your Tailscale account. Then, visit your tailscale admin DNS page: Tailscale and enable āMagicDNS.ā
Go back to your Linux machine and create a folder for your space where your content (markdown files, attachments) will be kept:
$ mkdir space
Start the SilverBullet container with docker. Important: in this command replace sb:12345
with a better username:password
combo.
$ sudo docker run -d --name silverbullet -e SB_USER=sb:12345 --restart=unless-stopped -p 3000:3000 -v $PWD/space:/space zefhemel/silverbullet:latest
For the adventurous: you can replace :latest
with :edge
to use edge builds: Living on the edge (builds)
SilverBullet now runs and is available on your machineās IP at port 3000.
(Inter)net access
To expose SB via HTTPS (which is a requirement for many PWA features to work, including sync and working offline), you have two options:
- Enable Internet-wide access (you can access your SB instance from anywhere through its assigned URL)
- You restrict access to devices that are connected to your Tailscale VPN
To enable Internet-wide access use tailscale funnel:
$ sudo tailscale funnel --bg 3000
Or to only allow access from within your Tailscale VPN use tailscale serve:
$ sudo tailscale serve --bg 3000
Both will give you a https URL to access your SB (just one is accessible from the Internet, the other is not).
Note: Devices connected to your Tailscale VPN will use the shortest path to your machine (can be direct via your LAN or relayed via Internet Tailscale relay servers), so performance is generally better when connected via the Tailscale VPN client.
Automatic upgrades
Enable automatic upgrades with the watchtower container:
$ sudo docker run -d --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower
This will check daily if a new version of SilverBullet is available, pull the new container image and start a new container using it.
Enjoy!