Server
The Konet Server is an Elixir/Phoenix application packaged as a Docker image. It exposes WebSocket endpoints, handles JWT authentication, tracks presence, and serves the Studio dashboard.
Architecture
┌─────────────────────────────────────┐
│ Konet Server │
│ ┌─────────┐ ┌─────────────────┐ │
│ │ Bandit │ │ Phoenix PubSub │ │
│ │ Endpoint│ │ Presence │ │
│ └────┬────┘ │ RateLimiter │ │
│ │ │ ChannelRegistry│ │
│ │ └─────────────────┘ │
│ WebSocket /socket │
│ HTTP /api/* │
│ LiveView /studio │
└─────────────────────────────────────┘Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
KONET_HOST | No | localhost | Public hostname used in generated URLs |
KONET_PORT | No | 4000 | HTTP port |
KONET_JWT_SECRET | Yes | — | Secret for token signing |
KONET_ANON_KEY | No | — | Default anonymous key |
KONET_SERVICE_KEY | No | — | Admin service key |
SECRET_KEY_BASE | Yes | — | Phoenix secret |
See Configuration for the complete list (limits, webhooks, origins, Studio password).
Configuration File
For local development the CLI manages a konet.config.toml and maps it onto the
env vars above when it starts the container:
[server]
host = "localhost"
port = 4000
mode = "docker"
[auth]
anon_key = "..."
service_key = "..."
jwt_secret = "..."
secret_key_base = "..."
[studio]
password = "" # empty = no Studio login in local devDocker Compose
version: "3.9"
services:
konet-server:
build: ./konet-server
ports:
- "4000:4000"
environment:
KONET_JWT_SECRET: ${KONET_JWT_SECRET}
SECRET_KEY_BASE: ${SECRET_KEY_BASE}In this section
- Configuration — every env var,
konet.config.toml, webhooks, metrics - Deployment — Coolify, Dokploy, plain VPS, TLS and proxying
- Studio — the built-in LiveView admin dashboard