You can deploy SilverBullet to Deno Deploy for free, and store space content in Deno KV. This is a convenient option to deploy SilverBullet in the cloud, without having to run or pay for a server.
Note: this setup is highly experimental, rarely used and may break at any time. We recommend using another deployment method.
Steps
Sign up for a (free) Deno Deploy account and “Create an empty project” there.
Jump to the “Settings”, give your project a nicer name, and configure the following environment variables:
SB_FOLDER: db://
SB_PORT: 8000
SB_SYNC_ONLY: 1 (Deno Deploy does not currently support Workers, so running indexing etc. on the server will not work)
SB_USER: (e.g. pete:letmein) — this is super important otherwise your space will be open to anybody without any authentication
SB_AUTH_TOKEN: (Optional) If you would like to migrate existing content from elsewhere (e.g. a local folder) using [[Sync]], you will want to configure an authentication token here (pick something secure).
This will ask you to authenticate with your Deno Deploy account, and then deploy SilverBullet.
Migrating and backing up content
This setup stores your space in Deno’s KV database, which is still a beta feature and not specifically designed for this purpose. Therefore it’s recommended to use something like Sync to make backups elsewhere.
For this, be sure to also configure a SB_AUTH_TOKEN variable.
I don’t know the details about SBs internals, but sketch my vision, correct me, if I’m wrong:
deno.dev allows you to sync with any github repo. So you can fork any version of silverbullet and could run directly deploy it (without installing anything at all).
You can upgrade your mirror anytime, so you decide when to upgrade.
Only missing part is the single entrypoint of the project for deno deploy.
Yes, SB requires a build step (to build the plugs, Frontend and bundle them up in a single JS file) if that can somehow be automated as part of the Deno deploy process you don’t need to do a local checkout. Theoretically this should be doable perhaps with the help of GitHub actions somehow.
Is there a way to make this work with Git Sync? I managed to complete the setup for a friend and we got a working password-protected instance, but without a backup server that I would know better, it feels too risky to use seriously.
You may want to look at fly.io. I think will be possible to run there (if you limit it to just one container). Will take some fiddling, but I think I managed to at some point in the past.
And if you get that to work, be sure to post it in Guides
Is running SilverBullet on Deno Deploy a popular option? What’s the experience like?
I ask because I’ve been trying to deploy it; I was struggling and then got a somewhat working version but there was a lot of lag. I am new to both Deno Deploy and Silver Bullet so want to ask if this is a well trodden path and if the end result - Silver Bullet on Deno Deploy - is a sensible thing to work towards.