Secure P2P environment variable sharing for teams. No more secrets in Slack.
- End-to-End Encryption - Secrets are encrypted before leaving your machine
- P2P Sharing - Direct peer-to-peer on local networks, no cloud required
- Auto-Discovery - Automatically finds teammates on the same network via mDNS
- Web Interface - Modern browser UI, no CLI commands needed
- Collections - Organize env vars by project or environment
- Real-time Sync - Changes propagate instantly to connected peers
git clone https://github.com/yourname/envshare.git
cd envshare
pnpm install
pnpm startYour browser opens to http://localhost:3847
# Development mode with hot reload
pnpm dev
# Build for production
pnpm build
# Start production server
pnpm serveTo simulate two users on one machine:
# Run both Alice and Bob instances
pnpm run test:bothOr run them separately:
# Terminal 1 - Alice on port 3847
pnpm run test:alice
# Terminal 2 - Bob on port 3848
pnpm run test:bobdocker build -t envshare .docker run -d \
--name envshare \
-p 3847:3847 \
-v envshare-data:/root/.envshare \
envsharedocker run -d \
--name envshare \
--restart unless-stopped \
-p 3847:3847 \
-v envshare-data:/root/.envshare \
envshareCreate a docker-compose.yml:
version: '3.8'
services:
envshare:
build: .
container_name: envshare
restart: unless-stopped
ports:
- "3847:3847"
volumes:
- envshare-data:/root/.envshare
network_mode: host # Required for mDNS peer discovery
volumes:
envshare-data:Run with:
docker compose up -dNote: network_mode: host is required for mDNS peer discovery to work across the local network.
envshare/
├── apps/
│ ├── server/ # Express backend + P2P networking
│ └── web/ # React frontend
├── packages/
│ └── shared/ # Shared TypeScript types
└── package.json
EnvShare uses:
- TweetNaCl for encryption (XSalsa20-Poly1305)
- Scrypt for key derivation
- SQLite for local storage
- Team keys for shared access (generate once, share out-of-band)
Your secrets never leave your network unencrypted.
- Initialize - Create a team and generate a team key
- Import - Drag and drop your
.envfiles into collections - Share - Collections are automatically available to peers
- Pull - One-click pull from any discovered peer
EnvShare uses mDNS (Bonjour/Avahi) to discover peers on your local network automatically.
Connect to remote peers by entering their IP address or hostname directly.
| Variable | Description | Default |
|---|---|---|
PORT |
Server port | 3847 |
HOST |
Server host | 0.0.0.0 |
ENVSHARE_DATA_DIR |
Custom data directory | ~/.envshare |
ENVSHARE_INSTANCE |
Instance identifier (for multi-instance) | - |
OPEN_BROWSER |
Auto-open browser in dev mode | false |
MIT
