A web front door for your self-hosted files.
Browse your WebDAV library, preview photos and videos, and collect private uploads.
Keep your files on your own server, with transfers going directly to the source.
Screenshots use the built-in demo. The interface supports English and Simplified Chinese and follows the browser language.
LanternDock turns an existing WebDAV server into a file portal for desktop, tablet and mobile. Deploy the frontend on Cloudflare Workers and connect it to your storage over HTTPS or through webtransport-bridge.
Use any compatible WebDAV server for browsing. Add the included Go backend when you need a public read-only library, indexed media albums, private file collection or member upload permissions. File contents travel between the browser and your backend; the Worker serves the portal, connection metadata and optional identity endpoints.
| Capability | What you can do |
|---|---|
| File browsing | Navigate directories, search and filter the current folder, sort files, and switch between list and grid views. Share direct links to folders and previews. |
| Photos and video | Browse albums, load thumbnails on demand, preview images and text, and play supported videos. The included backend adds indexed recursive albums, IIIF previews, Live Photos and Motion Photos. |
| Transfers | Download with progress and cancellation, stream to disk where supported, and upload multiple files with a queue, per-file cancellation and the option to add more files. |
| Private collection | Create expiring invitation links with size, capacity and file-count limits. Copy, share or show a QR code, and retrieve eligible active links again from administration. |
| Accounts and permissions | Sign in through OIDC/CIMD. Administrators manage invitations, private inboxes and direct upload permissions for members, including daily file-count and per-file limits. |
| Personal preferences | Keep favorites and recent files in the visitor's browser. Use the same responsive interface in English or Simplified Chinese. |
Collection, identity-backed upload permissions and indexed media features require the included backend. A third-party WebDAV server retains ordinary file browsing and current-folder albums. See compatibility and limits for the current boundaries.
Requires Node.js 22.12+ and npm.
git clone https://github.com/longern/lantern-dock.git
cd lantern-dock
npm ci
npm run init
npm run devOpen http://127.0.0.1:8787. The setup wizard guides you through the connection settings. Choose its demo option to explore sample files before configuring storage.
To connect an existing WebDAV server, add its full URL to the generated .env, keeping the existing SECRET_KEY, then restart the development server:
WEBDAV_URL="https://files.example.com/dav/public/"The backend must support PROPFIND with Depth: 1, GET and HEAD, with CORS allowing the frontend origin. Protected backends can use Basic or Bearer authentication; visitors enter their credentials in the connection dialog.
For a bridge connection, set WEBTRANSPORT_URL instead. Configure exactly one of these two URLs. The wizard can generate the configuration for either mode; see the configuration guide for authentication, CORS and certificate setup.
The frontend and storage backend are deployed separately. Choose the storage option that fits your setup:
| Storage option | Requirements | Guide |
|---|---|---|
| Existing WebDAV server | An HTTPS WebDAV endpoint with CORS, or a compatible WebTransport bridge. | Connection configuration |
| Included NAS backend | Docker Compose, a public folder and persistent private storage. Published images support linux/amd64 and linux/arm64. |
NAS deployment |
From the installed repository:
npx wrangler login
npm run deployOpen the deployed site and complete the setup wizard. Import its generated variables into the Cloudflare dashboard, mark SECRET_KEY as a Secret, and deploy the variable changes. Allow the deployed frontend origin on the backend or bridge, then recheck the connection.
npm run deploy builds the frontend and deploys it with the Worker. Local .env values are not uploaded automatically. The supplied Wrangler configuration provisions or reuses the KV binding for certificate metadata and preserves dashboard variables on subsequent deployments.
For WebTransport, follow the certificate update setup so the bridge can publish its current certificate hashes.
The supplied compose.nas.yaml runs the NAS service and WebTransport bridge. Configure the public folder, site origin, certificate webhook and persistent NAS SECRET_KEY using the NAS guide, then start the services:
docker compose -f compose.nas.yaml pull
docker compose -f compose.nas.yaml up -dThe public folder is mounted read-only. Uploads, quotas, the database and media caches live in a separate private data volume. The container supports PUID and PGID for matching your NAS account and runs the application as a non-root user.
The default image is ghcr.io/longern/lantern-dock:latest; set NAS_IMAGE to pin a published version, commit tag or digest. Keep the private volumes and NAS SECRET_KEY when updating. Frontend-only and documentation-only commits do not rebuild or publish the NAS image.
- Set
OIDC_ISSUER_URLon the Worker. The project integrates with workers-sso; a CIMD-capable provider needs no client registration or client secret. - Set
SITE_ORIGINon the NAS to the deployed frontend's HTTPS origin. - Sign in, copy your site subject from My account, and add it to the NAS
ADMIN_SUBJECTSsetting. Apply the environment change and recheck your account. - Open Administration from Me on compact layouts or My account on desktop.
Signing in identifies a member; the NAS decides their permissions. Administrators can grant direct uploads from Users, with deposits kept in the granting administrator's private inbox. See authentication setup and direct upload permissions.
- Choose Invite others to upload from Files, or create an invitation in Administration.
- Keep the defaults or adjust the note, expiry and upload limits, then create the link.
- Copy the link, use system sharing where available, or display its QR code. Recipients can upload without creating an account.
- Review received files and quota usage in Administration. Download from the private inbox, or revoke the invitation to stop further uploads.
Collected files stay private until you choose to publish them. Revoking or expiring an invitation preserves completed files. Eligible active invitations can be shared again without resetting their expiry, quotas or received files; older hash-only invitations require the original saved link.
flowchart LR
Browser["Browser"] -->|"Portal, configuration, identity"| Worker["Cloudflare Worker"]
Browser -->|"HTTPS / WebDAV and APIs"| Storage["WebDAV server or included NAS backend"]
Browser -->|"WebTransport"| Bridge["webtransport-bridge"]
Bridge -->|"HTTP / WebDAV and APIs"| Storage
- Frontend: Preact and Vite, with a single SPA entry. Public pages load directly; administration and its dedicated styles load on demand.
- Worker: Serves assets and public connection metadata, handles optional OIDC login, and issues short-lived, browser-bound NAS grants.
- Backend: Owns storage and authorization. The included Go service provides read-only WebDAV, a media index, private uploads and SQLite-backed quotas.
- Bridge: Optional transport for reaching the backend over WebTransport. Both connection modes use the same WebDAV and API contracts.
Backend Basic/Bearer credentials and NAS grants stay in page memory. Site login uses an encrypted HttpOnly cookie and a non-extractable browser proof key. Collection links are bearer permissions: anyone holding a full link can upload within its limits. The NAS encrypts recoverable invitation credentials using its persistent SECRET_KEY; the NAS and Worker may use independent values under the same variable name.
Permissions and path restrictions are enforced by the backend. Frontend navigation settings do not replace access control. See the identity protocol and backend contract for the trust model and service boundaries.
| Area | Current behavior |
|---|---|
| WebTransport | Requires a compatible browser, a secure frontend context and a reachable UDP endpoint. There is no automatic HTTPS fallback. |
| Media previews | Images, text and browser-supported video. Codec support depends on the browser; playback does not transcode video. PDF, archive and audio-only previews are not implemented. |
| Downloads | Stream to disk where browser file pickers are supported. The memory-buffered fallback has a 256 MiB limit. |
| Uploads | Keep the page in the foreground; locking the device or switching apps can interrupt transfers. Guest links support resuming with the original file in the same tab on compatible NAS versions. Authenticated uploads currently restart interrupted files. |
| Search and albums | File search is local to the current directory. Recursive albums require backend SEARCH support; the included NAS maintains the index. |
| Validation | Automated tests cover Chromium desktop, tablet and mobile viewports, with local real-bridge integration tests. Physical devices and individual third-party backends need separate validation. |
See image delivery, video playback and Live Photos for format support and resource limits.
| Topic | Guide |
|---|---|
| Deploy and connect | Configuration, CORS and certificates · NAS server 68CC and Docker Compose |
| Accounts and permissions | Authentication setup · Identity protocol |
| Media | Images and caching · Video playback · Live Photos and Motion Photos |
| Navigation and interface | Page URLs · UI conventions · Translations |
| Protocols | Backend API contract · Bridge protocol |
| Development | Project layout, checks and integration tests |
LanternDock is experimental and under active development. Public browsing, private collection links, member upload permissions, media previews and browser administration are implemented. Storage APIs and deployment settings may evolve; review changes before updating a deployment.
Current follow-up areas include resumable authenticated uploads, isolated personal spaces and predefined authorized tasks. Proposals and priorities are discussed in Issues.
Bug reports, documentation improvements and pull requests are welcome. For larger changes, open an issue first to discuss the approach.
For bug reports, include your browser and version, connection mode, relevant frontend/backend versions, reproduction steps and errors. Remove credentials, collection tokens and private webhook URLs from anything you share.
Run the relevant checks before submitting code:
npm run format:check
npm run check
npm testUI changes should also run the browser tests; transport changes should run the real-bridge integration tests. The Go backend requires Go 1.26+ for source development. See the development guide for commands and prerequisites.
LanternDock is licensed under the MIT License.