- CSS 31.3%
- Go 31%
- Vue 29.4%
- JavaScript 5%
- TypeScript 2.8%
- Other 0.4%
| .superdesign | ||
| cmd/lethe | ||
| docs | ||
| internal/server | ||
| public | ||
| scripts | ||
| web | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| compose.yaml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| index.html | ||
| Makefile | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
Lethe
A self-hosted file sharing platform for enterprise deployments, built in Go and Vue 3 + TypeScript. Employees create outgoing shares to send files outside the company, or reverse shares so external contacts can send files privately to employees. External contacts use the supplied links without an account.
Upload files or folders, create a link, and stay in control of its password, expiration, and download limit. Reverse shares (file requests) give external contacts a private place to send you files without creating accounts.
Run locally
Requires Go 1.26+, a C compiler (for embedded SQLite), and Node 22+.
npm ci
npm run build
go build -buildvcs=false -o bin/lethe ./cmd/lethe
./bin/lethe
Open http://localhost:8080. The binary includes the frontend; Node is only
needed during development/build. Data is stored in ./data by default.
Configure a local employee account or company OIDC using the variables below before signing in. With no authentication configured, the employee workspace remains locked.
For frontend development, leave the Go server running and run npm run dev in
another terminal. Vite forwards /api to the Go server at port 8080.
Docker
docker compose up --build -d
The image runs as a non-root user. The lethe-data volume contains SQLite,
uploaded files, and resumable upload staging. The default port mapping is bound
to localhost. Configure a reverse proxy for public HTTPS access.
Compose reads .env for the variables explicitly listed in compose.yaml. Add
any optional S3 or PostgreSQL variables to its environment section (or
use an env_file you control). The Go binary reads process environment variables;
it does not automatically load .env files.
What works
- Multi-file drag and drop, file selection, and folder selection retaining paths.
- Streaming, resumable uploads in bounded chunks. Pause/resume in the browser; after a reload, reselect the same original files to continue from saved offsets. Resumption requires the same browser profile and account. Unfinished uploads expire after 48 hours.
- Password-protected, unguessable share links and clean recipient pages.
- Time-based expiration, download limits, immediate revocation, extension, and permanent deletion.
- Single-file downloads and ZIP archives streamed without buffering full files in memory. ZIPs preserve folders and use the store method to avoid compressing large media files a second time.
- Private file request submissions, received files, activity, search, sorting, list/grid views, and real storage statistics.
- Per-user storage quotas (5 GB by default) and combined share limits (2 GB), with administrator controls for defaults and individual overrides.
- Optional local account and OIDC sign-in with discovery, verified ID tokens, PKCE, nonce/state checks, and optional domain restrictions.
- SQLite by default; optional PostgreSQL and S3-compatible file storage.
- System typography, responsive layout, keyboard focus, accessible dialogs, and reduced-motion support.
- Light, dark, and system appearance, with a saved browser preference and a quick theme toggle on workspace and public pages. Choose a mode in Settings → General → Appearance.
Configuration
See .env.example for all variables. Common settings:
| Variable | Default | Purpose |
|---|---|---|
LETHE_ADDR |
127.0.0.1:8080 |
Listen address; use :8080 inside containers |
LETHE_PUBLIC_URL |
http://localhost:8080 |
Origin used for share/request links and OIDC callback |
LETHE_DATA_DIR |
./data |
Database, file storage, and temporary uploads |
LETHE_WORKSPACE |
My workspace |
Organization/workspace display name, e.g. DigitalSign |
LETHE_VERSION |
0.1.0 |
Display version in Settings → General and the workspace footer |
LETHE_MAX_FILE_SIZE |
10737418240 |
Maximum individual file size, 10 GiB |
LETHE_STORAGE_LIMIT |
107374182400 |
Installation-wide reserved storage, 100 GiB |
LETHE_DEFAULT_USER_QUOTA |
5368709120 |
Initial per-user storage quota, 5 GiB; UI-managed after initialization |
LETHE_DEFAULT_MAX_SHARE_SIZE |
2147483648 |
Initial combined share limit, 2 GiB; UI-managed after initialization |
LETHE_ADMIN_EMAILS |
Empty | Comma-separated verified emails allowed to manage quotas |
LETHE_DEFAULT_EXPIRY_DAYS |
7 |
Server default for shares and incoming submissions |
LETHE_SECURE_COOKIES |
Auto from public URL | Set true for HTTPS reverse proxies |
Deployment version
Set LETHE_VERSION to the release or edition tag you want displayed, such as
1.2.0-enterprise or 1.2.0-staging. Settings → General shows
Lethe 1.2.0-enterprise, and the workspace footer uses the same value. Restart
the server (or recreate the Docker Compose container) after changing it. This
label identifies the deployment; it does not change the installed code or
feature set. LETHE_WORKSPACE=DigitalSign sets the organization name separately
from the Lethe product name.
Accounts
Workspace management always requires an employee session. Without a local account or OIDC provider configured, the sign-in screen explains that employee access is unavailable. There is no anonymous management workspace or public registration. Existing public download and reverse share links remain accessible under their normal link rules.
For a provisioned local employee account, set both LETHE_ADMIN_EMAIL and
LETHE_ADMIN_PASSWORD (12–72 bytes). Set LETHE_ADMIN_NAME for the greeting. These credentials are
synchronized at startup. No default password, public registration, or email
service is installed. Local credentials can be reset through the environment.
For OIDC, set LETHE_OIDC_ISSUER, LETHE_OIDC_CLIENT_ID, and, when required,
LETHE_OIDC_CLIENT_SECRET. Register this callback URL at your identity provider:
https://your-lethe.example/api/auth/oidc/callback
Use your organization’s employee identity provider. An identity must supply a verified
email address. Any valid identity from the configured issuer can sign in;
LETHE_OIDC_ALLOWED_DOMAINS=example.com,other.com restricts email domains. Set this allowlist if the issuer also serves external
identities. Every identity has its own share/request workspace;
storage quotas apply separately to each user. Identical email addresses from
different identities are not automatically linked. Add OIDC administrators to
LETHE_ADMIN_EMAILS; other OIDC users cannot change quotas. The configured local
account is automatically an administrator.
For Authentik, use the application-specific issuer, such as
https://authentik.example.com/application/o/lethe/ (including the trailing
slash), with the default per-provider issuer mode. Without a Signing Key,
Authentik signs tokens with HS256 using the provider's client secret. Lethe
supports HS256 when the issuer advertises it in discovery and
LETHE_OIDC_CLIENT_SECRET matches that secret. Public-key signing (such as RS256)
continues to use the issuer's JWKS. Leave Encryption Key empty; encrypted ID
tokens are not supported. See Authentik's OAuth2 provider documentation.
If sign-in returns Your identity could not be verified, check the Lethe
server logs for OIDC ID token verification failed, OIDC token response missing ID token, or OIDC ID token nonce mismatch. A successful Authentik /token/
response only confirms the code exchange; Lethe still checks the ID token's
signature, issuer, audience, expiry, and nonce. Verification errors in the server
logs identify issues such as an unsupported signing algorithm or an unreachable
JWKS endpoint. Tokens and nonce values are not logged.
Storage quotas
Open Settings → Storage & quotas to see your usage. Administrators can set
default storage and maximum share sizes, search users, and override either limit
independently. Turn off a custom limit to inherit the current default again.
Defaults apply to existing and future users without overrides. Values persist
in the database across restarts; the two LETHE_DEFAULT_* quota variables only
seed a new quota configuration. The UI labels binary sizes as GB (1 GB = 1,024 MB).
Each user starts with 5 GB total storage and 2 GB per share, counting the combined size of its files. Usage includes stored files and the full declared size of unfinished uploads. Files received through request links use the recipient's allowance. Deleting a request does not release its unfinished uploads; those reservations expire after 48 hours. Deleting shares or unfinished uploads releases their space. Concurrent uploads reserve space atomically.
Lowering limits keeps existing files and links available under their original
sharing rules. New uploads and shares must fit the current limits. Installation
ceilings (LETHE_STORAGE_LIMIT and LETHE_MAX_FILE_SIZE) also apply. Only
signed-in administrators can change quotas.
PostgreSQL
Set LETHE_DATABASE_URL to a PostgreSQL connection string. Tables are initialized
at startup using portable SQL. There is no automatic migration of an existing
SQLite database into PostgreSQL; use a fresh database or migrate records yourself.
S3
Set LETHE_S3_BUCKET and LETHE_S3_REGION; credentials use the standard AWS SDK
credential chain. For compatible providers, set LETHE_S3_ENDPOINT and, if
required, LETHE_S3_PATH_STYLE=true. Keep the bucket private. Lethe streams
downloads through its access checks rather than exposing public object URLs.
Uploads are always staged on local disk for resumption. Completed files move to S3; files over 16 MiB use multipart uploads. Allow bucket permissions for object read/write/delete and multipart creation/completion/abort. Changing the storage backend does not migrate existing files automatically.
Lifecycle and limits
Share access ends immediately on expiry, revocation, or download exhaustion. An hourly task removes file content 24 hours after time-based expiry, retaining the share's metadata in the dashboard. Extend a share before cleanup to keep its files. Revoked/download-exhausted links keep files until time-based cleanup so their settings can be changed. Delete a share to release storage immediately.
Download limits count accepted download requests, including individual file downloads and interrupted transfers. One ZIP download counts once. Limits are reserved atomically so simultaneous requests cannot exceed the configured count. There is no HTTP range/resume support for downloads yet.
Each share supports up to 100 files; chunks are at most 8 MiB (the UI uses 4 MiB). There is a maximum of 200 pending files per workspace or request link. The quota reserves the full declared size while uploading. Activity displays the most recent 200 events. Browser-only default sharing preferences are set in Settings.
Public file request links can receive multiple private submissions until closed or expired. They are bearer links: distribute them only to intended senders. Submissions do not expose share tokens or other senders' files. Server-local users and sessions survive restarts. Login and password attempts are rate limited per direct client address; requests forwarded by one proxy share its limit.
Reverse proxy
Use HTTPS and set LETHE_PUBLIC_URL to the browser-facing origin. Forward the
original Host header. Disable request buffering for chunk uploads and response
buffering for streaming downloads, allow request bodies of at least 8 MiB, and
use generous timeouts for large transfers. Configure your proxy's IP-based rate
limits if needed. Server management endpoints always require a signed-in
employee account. Public share/request pages work without an account.
Back up the data directory (including SQLite's WAL consistently, or stop the process first). With PostgreSQL/S3, back up those services as well as local staging. Run one instance per data directory; resumable staging and cleanup are not designed for several application replicas.
Verification
npm run build
go test -race ./...
npm run test:ui
go vet ./...
Tests cover resumable uploads across restarts, offset conflicts, private requests, account isolation, password checks, atomic download limits, ZIP paths, quotas, cross-origin rejection, revocation, expiry, deletion, and cleanup.
Scope
This is an original implementation that borrows Erugo's core workflows; it does not copy Erugo's PHP backend. SMTP notifications, custom branding/themes, public registration, user administration, and download resumption are not included.