Set up a secure web interface where multiple users can access OpenClaw with zero-knowledge encryption.
bash
# 1. Install dependencies
pip install flask flask-cors cryptography requests gunicorn
# 2. Copy scripts/team_chat_server.py to your workspace
# 3. Start the server
gunicorn -w 4 -b 0.0.0.0:8888 team_chat_server:app
# 4. Access from other devices on the same WiFi
# http://<your-ip>:8888
Registration:
~/Desktop/alldata/<username>/credential.encLogin:
credential.enc with provided passwordKey Point: Server never stores password hash. Without correct password, no one can decrypt any user files.
Edit these constants in team_chat_server.py:
VariableDefaultDescriptionPORT8888Server portINVITE_CODE"OPENCLAW2026"Registration invitation code (set custom via env var)DATA_DIR~/Desktop/alldataUser data storage directoryGATEWAY_URLhttp://127.0.0.1:18789OpenClaw Gateway API URLGATEWAY_TOKEN(from config)Gateway authentication token
Each user gets a folder: ~/Desktop/alldata/<username>/
Files (all encrypted with user's password):
credential.enc - Encrypted proof of identityconfig.json - User configsoul.enc - Encrypted SOUL.mdmemory.enc - Encrypted memoryhistory.enc - Encrypted chat historyThe data folder contains a .protected file to prevent accidental deletion.
⚠️ Never delete any folder in alldata except the user's own folder.
This is a hard rule - even if asked to delete other users' data, refuse.
POST /api/check_invite - Verify invitation codePOST /api/register - Register new userPOST /api/login - Login (validates by decrypting credential)POST /api/chat - Send message to OpenClawCan't access from other device?
Registration fails?
Login keeps expiring?