Self-hosted video and voice calls powered by LiveKit. HD video conferences, screen sharing, and live audio rooms — running on your own server with no per-minute billing.
nself-livekit requires a LiveKit server. Use LiveKit Cloud or self-host the open-source LiveKit server.
nself license set nself_pro_...
nself plugin install livekit
nself build
nself startnself-livekit bridges your nSelf backend to a LiveKit server, handling token generation, room lifecycle, and participant management. When a user initiates a call from your app, the plugin creates a LiveKit room, issues short-lived access tokens, and stores room metadata in Postgres.
Rooms can be ad-hoc (created on demand and destroyed when empty) or persistent (pinned to a channel in nself-chat). Screen sharing, simulcast video, and audio-only modes are all supported by the underlying LiveKit protocol.
nself-livekit integrates with nself-recording to capture sessions automatically. It also emits webhook events on room start, participant join/leave, and room end — useful for billing, analytics, or triggering notifications via nself-notify.
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | Postgres connection string (auto-set by nself) |
LIVEKIT_URL | Yes | LiveKit server WebSocket URL, e.g. wss://my.livekit.server |
LIVEKIT_API_KEY | Yes | LiveKit API key from your LiveKit dashboard |
LIVEKIT_API_SECRET | Yes | LiveKit API secret paired with the key above |
LIVEKIT_TOKEN_TTL_SECONDS | No | Access token lifetime. Default: 3600 (1 hour) |
LIVEKIT_MAX_PARTICIPANTS | No | Maximum participants per room. Default: 100 |
| Endpoint | Method | Description |
|---|---|---|
/livekit/rooms | POST | Create a new room and return a join token |
/livekit/rooms/:id/join | POST | Join an existing room; returns a participant token |
/livekit/rooms/:id | GET / DELETE | Get room metadata or close the room |
/livekit/rooms/:id/participants | GET | List active participants |
/livekit/webhook | POST | Receives LiveKit server events (participant join/leave, room end) |
/health | GET | Plugin health and LiveKit connectivity check |
| Table | Purpose |
|---|---|
np_livekit_rooms | Room metadata: ID, creator, channel link, start/end times |
np_livekit_participants | Participant join/leave log per room |
np_livekit_recordings | Recording references (populated by nself-recording when installed) |
| Event | Payload |
|---|---|
livekit.room.started | Room ID, creator user ID, channel ID (if linked) |
livekit.participant.joined | Room ID, user ID, participant metadata |
livekit.participant.left | Room ID, user ID, duration in seconds |
livekit.room.ended | Room ID, total duration, participant count |
nself-livekit slots into nself-chat to add video/audio call buttons to any channel. When a call starts, the chat plugin posts a system message with the join link. Install nself-recording to auto-capture sessions. LiveKit Cloud is the easiest server option; the open-source LiveKit server works identically for self-hosted setups.
| Feature | nself-livekit | Twilio Video | Daily.co |
|---|---|---|---|
| Pricing model | $0.99/mo bundle flat | Per-minute per-participant | Per-minute per-participant |
| Server location | Your VPS | Twilio PoPs | Daily PoPs |
| Recording | Self-hosted via nself-recording | Paid add-on | Paid add-on |
| Max participants | Server-dependent | 50 (video) / 300 (audio) | 1000 |
Token generation failing: Verify LIVEKIT_API_KEY and LIVEKIT_API_SECRET match exactly what is shown in your LiveKit dashboard. Keys are case-sensitive.
Participants cannot connect: The LiveKit server URL must be reachable from the client browser. If self-hosting LiveKit, ensure port 7880 (TCP) and port 7881 (UDP) are open in your firewall.
Webhook events missing: Set the LiveKit server webhook URL to https://your.domain/livekit/webhook in your LiveKit server config. The plugin endpoint must be publicly reachable by the LiveKit server.
Port: 3503 | Bundle: ɳChat ($0.99/mo) or ɳSelf+ ($3.99/mo) | Last Updated: May 2026 | Plugin Version 1.0.13