Docker is a convenient and secure way to install server applications either locally or on a server you control.
Conveniently, SilverBullet is published as a docker image on GHCR. The image supports a few architectures:
Every release version of SilverBullet is tagged with its version number, but there are two release channels you can use:
:latest always points to the latest release.:edge always points to the latest edge build (the last commit to main).The default image includes Chromium and enables the Integrations/Runtime API. For the smaller image without Chromium, use :edge-slim instead of :edge or legacy :v2, :latest-slim instead of :latest, or append -slim to a version such as :2.11.0-slim.
To publish a folder as a read-only website, use the publish image: :publish (the same as :latest-publish), :edge-publish, or a version with -publish appended, such as :2.12.1-publish. See #Publishing a website.
Until the next release, use :edge-publish: :publish and :latest-publish only exist once a release includes the publish image.
3000, so be sure to port-map that, e.g. via -p 3000:3000 (note: the first 3000 is the external port)/data as the data root folder. You can connect a docker volume, or a host folder to this, e.g. -v /home/myuser/silverbullet:/data/data and run the server process with the same UID and GID so that permissions will just magically work. If you’d like to override this UID, set the PUID and PGID environment variables (see Administration/Server/Configuration for details).FROM zefhemel/silverbullet followed by RUN apk add --no-cache <package>.note Note The same docker images are both available from GHCR and Docker Hub, use whichever you prefer.
To check the version you’re running, use the ${widgets.commandButton("Client: Version")} command. Note that after an upgrade you may have to reload your (browser) client twice, to fully activate the new version.
Docker compose is a simple tool to manage running of multiple containers on a server you control, it is distributed with (modern) versions of docker. It is the recommended way to manage SilverBullet.
Below is a basic compose.yml that runs SilverBullet, check Administration/Server/Configuration for additional configuration options.
Instructions:
./data directory (will be auto-created if it doesn’t already exist) in the same directory as the compose.yml file as the place where SB will keep its data.services:
silverbullet:
image: ghcr.io/silverbulletmd/silverbullet:latest
restart: unless-stopped
volumes:
- ./data:/data
ports:
- 3000:3000
Boot this up via:
docker compose up -d
And watch for logs with:
docker compose logs -f
To upgrade, change the specific version you point to in your compose.yml file (not necessary when using :latest, :edge, or the legacy :v2) and then:
docker compose pull
docker compose stop
docker compose up -d
If you don’t want to use docker compose, you can run SilverBullet “raw” as follows:
# Create a local folder "data" to keep files in
mkdir -p data
# Run the docker container in the background
docker run -d --restart unless-stopped \
--name silverbullet \
-p 3000:3000 \
-v ./data:/data \
ghcr.io/silverbulletmd/silverbullet:latest
There you go!
To upgrade your version of SilverBullet, first pull the new image:
docker pull ghcr.io/silverbulletmd/silverbullet:latest
# Then stop the current container
docker stop silverbullet
# Remove the existing container
docker rm silverbullet
Then start the container again as before.
The publish image runs silverbullet publish instead of a normal server. It serves whatever is in /site as a public, read-only website, without accounts:
docker run -d --restart unless-stopped \
--name docs \
-p 3000:3000 \
-v ./docs:/site:ro \
ghcr.io/silverbulletmd/silverbullet:publish
It works differently from the default image:
/site, not /data, and there is no setup wizard or Dashboard.65534, and PUID and PGID don’t apply. The files in /site must be readable by that user, which world-readable files already are.docker run --read-only both work.To bake the pages into your own image instead, and for the settings, see Publishing#Publish a folder as a website.
After your container is running, head over to http://localhost:3000 (or whatever port you have configured) to setup your server.