If the server is updated, but the client doesn't match the server version, a notification will appear instructing the user to reload.
3.8 KiB
#getting-started
SilverBullet is primarily configured via environment variables. This page gives a comprehensive overview of all configuration options. You can set these ad-hoc when running the SilverBullet server, or e.g. in your Install/Docker.
General configuration
SB_INDEX_PAGE: Sets the default page to load, defaults toindex.SB_SPACE_IGNORE: Ignore certain path patterns based on a .gitignore style format, e.g.SB_SPACE_IGNORE="IgnoreMe/*".SB_HTTP_LOGGING: Set to any value to enable HTTP loggingSB_LOG_PUSH: Set to any value to ask clients to push their logs to the server (for debugging purposes)
Network
SB_HOSTNAME: Set to the hostname to bind to (defaults to127.0.0.0, set to0.0.0.0to accept outside connections for the local setup, defaults to0.0.0.0for docker)SB_PORT: Sets the port to listen to, e.g.SB_PORT=1234, default is3000SB_URL_PREFIX: Host SilverBullet on a particular URL prefix, e.g.SB_URL_PREFIX=/notes
Authentication
SilverBullet supports basic authentication for a single user.
SB_USER: Sets single-user credentials, e.g.SB_USER=pete:1234allows you to login with username “pete” and password “1234”.SB_AUTH_TOKEN: EnablesAuthorization: Bearer <token>style authentication on the HTTP API.SB_LOCKOUT_LIMIT: Specifies the number of failed login attempt before locking the user out (for aSB_LOCKOUT_TIMEspecified amount of seconds), defaults to10SB_LOCKOUT_TIME: Specifies the amount of time (in seconds) a client will be blocked until attempting to log back in, defaults to60.SB_REMEMBER_ME_HOURS: Sets the session duration in hours when "Remember me" is checked during login, defaults to 7 days.
Storage
SilverBullet supports storage backends for keeping your Space content. Right now the only supported backend is to use your local disk.
Disk storage
This is the default and simplest backend to use: a folder on disk. It is configured as follows:
SB_FOLDER: Sets the folder to expose. In the docker container, this defaults to/space.
Run mode
SB_READ_ONLY(==Experimental==): If you want to run the SilverBullet client and server in read-only mode (you get the full SilverBullet client, but all edit functionality and commands are disabled), you can do this by setting this environment variable totrue. Upon the server start a full space index will happen, after which all write operations will be disabled.
Security
SilverBullet enables plugs to run shell commands. This is potentially unsafe. If you don’t need this, you can disable this functionality:
SB_SHELL_BACKEND: Enable/disable running of shell commands from plugs, defaults tolocal(enabled), set tooffto disable. It is only enabled when using a local folder for #Storage.SB_SHELL_WHITELIST: Allow only a specific list of shell commands (just the first command name, not arguments). When not set, allows all shell commands. Example:SB_SHELL_WHITELIST="git pandoc"
Docker
Configuration only relevant to docker deployments:
PUID: Runs the server process with the specified UID (default: whatever user owns the/spacemapped folder)PGID: Runs the server process with the specified GID (default: whatever group owns the/spacemapped folder)\
Metrics
SilverBullet offers a few basic Prometheus metrics, these can be configured with the following environment variables:
SB_METRICS_PORT: HTTP port to expose metrics (under the default/metricsendpoint) on
Web app manifest
Configure aspects of web app appearance as well as the authentication page:
SB_NAME: Setsnameandshort_namemembers of web app manifest to whatever specified inSB_NAMESB_DESCRIPTION: Setsdescriptionmember of web app manifest to whatever specified inSB_DESCRIPTION