Self-hosting
Clausery is a folder of static files. Any web server, object-storage bucket or intranet file share that serves HTTPS can host it.
Deploy
- Get the release folder (a copy of the repository, or a release archive).
- Upload it to your host so that
index.htmlis served at the root of the path you choose, for examplehttps://draft.yourfirm.com/orhttps://intranet/tools/clausery/. All links are relative, so any base path works. Configure your server to answer unknown URLs with404.html(GitHub Pages does this automatically for the file at the site root). - Serve over HTTPS. Service workers and WebCrypto require a secure context (localhost is also allowed).
- Set
SITE_URLinapp/config.jsto your address (used in exported intake forms).
Recommended headers
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; connect-src 'self'; object-src 'none'; base-uri 'self'; form-action 'none'; frame-ancestors 'none'
X-Content-Type-Options: nosniff
Referrer-Policy: no-referrer
Permissions-Policy: camera=(), microphone=(), geolocation=()
Cache-Control: no-cache (for HTML; long max-age for vendor/ and assets/)
Licensing your deployment
To issue your own license keys (Enterprise), generate a key pair with npm run license -- keygen, put the public key in app/config.js and keep the private key offline. Issue keys with npm run license -- issue. The app then accepts only keys signed by you. Set LICENSE_SERVICE.api to an empty string in the same file so the app never accepts or checks online keys; the headers above already leave the license service out of connect-src.
Updating
Replace the folder with the new version. The service worker version changes with each release and users are prompted to reload. User data is in their browsers, not in the folder, so updates never touch it.
GitHub Pages
The public instance runs on GitHub Pages straight from the repository, with a CI workflow that lints, unit-tests and end-to-end tests every change. Forking the repository and enabling Pages gives you an identical setup in minutes.