Environment variable reference for YotoShelf. All knobs, their defaults, and when to set them.
Configuration is loaded from environment variables with the prefix YOTOSHELF_.
Precedence: CLI flags > environment variables > built-in defaults.
There is no config file; pass everything via the environment.
Core
Variable
Default
Description
YOTOSHELF_DB_PATH
yotoshelf.db
Path to the SQLite database file. Put this on a persistent volume.
YOTOSHELF_LISTEN_ADDR
:8080
HTTP listen address and port.
YOTOSHELF_LIBRARY_PATH
library
Directory for audio files, cover images, and generated assets. Put this on a persistent volume.
YOTOSHELF_PUBLIC_URL
—
Externally visible base URL (e.g. https://yotoshelf.example.com). Required for OAuth callbacks and share links to work correctly.
Security
Variable
Default
Description
YOTOSHELF_SESSION_SECRET
—
Signing key for session cookies. Minimum 32 bytes. Required. Rotate to invalidate all active sessions.
YOTOSHELF_ENCRYPTION_KEY
—
Key for encrypting Yoto OAuth tokens at rest. Minimum 32 bytes. Required. Changing this invalidates stored tokens, so users must re-link their Yoto accounts.
YOTOSHELF_SECURE_COOKIES
true
Set the Secure flag on session cookies. Set to false for local HTTP development only.
YOTOSHELF_TRUST_PROXY
false
Read real client IP from X-Forwarded-For. Enable when behind a reverse proxy.
YOTOSHELF_SESSION_MAX_AGE
604800
Session lifetime in seconds. Default is 7 days.
Authentication
Variable
Default
Description
YOTOSHELF_LOCAL_AUTH_ENABLED
true
Enable local username/password login. Set to false to require OIDC.
YOTOSHELF_REQUIRE_EMAIL_VERIFICATION
true
Require users to verify their email address after registration.
YOTOSHELF_PASSWORD_MIN_LENGTH
10
Minimum password length for local accounts.
YOTOSHELF_LOCKOUT_THRESHOLD
5
Failed login attempts before account lockout.
YOTOSHELF_LOCKOUT_DURATION
900
Lockout duration in seconds (default: 15 minutes).
OIDC (single sign-on)
YotoShelf supports OpenID Connect for SSO. When configured, users authenticate via
an external identity provider. The OIDC flow uses PKCE S256, nonce verification,
and email_verified enforcement.
Variable
Default
Description
YOTOSHELF_OIDC_ISSUER
—
OIDC issuer URL, e.g. https://auth.example.com/application/o/yotoshelf/
YOTOSHELF_OIDC_CLIENT_ID
—
OAuth 2.0 client ID from your identity provider.
YOTOSHELF_OIDC_CLIENT_SECRET
—
OAuth 2.0 client secret.
YOTOSHELF_OIDC_REDIRECT_URL
{PUBLIC_URL}/auth/oidc/callback
OAuth callback URL. Defaults to the PUBLIC_URL-relative path.
Configure your IdP's backchannel logout to send POST requests to
/auth/oidc/backchannel-logout. When LOCAL_AUTH_ENABLED=false,
the first OIDC user to log in is auto-promoted to admin.
Yoto API
Variable
Default
Description
YOTOSHELF_YOTO_CLIENT_ID
—
Yoto OAuth application client ID. Required for publishing cards to Yoto accounts.