--- title: Global Chat Server emoji: 💬 colorFrom: gray colorTo: green sdk: docker app_port: 7860 pinned: false --- # Global Chat Server A WebSocket global chat server, multilingual profanity filter, and browser-based admin panel for Unity games. - Health check: `/health` - WebSocket: `/ws` - Translation: `POST /translate` - Language detection: `GET /locale` - Admin panel: `/` - Default admin password: `global-chat.1` - Message history: up to 100 messages per room, retained in memory for 24 hours - Presence: 4-second client heartbeat and 10-second offline timeout - Translation: device/browser language first, optional IP-country fallback - Language registry: 255 ISO/BCP-47 language and locale codes - Profanity moderation: 44,196 active dictionary entries across 74 languages, plus 430 curated English roots and 3,440 generated English forms (75 languages total) - Moderation privacy: local filtering only; chat messages are not sent to a third-party profanity API ## Translation secrets Free Translation mode tries five key-free Google translation URL templates in order. No API key is required. These endpoints are unofficial and may be rate-limited or changed by Google. Override the five templates with the `FREE_TRANSLATION_URLS` Space variable, separated by `|`, when necessary. API Translation mode supports these server-side Secrets: - Google Cloud: `GOOGLE_TRANSLATE_API_KEY` - Amazon Translate: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION` - OpenAI: `OPENAI_API_KEY` - Gemini: `GEMINI_API_KEY` - Azure Translator: `AZURE_TRANSLATOR_KEY`, `AZURE_TRANSLATOR_REGION` Never store production API keys in a Unity scene or player build. ## Free Hugging Face CPU Basic hardware At the time this package was prepared, Hugging Face documents CPU Basic as 2 vCPU, 16 GB RAM, and 50 GB of non-persistent Space disk at no charge. A free account also has a separate 100 GB private Hub storage allowance. Hub storage is not the Space runtime disk and this chat server does not persist messages to either one. Limits, sleep behavior, and pricing can change, so check the latest Hugging Face documentation before publishing a commercial product. ## Security Set an `ADMIN_PASSWORD` secret in the Space Settings before production. The default password is provided for first-time setup only. Public Space source code is visible to everyone, while values stored as Hugging Face Secrets are not displayed in the repository.