As like cloud dashboard is there anything for self...
# ask-ai
b
As like cloud dashboard is there anything for self-hosting ?
t
Thanks for reaching out, Vishnu. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking if there's a dashboard for self-hosted LiveKit like the Cloud dashboard — here's the short answer and what you can do. LiveKit does not ship a built-in full dashboard for self-hosting. The open-source LiveKit server includes analytics and telemetry collection that exposes the same track-level stats (bitrate, frame rate, packet loss, simulcast layer changes, etc.) used by LiveKit Cloud. You can export that data and integrate it with external monitoring/visualization tools to build a custom dashboard that matches your needs. If you'd like, I can: • Point to the specific telemetry endpoints and fields to collect. • Suggest monitoring/visualization tools and example dashboards (Grafana, Prometheus, etc.) and how to wire them up. • Give a short implementation example for exporting metrics from a self-hosted LiveKit instance. Which of these would you like me to help with first? Sources: Announcing LiveKit Cloud
b
Also I want to know what all are environmental variables I have to change from cloud to self hosting ? What are configuration I need to do ?
t
You're asking which environment variables and configuration changes are required when moving from LiveKit Cloud to a self-hosted LiveKit deployment. Below is a concise checklist of the key variables and configuration steps you need to change or provide. Environment variables / keys to set • LIVEKIT_URL / LIVEKIT_WS_URL — point clients/services to your self-hosted WebSocket/HTTPS endpoint (e.g.,
wss://your-domain:7880
or
https://your-domain
). • LIVEKIT_API_KEY — set an API key in your
livekit.yaml
keys
section and use that value for services/clients that need it. • LIVEKIT_API_SECRET — set the matching secret in
livekit.yaml
and use it where tokens or server auth is required. • Any service-specific envs (Ingress/Egress):
INGRESS_API_KEY
,
INGRESS_API_SECRET
,
INGRESS_WS_URL
,
EGRESS_API_KEY
,
EGRESS_API_SECRET
,
EGRESS_WS_URL
if you run those services separately. Important server config (livekit.yaml / docker) •
keys:
— add your API key/secret pairs. •
port
,
rtc.tcp_port
, `rtc.port_range_start`/`rtc.port_range_end` — configure ports for WebRTC and media. •
use_external_ip
/ external IP settings — if running on cloud VM, set to your public IP. •
redis.address
— point to your Redis instance (required for multi-node). •
turn:
— configure TURN if enabling embedded TURN (domain, tls_port, cert paths) or plan for external TURN. • TLS/caddy config — either provide cert files or use Caddy configuration to auto-provision TLS. Network / infra changes • Open required ports: 443 (HTTPS/TURN-TLS), 80 (Let’s Encrypt), WebRTC ports (TCP 7881, UDP 50000–60000), TURN ports (3478 UDP), and any ingress ports (RTMP 1935, WHIP 7885) you need. • Ensure DNS for your domain points to the server (required for TLS via Caddy/Let's Encrypt). Deployment & tooling • Use the provided config generator (Docker image) to produce
livekit.yaml
,
caddy.yaml
,
docker-compose.yaml
, and init scripts. • Install and configure Redis (required for scaling). • If using Ingress/Egress, configure their config files with API keys,
ws_url
, and Redis address; configure storage (S3/GCS/Azure) for egress uploads. Secrets & management • Manage `LIVEKIT_API_KEY`/`LIVEKIT_API_SECRET` securely (env or
.env
file). • Ensure secrets present in
livekit.yaml
match values used by external services (Ingress/Egress, client server token issuers). Quick recommended workflow 1. Own a domain and set DNS to your server. 2. Run the config generator to create docker-compose + configs. 3. Edit
livekit.yaml
with your
keys
, Redis address, ports, and TURN/TLS settings. 4. Configure Ingress/Egress files if used (set API key/secret,
ws_url
, Redis, storage). 5. Deploy (docker-compose / systemd service) and verify ports/TLS. If you want, I can: • Provide the exact fields and example snippets for
livekit.yaml
, Ingress, or Egress configs. • Show the minimal
.env
and docker-compose changes to switch a client from Cloud to self-hosted. Which config snippet would you like first —
livekit.yaml
, Ingress, or Egress? Sources: Self-hosting the Ingress Service | LiveKit docs | Company directory phone assistant | LiveKit docs | Deploying LiveKit | LiveKit docs | Secrets management | LiveKit docs | Self-hosting the Egress Service | LiveKit docs
b
How can I do self hosting for telephony
t
You're asking how to self-host telephony with LiveKit. Below is a concise, actionable plan and the key configs you'll need. 1) What you must deploy • Self-hosted LiveKit server (running
livekit-server
). • LiveKit SIP server (bridges SIP/PSTN to LiveKit). • Redis (required for multi-node and SIP coordination). • Public domain/IP and DNS (needed for TLS, SIP reachability). • Optional: TURN server (embedded or separate) if callers/clients need NAT traversal. 2) Quick deploy options • Docker Compose (recommended): use the SIP repo's
docker-compose.yaml
which brings up LiveKit + SIP + Redis. • Native: download
livekit-sip
binary and run with a
config.yaml
. 3) Essential config values to set • In SIP config (
config.yaml
) and LiveKit `livekit.yaml`: ◦
api_key
/
api_secret
— must match the keys in your LiveKit server
keys:
section. ◦
ws_url
— WebSocket URL to your LiveKit server (e.g.,
ws://your-livekit:7880
or `wss://your-domain:7880`). ◦
redis.address
— host:port for Redis. ◦
sip_port
— usually
5060
(UDP/TCP) or
5061
for TLS. ◦
rtp_port
range — e.g.,
10000-20000
for RTP media. ◦
use_external_ip
/
external_ip
— set to your public IP if behind NAT. 4) Network / firewall & TLS • Open/forward: ◦ SIP signaling: UDP/TCP 5060 (or 5061 for TLS) ◦ RTP: configured RTP port range (e.g., UDP 10000–20000) ◦ LiveKit WebRTC media: UDP 50000–60000 and TCP 7881 (if used) ◦ HTTPS/TLS: 443 and HTTP 80 (for TLS issuance if using Caddy) • For secure trunking enable SIP TLS and SRTP (configure certs or use Caddy for TLS). 5) Trunks & routing (how calls are handled) • Configure inbound trunks on your SIP provider to point to your SIP server (public-ip:5060). • Create outbound trunks in SIP config for placing calls via a PSTN provider (username/password, domain). • Define dispatch rules to map incoming calls to LiveKit rooms, require pins, and set participant attributes. 6) Call flows & APIs • Inbound: provider -> SIP server -> dispatch rule -> creates SIP participant in a LiveKit room. • Outbound: use the SIP API (
CreateSIPParticipant
/ outbound trunk) to place calls from LiveKit into PSTN/SIP. 7) Testing & validation • Verify SIP provider/trunk can reach your public IP/port. • Check logs on
livekit-sip
and
livekit-server
. • Test inbound call maps to a room and media flows (audio) into LiveKit participants. 8) Helpful next steps I can provide • Example
config.yaml
for
livekit-sip
. • Example dispatch rule and CLI/API call to create trunks. • Docker Compose snippet to run LiveKit + SIP + Redis. • Guidance for securing SIP (TLS/SRTP) and recommended firewall/NAT settings. Which of the above would you like first — a ready
config.yaml
example, Docker Compose snippet, or dispatch/trunk examples? Sources: Self-hosted SIP server | LiveKit docs | SIP overview | LiveKit docs | Accepting inbound calls | LiveKit docs | SIP trunk setup | LiveKit docs
b
Do I need phone number for self hosting and how to create a inbound and outbound trunk I'd
t
You're asking if a phone number is required for self-hosted telephony and how to create inbound/outbound trunks. Short answers first: • You do not strictly need a phone number to run the SIP server itself — the SIP server can connect SIP endpoints and handle SIP calls without a PSTN number. • If you want to receive or place calls to the public telephone network (PSTN), you need a phone number (provided by a SIP/PSTN provider) and trunks configured to route calls between that provider and your SIP server. How to create inbound and outbound trunks (high-level steps) 1. Get a SIP/PSTN provider and phone number (for PSTN): • Purchase a phone number and trunk credentials (SIP URI, username/password or IP-based trunk) from a provider such as Twilio, Plivo, Telnyx, etc. 1. Inbound trunk (provider → your SIP server): • Configure your SIP provider’s inbound trunk to point to your SIP server’s public SIP URI (e.g., public-ip:5060 or sip.yourdomain.com:5060). • On your self-hosted SIP server, create an inbound trunk entry that matches the provider (may include allowed IPs, authentication method). The inbound trunk tells the SIP server how to accept calls and which dispatch rules to apply. 1. Outbound trunk (your SIP server → provider to place calls): • In your SIP server config, create an outbound trunk with the provider credentials (SIP domain, username, password, or IP). • Use this outbound trunk when issuing outbound calls from LiveKit (via the CreateSIPParticipant / outbound API) so the SIP server sends the call through the provider to the PSTN destination. Key fields/configs to set • Provider-side: destination URI for inbound calls (your public IP/domain and port), auth method, and any allowed source IPs. • SIP server-side inbound trunk: match rules (DID, caller conditions), optional auth settings, dispatch mapping to LiveKit room. • SIP server-side outbound trunk: `username`/`password` (or IP auth), provider domain/host, transport (UDP/TCP/TLS), and any required codecs or SIP headers. Dispatch rules and routing • Create dispatch rules to map incoming DID/number to a LiveKit room (optionally require PINs or attributes). • For outbound calls, include which trunk to use and the caller ID (some providers require verification for outbound caller IDs). Testing checklist • Ensure your SIP server is reachable on SIP port (5060/5061) and RTP port range is open. • Configure provider to send inbound calls to your SIP URI. • Make a test inbound call to confirm it reaches the SIP server and is dispatched into a LiveKit room. • Make a test outbound call via your outbound trunk to confirm call egress. If you’d like, I can provide: • A sample
config.yaml
snippet for an inbound trunk and an outbound trunk you can drop into the SIP server config. • Example provider settings for a common provider (e.g., Twilio/Telnyx) mapped to SIP server fields. Which example would you like first — inbound trunk config, outbound trunk config, or a complete
config.yaml
?
b
Self hosting sip server will they provide trunk I'd?
t
You're asking whether a self-hosted SIP server will "provide" trunk IDs. Short answer: no — the SIP server does not automatically issue PSTN trunk IDs. Trunks are created and defined by you and/or your SIP/PSTN provider. Here’s how it works and what to do. • Who provides trunk IDs ◦ SIP/PSTN provider: If you buy a phone number or trunk from a provider (Twilio, Telnyx, Plivo, etc.), the provider supplies trunk identifiers/credentials (SIP domain, username/password or IP ACLs, and DID/number). ◦ Your self-hosted SIP server: you define trunk entries in the SIP server config that reference provider credentials or incoming provider connections. Those entries are your inbound/outbound trunk records (IDs/names) used by the SIP server and LiveKit. • Typical flow a. Purchase trunk/number from a provider → provider gives you credentials and/or a trunk ID and DIDs. b. In your self-hosted SIP server config, create an outbound trunk using provider credentials (this becomes your outbound trunk entry). c. For inbound calls, configure the provider to send calls to your SIP server public URI; in your SIP server create an inbound trunk/route that matches the provider source or DID and maps to dispatch rules/rooms. • What fields you set on your SIP server trunks ◦ Name/ID (your chosen identifier) ◦ Provider host/domain and transport (UDP/TCP/TLS) ◦ Auth method: username/password or IP-based ACL ◦ Allowed source IPs (for inbound security) ◦ Caller ID / outbound settings (if provider requires verification) ◦ Codec and RTP port settings • Recommendation / next step ◦ Pick a SIP/PSTN provider and get their trunk credentials and any DIDs. ◦ I can provide a sample inbound and outbound trunk snippet you can paste into your SIP
config.yaml
that maps provider credentials to your LiveKit dispatch rules. Which provider are you planning to use (or do you want a generic example)?
b
How do this without phone number coz we're going to test with microsip
t
You can test self-hosted SIP with MicroSIP without buying a phone number. Below are the focused steps and example configs to get calls between MicroSIP and LiveKit working locally or on a public VM. 1) Concept • No PSTN number needed: use SIP endpoints (MicroSIP) to register to your self-hosted SIP server. Trunks to PSTN providers are only required for public phone numbers or PSTN calls. • For testing, treat MicroSIP as a SIP client that registers or sends INVITEs to your SIP server; the SIP server will create a SIP participant in a LiveKit room. 2) Network choices • Local testing (same LAN): run LiveKit + SIP server on a machine reachable by MicroSIP. Use private IPs; ensure UDP/TCP ports are open between devices. • Remote testing (VM): run on a public VM with public IP/DNS. Configure NAT/firewall to forward SIP and RTP ports to the server. 3) Required ports • SIP signaling: 5060 (UDP/TCP) or 5061 (TLS) — allow between MicroSIP and server. • RTP media: RTP port range (e.g., 10000–20000 UDP) — open/forward these. • LiveKit WebRTC: UDP 50000–60000 and TCP 7881 if used. 4) Minimal SIP server config (example
config.yaml
) • Use this for local tests (replace values):
Copy code
api_key: testkey
api_secret: testsecret
ws_url: ws://localhost:7880
redis:
  address: localhost:6379
