Skip to content

Environment Variables

VariableDescriptionDefault
BLOG_PORTHTTP listen port8080
BLOG_CONTENT_DIRContent directory path/data/content
BLOG_CONFIG_DIRConfig directory path/data/config
BLOG_LOG_LEVELLog level (debug, info, warn, error)info
BLOG_TLS_DOMAINEnable auto-TLS for this domain(disabled)

Examples

bash
# Custom port
docker run -e BLOG_PORT=3000 -p 3000:3000 ...

# Debug logging
docker run -e BLOG_LOG_LEVEL=debug ...

# Auto-TLS (HTTPS)
docker run -e BLOG_TLS_DOMAIN=blog.example.com -p 443:443 -p 80:80 ...

When BLOG_TLS_DOMAIN is set, Skriva automatically:

  • Obtains a TLS certificate from Let's Encrypt
  • Redirects HTTP (port 80) to HTTPS (port 443)
  • Renews the certificate before expiry
  • Sets HSTS headers for browser enforcement

Released under the MIT License.