Vanisec
Vanisec is a self-hosted platform for sharing secrets safely. You paste a secret (API key, password, token, or any sensitive text), get a one-time encrypted link, and share it. The moment the recipient opens the link, the secret is deleted โ it can never be viewed again.
Repository: clouddrove/vanisec
Stack: Next.js ยท TypeScript ยท Redis ยท Helm
Featuresโ
- One-time access โ secrets are deleted immediately after the first view
- Configurable expiry โ 1 hour to 7 days (default 24 hours)
- Optional password protection โ add a passphrase for a second factor
- Cryptographically secure URLs โ unguessable link IDs
- Redis TTL cleanup โ secrets are automatically purged on expiry even if never opened
- Non-persistent handling โ secrets are never logged or written to disk
- Production-ready โ Kubernetes/Helm support, non-root Docker container, health endpoints
Deploymentโ
Docker Compose (quickest)โ
git clone https://github.com/clouddrove/vanisec.git
cd vanisec
# Start app + Redis
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
docker-compose up -d --build
Open http://localhost:3000.
Local developmentโ
Prerequisites: Node.js 20+, Redis 7+
git clone https://github.com/clouddrove/vanisec.git
cd vanisec
npm install
# Start Redis (or use Docker)
docker run -d -p 6379:6379 redis:7-alpine
# Copy and edit env
cp .env.example .env.local
# Set REDIS_URL and NEXT_PUBLIC_BASE_URL
npm run dev
Kubernetes via Helmโ
# Embedded Redis (default)
helm install vanisec ./_infra/helm/vanisec
# External Redis
helm install vanisec ./_infra/helm/vanisec \
--set redis.enabled=false \
--set env.REDIS_URL=redis://your-redis-host:6379
Configurationโ
Environment variablesโ
| Variable | Required | Description |
|---|---|---|
REDIS_URL | Yes | Redis connection string (e.g., redis://localhost:6379/3) |
NEXT_PUBLIC_BASE_URL | Yes | Public URL of the app (e.g., https://secrets.mycompany.com) |
REDIS_PASSWORD | No | Redis auth password |
GA_ID | No | Google Analytics measurement ID |
NODE_ENV | No | production or development |
Helm values (key options)โ
| Value | Default | Description |
|---|---|---|
redis.enabled | true | Deploy Redis alongside the app |
replicaCount | 1 | Number of app replicas |
ingress.enabled | false | Enable Ingress resource |
ingress.tls | โ | TLS configuration for HTTPS |
resources.limits | โ | CPU/memory limits for the container |
How it worksโ
User pastes secret
โ
Next.js encrypts it
โ
Stored in Redis with TTL
โ
User shares the one-time URL
โ
Recipient opens URL โ Redis key deleted immediately
โ
Secret is gone โ permanently
Running scriptsโ
npm run dev # Development server with hot reload
npm run build # Production build
npm start # Start production server
npm run lint # Lint TypeScript
Use casesโ
- Sharing database passwords with a new team member at onboarding
- Sending API keys or tokens through a messaging app without leaving a permanent trace
- Distributing temporary credentials to contractors
- Any situation where the recipient should see a secret exactly once