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.
Open Clausery Browse free templates
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).
Test the deployed copy and its data boundary#
For a test address such as https://draft.example.org/, load app/ over HTTPS, import a fictional Word template and download a document. Then disconnect and confirm the loaded app still works. Do not test a deployment by double-clicking its HTML files: a file: URL is not the same environment as an HTTPS origin.
The new origin starts with a different browser workspace. Serving the same app files does not copy client data from the public instance or a previous domain. Follow the backup and restore checklist to transfer data deliberately, and reconfigure activation and encryption for the destination.
Keep private deployments out of search#
Use host authentication or network access controls for an internal deployment; robots.txt is not access control. If you also publish a copy of the marketing pages, review its indexing policy and absolute URLs before making it public. SITE_URL changes app links in exported files, not the marketing canonicals, sitemap or feed base.
A deliberate public rebrand needs the SITE value in tools/partials.mjs reviewed and the static pages rebuilt with Node 22+. A private app deployment usually does not need a second indexable marketing site. Keep the app's noindex metadata; do not remove it merely to make an intranet copy discoverable.
Recommended headers#
This strict profile is intended for an offline-key deployment and does not permit requests to an online license service. If you deliberately enable online keys, review the required service origins and policy rather than expecting them to work under a same-origin-only connect-src.
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 a tested release. Its service worker version changes with each release and users are prompted to reload. User data is in their browsers, not in the static folder; preserve a workspace backup and test your own templates before rolling out an update. Moving files to a different origin does not move the old browser workspace.
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.