- HTML 75.8%
- JavaScript 24%
- Dockerfile 0.2%
| public | ||
| server | ||
| .dockerignore | ||
| claudekey | ||
| docker-compose.yml | ||
| Dockerfile | ||
| package.json | ||
| README.md | ||
Claude Family Chat
A self-hosted chat app that lets your family share access to Claude — each person gets their own private conversation history. Your API key stays on the server.
Quick Start
1. Get an API key
Sign up at console.anthropic.com and create an API key.
2. Edit docker-compose.yml
Open docker-compose.yml and fill in:
ANTHROPIC_API_KEY: "sk-ant-your-actual-key"
USERS: '{"alice":"password1","bob":"password2"}'
SESSION_SECRET: "any-long-random-string"
3. Run it
docker compose up -d
The app is now running at http://localhost:3000
On your home network, other devices can reach it at http://YOUR-LOCAL-IP:3000
(Find your IP with ipconfig on Windows or ifconfig / ip addr on Mac/Linux)
Managing Users
Users are defined in the USERS environment variable as a JSON object:
USERS: '{"mom":"secure-pass","dad":"another-pass","kid1":"their-pass"}'
After editing, restart the container:
docker compose restart
Environment Variables
| Variable | Default | Description |
|---|---|---|
ANTHROPIC_API_KEY |
(required) | Your Anthropic API key |
USERS |
{} |
JSON object of username→password pairs |
SESSION_SECRET |
change-me |
Secret for signing session cookies — change this! |
CLAUDE_MODEL |
claude-sonnet-4-20250514 |
Which Claude model to use |
MAX_HISTORY |
40 |
Max messages kept per user (older ones trimmed) |
SYSTEM_PROMPT |
You are a helpful assistant. |
System prompt sent to Claude |
PORT |
3000 |
Port the server listens on |
Data & Privacy
- Conversation histories are saved in a Docker volume (
chat-data) — they persist across restarts - Each user's history is completely isolated from other users
- Your API key is only on the server; it's never sent to the browser
- To wipe all history:
docker compose down -v(deletes the volume)
Monitoring Costs
Keep an eye on your API usage at console.anthropic.com/usage. Set a spending limit under Settings → Limits to avoid surprises.
Updating
docker compose pull # if using a registry image
docker compose up -d --build
Running on a Raspberry Pi or Home Server
Works great on any always-on machine. Just open port 3000 in your firewall/router if you want access outside your home network (consider adding HTTPS via a reverse proxy like Caddy or nginx in that case).