Envault

Installation

How to install and run Envault locally

Envault is a self-hostable application. You can run it locally for development or deploy it to your own infrastructure.

Monorepo Components

This repository includes multiple components:

  • Web app: root folder (./)
  • Go CLI: cli-go/
  • TypeScript SDK: src/lib/sdk/
  • MCP server: mcp-server/

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js 18+ (LTS recommended)
  • Supabase project (or a local Supabase instance)
  • Redis (optional, for caching)

Quick Start

Clone the repository

git clone https://github.com/dinanathdash/envault.git
cd envault

Install dependencies

We recommend using pnpm for faster installation, but npm or yarn work just as well.

bash npm install
bash pnpm install
bash yarn install
bash bun install

If you will work on SDK and MCP packages, also install dependencies in each package folder:

cd src/lib/sdk && npm install
cd ../../../mcp-server && npm install
cd ..

Environment Setup

Copy the example environment file to get started.

cp .env.example .env.local

You will need to populate .env.local with your Supabase credentials.

Start Development Server

npm install -g portless
npm run dev

Visit https://envault.localhost:1355 to see your Envault instance running.

Docker Compose

For a quick local setup with all dependencies (including Redis and Postgres), you can use Docker Compose.

version: "3.8"
services:
  envault:
    build: .
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=postgresql://postgres:postgres@db:5432/envault
      - ENCRYPTION_KEY=...
    depends_on:
      - db
      - redis

  db:
    image: postgres:15-alpine
    environment:
      POSTGRES_PASSWORD: postgres

  redis:
    image: redis:alpine
docker-compose up -d

Verify Installation

To ensure everything is working correctly:

  1. Sign In: Open the app and try signing in (this tests Supabase Auth).
  2. Create Project: Create a new project called "Test Project" (tests Database write).
  3. Add Secret: Add a key-value pair TEST_KEY=123 (tests Encryption).
  4. SDK/MCP checks (optional):
npm run sdk:check
npm run mcp:check

If you see an error about ENCRYPTION_KEY missing, ensure you have generated a valid 32-byte key in your .env.local.

Troubleshooting

ENCRYPTION_KEY Error

If you see "Invalid Encryption Key", run this command to generate a valid one:

openssl rand -hex 32

Add the output to your .env.local.

Database Connection Failed

Check your DATABASE_URL and ensure your Supabase project is active. If running locally, make sure your local Supabase instance is running with npx supabase start.