Self-hosting
Deploy your own copy of the better-vault web app on any Node.js host or on Vercel, with optional environment variables that harden public deployments.
better-vault is a standard Next.js app with stateless API routes and no database, so it runs anywhere Node.js 20.9+ 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. This website is a separate project and is not part of the app.
Vercel
Import the repository in Vercel. No environment variables or storage are required. API routes run as functions and 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_CHATGPT | true | Set to false to turn off Sign in with ChatGPT. Its tokens are kept by the server, so on a shared server they would belong to everyone. |
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. |
NEXT_PUBLIC_SITE_URL | https://www.better-vault.dev | The site's own address, used in canonical links, the sitemap and social cards. |
Public deployments
For an install that strangers can reach, set BETTER_VAULT_ALLOW_LOCAL_PROVIDERS=false and BETTER_VAULT_ALLOW_CHATGPT=false, and leave private URLs off. 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.