Self-hosting
By default, lukurauha shelf runs on Node.js with SQLite (data.db) and local disk storage (uploads/). A single server process is all that is required.
Decide your URL before setup
Section titled “Decide your URL before setup”Check these two points before creating the first account:
- Passkeys are bound to your domain. Finalize your public HTTPS domain before creating your first passkey—changing the domain later prevents existing passkeys from signing in.
- If you plan to invite others, review Inviting people and update
/aboutand/privacy(see Customizing) first.
Deploy on Node.js
Section titled “Deploy on Node.js”Assuming your scaffolded project is on a server with Node.js 24+ and pnpm:
-
Install dependencies and build the production bundle:
Terminal window pnpm installpnpm build -
When running behind a TLS-terminating reverse proxy, set
EMDASH_SITE_URLso EmDash generates redirects and links with the public origin:Terminal window export EMDASH_SITE_URL="https://example.com" -
Start the built server:
Terminal window pnpm start -
Open
/_emdash/adminon your public URL and create the first administrator account.
Once you can sign in on the home page and open a book, deployment is complete. See the EmDash Node.js deployment guide for reverse-proxy and process-manager details.
Backups and migration
Section titled “Backups and migration”In the default setup, persistent state lives in two places:
| Data | Path |
|---|---|
| Accounts, stored books, CMS pages | data.db (SQLite) |
| Files uploaded through the EmDash admin | uploads/ |
Back up or migrate data.db and uploads/ together.
Deploy on Cloudflare
Section titled “Deploy on Cloudflare”EmDash also supports Cloudflare Workers with D1 and R2. Because @lukurauha/shelf/plugin is a native EmDash plugin, no separate sandboxRunner configuration is needed.
Replace @astrojs/node with @astrojs/cloudflare, and replace sqlite() / local() with d1() / r2() from @emdash-cms/cloudflare in astro.config.mjs:
import node from "@astrojs/node";import cloudflare from "@astrojs/cloudflare";import { d1, r2 } from "@emdash-cms/cloudflare";import lukurauhaShelf, { libraryPlugin } from "@lukurauha/shelf";
export default defineConfig({ output: "server", // Keep trailingSlash, react(), and lukurauhaShelf() as configured adapter: node({ mode: "standalone" }), adapter: cloudflare(), integrations: [ emdash({ database: sqlite({ url: "file:./data.db" }), storage: local({ directory: "./uploads", baseUrl: "/_emdash/api/media/file", }), database: d1({ binding: "DB" }), storage: r2({ binding: "MEDIA" }), plugins: [libraryPlugin()], toolbar: false, }), lukurauhaShelf({ customCss: ["./src/styles/custom.css"] }), ],});Remove the unused sqlite and local imports.
Follow the EmDash Cloudflare deployment guide to configure your D1 and R2 bindings.