sip_port: 5060
rtp_port: 10000-20000
use_external_ip: false
logging:
  level: debug
• Add a simple inbound mapping/dispatch rule by DID or from header if you want calls to map to a room automatically (optional). For manual testing you can create SIP participant via API when MicroSIP calls. 5) Registering MicroSIP (example account) • In MicroSIP account settings: ◦ SIP server / domain: your-server-ip (or domain) ◦ SIP port: 5060 ◦ Username: any local username you accept (depends on server auth) ◦ Password: set if you configured auth; otherwise configure server to accept unauthenticated for testing ◦ Transport: UDP (or TCP/TLS if configured) 6) Two test flows A) Direct INVITE -> automatic room mapping • Configure a dispatch rule in the SIP server that maps an incoming Request-URI (e.g., sip:1001@yourdomain) or DID to a LiveKit room
test-room
. • Dial sip:1001@yourdomain from MicroSIP. SIP server will create SIP participant and put the call into
test-room
. B) Call + API create (manual) • From MicroSIP, call the SIP server endpoint or register and send INVITE. • Use LiveKit SIP API
CreateSIPParticipant
(or server-side code) to create a participant that places an outbound call to the MicroSIP URI or binds the incoming call to a room. 7) Example dispatch rule (concept) • match: request_uri user == "1001" • action: create participant in room
test-room
, optionally require pin 8) Tips & troubleshooting • Use
sngrep
/ server logs to inspect SIP messages. • Check RTP flow with Wireshark if audio absent. • If behind NAT, set
use_external_ip
and forward RTP port range; enable STUN/TURN for WebRTC clients. • For simplicity, disable strict auth for initial local tests, then enable username/password later. If you want, I can: • Provide a ready
docker-compose.yaml
for LiveKit + livekit-sip + Redis for local testing. • Give a concrete dispatch rule snippet and the exact SIP headers MicroSIP should send. Which would you like next?
b
Give me the dispatch rule and also where I want to paste it
t
Below is a minimal dispatch rule that maps an incoming SIP request to a LiveKit room, plus where to place it and how to test with MicroSIP. 1) Dispatch rule (YAML) • Matches incoming Request-URI user
1001
and places the caller into room
test-room
without a PIN.
Copy code
dispatch:
  - name: "invite-1001-to-test-room"
    match:
      request_uri_user: "1001"
    action:
      type: "create_participant"
      room: "test-room"
      require_pin: false
      participant:
        name: "sip-{caller}"
        metadata:
          source: "sip"
