Self-hosting
Run your own copy of the better-vault web app on any Node.js host, with a single build command and optional settings that harden public deployments.
better-vault is a single-page app with a small stateless API and no database, so it runs anywhere Node.js 22.12+ runs. For a single computer, the desktop app is simpler.
Build and start
Install the dependencies, build the app and start the server:
npm install
npm run build
npm startThe app is then served at the root of its address, for example http://localhost:3000. Set PORT and HOSTNAME to change where it listens. This website is a separate project and is not part of the app.
Other hosts
The build is two folders: dist/client holds the pages and dist/server/node.js serves them with the API under /api. Any host that runs a long-lived Node.js process can run it. The API routes only forward requests to the provider each user picks.
Environment variables
All of them are optional.
| Variable | Default | Effect |
|---|---|---|
BETTER_VAULT_ALLOW_LOCAL_PROVIDERS | true | Set to false to turn off Ollama and LM Studio. Their address comes from the user, so on a public server they would make the server fetch any address. |
BETTER_VAULT_ALLOW_PRIVATE_URLS | false | Set to true to let web-page sources point at private or local network addresses. Only for trusted, private installs. |
Public deployments
For an install that strangers can reach, set BETTER_VAULT_ALLOW_LOCAL_PROVIDERS=false and leave private URLs off. Sign in with ChatGPT is never offered by the web app; it works only in the desktop app. Each user still brings their own key, which stays in their browser.
Privacy and your data
better-vault is local-first. Notebooks, sources, chats and keys stay in your browser or in a file on your computer, and nothing is ever kept on a server.
Notebooks
A notebook is a workspace with its own sources, chats and Studio outputs. Learn how to create, switch between, rename and delete notebooks in better-vault.