2) Where to paste it • Add this under the top-level section in your SIP server config file (commonly
config.yaml
for
livekit-sip
) so the file has a top-level
dispatch:
entry. Example placement:
Copy code
api_key: <your_api_key>
api_secret: <your_api_secret>
ws_url: ws://localhost:7880
redis:
  address: localhost:6379
sip_port: 5060
rtp_port: 10000-20000
use_external_ip: false

dispatch:
  - name: "invite-1001-to-test-room"
    match:
      request_uri_user: "1001"
    action:
      type: "create_participant"
      room: "test-room"
      require_pin: false
      participant:
        name: "sip-{caller}"
        metadata:
          source: "sip"
3) How it works / test steps with MicroSIP • In MicroSIP, dial sip:1001@<your-server-ip>:5060 (or set an account to register to the server and call sip:1001@yourdomain). • The SIP server will match
request_uri_user: "1001"
, create a SIP participant, and place the call into the LiveKit room
test-room
. • If you need the caller to authenticate, add auth settings and restrict allowed source IPs in your trunk config; for quick tests you can allow unauthenticated INVITEs. 4) Troubleshooting tips • Watch SIP logs (livekit-sip stdout) or run
sngrep
to verify INVITE reaches server. • Ensure RTP port range (10000–20000) and SIP port (5060) are open/forwarded. • If audio missing, confirm codecs match between MicroSIP and SIP server. Would you like a version that requires a numeric PIN for entry or an example that matches based on a DID or header instead of
request_uri_user
?