LiveKit 1.13 on Windows Server 2025 on Azure User Guide
Overview
LiveKit is an open source WebRTC server (an SFU, or selective forwarding unit) for real time audio, video and data. Applications use it for video calls, live streaming, voice agents and interactive media. Your application server signs short-lived access tokens with an API key and secret, and browsers, mobile apps and LiveKit's client SDKs join rooms with those tokens.
This image runs LiveKit server 1.13.11 as a Windows service on Windows Server 2025 Datacenter (Desktop Experience), with the LiveKit CLI (lk) 2.20.1 installed for tokens, rooms and testing. LiveKit's signalling and API listen only on the VM itself (127.0.0.1:7880). In front of them, Caddy serves HTTPS on port 443, including the WebSocket that clients connect to, and port 80 only redirects to HTTPS. LiveKit refuses every request that does not carry a token signed by this VM's secret. Audio and video flow straight to LiveKit on TCP 7881 and UDP 7882. On the first boot of every VM the image creates its own API key, API secret and TLS certificate, so nothing is shared between machines and no key ships in the image. The Windows Server licence is included in the virtual machine price that Microsoft bills; LiveKit is open source under the Apache License 2.0. cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours.
What is included:
- LiveKit server 1.13.11 (upstream's Windows build, Apache License 2.0) in
C:\Program Files\LiveKit, running as the Windows serviceLiveKit(startup Automatic) under its own virtual accountNT SERVICE\LiveKit, not LocalSystem - The LiveKit CLI
lk2.20.1 (Apache License 2.0) in the same folder, which is on the systemPATH - Caddy 2.11.9 as the HTTPS front, running as the Windows service
LiveKitProxy(display name LiveKit HTTPS (Caddy)) underNT SERVICE\LiveKitProxy: HTTPS on TCP 443 with this VM's own certificate, WebSocket upgrades passed straight through, and TCP 80 redirecting to HTTPS - LiveKit's media ports: TCP 7881 and one UDP port, 7882, for every session, with LiveKit advertising the VM's public IP address to clients
- Windows Firewall rules for TCP 443, 80 and 7881 and UDP 7882, in the LiveKit group
- A per-VM API key and secret, written to
C:\ProgramData\LiveKit\config.yamland to a credentials file, both readable only by administrators (LiveKit's service account can read its own configuration) - A per-VM self signed TLS certificate for the VM's public IP address, private IP address and computer name
- Windows Server 2025 Datacenter, patched with Windows Update at build, Microsoft Defender Antivirus and Windows Firewall on
- cloudimg's support team on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours
Prerequisites
An active Azure subscription, a Remote Desktop client, and a virtual network in the target region.
Standard_B2ms (2 vCPU, 8 GiB RAM) is enough to try LiveKit and for small rooms. LiveKit forwards media rather than mixing it, so the CPU and network it needs grow with the number of participants and tracks. For production, choose a size with more vCPUs and network bandwidth, such as Standard_D4s_v5 or larger.
In the network security group, allow inbound:
| Port | Protocol | Used for | Allow from |
|---|---|---|---|
| 443 | TCP | Signalling (WebSocket) and the API over HTTPS | your users and application servers |
| 80 | TCP | Redirect to HTTPS | your users |
| 7881 | TCP | Media over TCP (clients behind strict firewalls) | your users |
| 7882 | UDP | Media over UDP (the normal path) | your users |
| 3389 | TCP | Remote Desktop | your own address ranges only |
Step 1 - Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for LiveKit on Windows Server 2025 by cloudimg, and select Create. On Basics pick your subscription, resource group, region and size, and set the Administrator account username and password. Under Inbound port rules allow RDP (3389), HTTP (80) and HTTPS (443). Select Review + create, then Create. Once the VM exists, add the rules for TCP 7881 and UDP 7882 to its network security group, and narrow each rule's source as in the table above.
Step 2 - Deploy from the Azure CLI
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn cloudimg1647283583153:livekit-windows-server:default:latest
az vm create \
--resource-group <your-rg> \
--name livekit \
--image cloudimg1647283583153:livekit-windows-server:default:latest \
--size Standard_B2ms \
--admin-username <admin-name> \
--admin-password '<a strong password>' \
--public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name livekit --port 3389 --priority 1000
az vm open-port --resource-group <your-rg> --name livekit --port 80,443,7881 --priority 1010
az network nsg rule create --resource-group <your-rg> --nsg-name livekitNSG \
--name livekit-udp-7882 --priority 1020 --direction Inbound --access Allow \
--protocol Udp --destination-port-ranges 7882
az vm open-port opens TCP ports to any address, and the last command opens UDP 7882 the same way. Narrow the rules to your own ranges in the network security group afterwards. livekitNSG is the group az vm create makes for a VM named livekit.
First boot takes a few minutes. When the VM first starts, Windows finishes its setup. Then the image creates this VM's API key and secret, certificate and configuration and starts both services. Until then nothing answers on port 443. The setup is finished when the file
C:\ProgramData\livekit-windows-server-firstboot.doneexists (Step 4).
Step 3 - Connect with Remote Desktop
Connect to the VM's public IP address with your Remote Desktop client (on Windows, mstsc; on macOS, Windows App), signing in with the administrator name and password you set at deployment. Open Windows PowerShell as administrator for the commands below.
Step 4 - Confirm LiveKit is running
Test-Path C:\ProgramData\livekit-windows-server-firstboot.done
Get-CimInstance Win32_Service -Filter "Name LIKE 'LiveKit%'" | Format-Table Name, State, StartMode, StartName -AutoSize
Get-NetTCPConnection -State Listen -LocalPort 443, 80, 7880, 7881 | Sort-Object LocalPort | Format-Table LocalAddress, LocalPort, @{n='Process';e={(Get-Process -Id $_.OwningProcess).ProcessName}} -AutoSize
Get-NetUDPEndpoint -LocalPort 7882 | Format-Table LocalAddress, LocalPort, @{n='Process';e={(Get-Process -Id $_.OwningProcess).ProcessName}} -AutoSize
livekit-server --version
lk --version
& 'C:\Program Files\LiveKit\caddy\caddy.exe' version
True
Name State StartMode StartName
---- ----- --------- ---------
LiveKit Running Auto NT SERVICE\LiveKit
LiveKitProxy Running Auto NT SERVICE\LiveKitProxy
LocalAddress LocalPort Process
------------ --------- -------
:: 80 caddy
:: 443 caddy
127.0.0.1 7880 livekit-server
:: 7881 livekit-server
LocalAddress LocalPort Process
------------ --------- -------
<private-address> 7882 livekit-server
livekit-server version 1.13.11
lk version 2.20.1
v2.11.9 h1:bhZtcRKQOq0fuLvEgCdPYvUxXyGn9kzjG4lh2332DTE=

True confirms first boot finished. Both services run under their own accounts and start automatically with Windows. Caddy listens on ports 443 and 80. LiveKit's signalling and API listen on 127.0.0.1:7880, which nothing outside the VM can reach, so every signalling and API request from outside arrives through HTTPS. LiveKit's own media ports are TCP 7881 on every interface and UDP 7882 on the VM's private address (<private-address> above), which is where Azure delivers traffic sent to the public IP address.
The first boot log records what it made (the addresses are this VM's own, shown here as placeholders):
Get-Content C:\ProgramData\livekit-windows-server-firstboot.log
2026-12-03T04:35:41.9711711Z provisioning finished
2026-12-03T04:35:50.2612307Z addresses public=<public-address> private=<private-address>
2026-12-03T04:35:51.5418428Z certificate CN=<public-address> names=<computer-name>,localhost,<public-address>,<private-address>,127.0.0.1 sha256=<certificate fingerprint>
2026-12-03T04:35:51.7078851Z certificate, key, config and Caddyfile written
2026-12-03T04:35:51.7482610Z credentials written
2026-12-03T04:38:02.8223858Z LiveKit answers on 127.0.0.1:7880; HTTPS on 443 refuses a request without a token and accepts this VM's signed token; 80 listens
2026-12-03T04:38:15.0968259Z first boot done
The certificate is named for the VM's public IP address, its private IP address, its computer name and localhost, and is valid for ten years. Its public half is C:\ProgramData\LiveKitProxy\tls\cert.pem.
Step 5 - Read your API key and secret
First boot wrote the server's URL, API key and API secret to a file that only the SYSTEM account and the Administrators group can read:
(Get-Acl C:\ProgramData\livekit-windows-server-credentials.txt).Access | Format-Table IdentityReference, FileSystemRights, AccessControlType -AutoSize
Get-Content C:\ProgramData\livekit-windows-server-credentials.txt
IdentityReference FileSystemRights AccessControlType
----------------- ---------------- -----------------
NT AUTHORITY\SYSTEM FullControl Allow
BUILTIN\Administrators FullControl Allow
# LiveKit on Windows Server 2025 by cloudimg: this VM's own LiveKit API key and secret (made at first boot).
# Your application server signs access tokens with them; clients join rooms at the URL below with such a token.
# The RoomService API (https://<this VM>/twirp/...) and lk take the same key and secret. Keep the secret private.
# The certificate is this VM's own, self-signed: its public half is C:\ProgramData\LiveKitProxy\tls\cert.pem.
# Guide: https://www.cloudimg.co.uk/guides/livekit-1-13-on-windows-server-2025-azure/
livekit-windows-server.url=wss://<public-address>
livekit-windows-server.api.key=<API followed by 12 random characters, different on every VM>
livekit-windows-server.api.secret=<48 random characters, different on every VM>
The URL is the address clients connect to. The API key names the key pair, and the API secret signs tokens. Anyone who holds the secret can mint a token for any room on this server, so keep it on your application server and never send it to a browser or app. The same pair is in LiveKit's own configuration, C:\ProgramData\LiveKit\config.yaml:
port: 7880
bind_addresses:
- 127.0.0.1
log_level: info
rtc:
tcp_port: 7881
udp_port: 7882
use_external_ip: true
keys:
<api key>: <api secret>
use_external_ip: true makes LiveKit find the VM's public IP address at start-up and give it to clients as the address for media.

Step 6 - Mint an access token and check it
lk reads the server's address, key and secret from the environment variables LIVEKIT_URL, LIVEKIT_API_KEY and LIVEKIT_API_SECRET. This loads the key and secret from the credentials file without showing them, mints a token that lets alice join the room demo for an hour, and checks it through the HTTPS front with curl.exe (part of Windows). -k is needed because the certificate is the VM's own self signed one:
PS> Get-Content C:\ProgramData\livekit-windows-server-credentials.txt | Where-Object { $_ -match '^livekit-windows-server\.api\.(key|secret)=' } | ForEach-Object { $n, $v = $_ -split '=', 2; Set-Item ('env:LIVEKIT_API_' + $n.Split('.')[-1].ToUpper()) $v }
PS> $env:LIVEKIT_URL = 'http://127.0.0.1:7880'
PS> curl.exe -sk -w " (HTTP %{http_code})`n" https://127.0.0.1/rtc/validate
no permissions to access the room (HTTP 401)
PS> $t = lk token create --join --room demo --identity alice --valid-for 1h --token-only
Using url, api-key, api-secret from environment
PS> $t.Split('.').Count
3
PS> curl.exe -sk -w " (HTTP %{http_code})`n" "https://127.0.0.1/rtc/validate?access_token=$t"
success (HTTP 200)
Without a token LiveKit answers 401. The token is a JSON Web Token (three parts separated by dots), signed with this VM's secret, and LiveKit accepts it. On the server, lk talks to LiveKit directly on http://127.0.0.1:7880. From another machine use https://<public-address> with the same key and secret.

lk adds informational lines on the console, such as Using url, api-key, api-secret from environment. In an interactive window it can also show notices that it downloads from LiveKit's GitHub repository, in a box. Add -q (for example lk -q room list) to hide both; errors still print.
In your own application, mint tokens on your server with one of LiveKit's server SDKs, using the API key and secret from the credentials file (LiveKit's guide to tokens).
Step 7 - Create and list rooms
LiveKit's RoomService API manages rooms. lk calls it with the same key and secret. This creates a room that closes after ten minutes with nobody in it, lists the rooms, then deletes the room:
PS> lk room create --empty-timeout 600 demo-room
Using url, api-key, api-secret from environment
setting empty timeout: 600
{
"sid": "RM_AE7JNSWNcv7h",
"name": "demo-room",
"emptyTimeout": 600,
"departureTimeout": 20,
"creationTime": "1796273215",
"creationTimeMs": "1796273215218",
"turnPassword": "<this room's TURN password>",
"enabledCodecs": [
{ "mime": "audio/PCMU" },
{ "mime": "audio/PCMA" },
{ "mime": "audio/opus" },
{ "mime": "audio/red" },
{ "mime": "video/VP8" },
{ "mime": "video/H264" },
{ "mime": "video/VP9" },
{ "mime": "video/AV1" },
{ "mime": "video/H265" },
{ "mime": "video/rtx" }
]
}
PS> lk room list
Using url, api-key, api-secret from environment
┌─────────────────┬───────────┬──────────────┬────────────┐
│ RoomID │ Name │ Participants │ Publishers │
├─────────────────┼───────────┼──────────────┼────────────┤
│ RM_AE7JNSWNcv7h │ demo-room │ 0 │ 0 │
└─────────────────┴───────────┴──────────────┴────────────┘
PS> lk room delete demo-room
Using url, api-key, api-secret from environment
deleted room demo-room
PS> lk room list
Using url, api-key, api-secret from environment
┌────────┬──────┬──────────────┬────────────┐
│ RoomID │ Name │ Participants │ Publishers │
├────────┼──────┼──────────────┼────────────┤
└────────┴──────┴──────────────┴────────────┘
The codec list is shortened here to one line per codec. Rooms are also created automatically when the first participant joins, so creating one in advance is optional.


Step 8 - Connect clients
Clients connect to wss://<public-address> (the URL in the credentials file) with a token your application server minted. LiveKit's client SDKs for the web, iOS, Android, Flutter, React Native, Unity and others are listed in LiveKit's documentation. The WebSocket goes through Caddy on port 443; the client then sends and receives media directly on UDP 7882, or TCP 7881 when UDP is blocked on its network.
Browsers and mobile apps only connect to a server whose certificate they trust. The image's certificate is self signed, so for real clients give the server a DNS name and a trusted certificate (below), then use wss://<your DNS name> as the URL.
The RoomService API is at https://<public-address>/twirp/livekit.RoomService/..., and LiveKit's server SDKs call it with the API key and secret. They, and lk on another machine (--url https://<your DNS name>), check the server's certificate, so they too need the trusted certificate.
How the server is protected

- LiveKit's signalling and API listen only on
127.0.0.1:7880. From outside, they are reached only through Caddy's HTTPS on port 443. - LiveKit checks every signalling and API request itself: a request without a token, or with a token not signed by this VM's secret, gets
401. - The API key and secret are made on this VM at first boot, so no other machine shares them. They are readable only by SYSTEM, Administrators and (for
config.yaml) the LiveKit service account. - Both services run under their own virtual accounts with no administrator rights.
- Windows Firewall allows TCP 443, 80 and 7881 and UDP 7882 through the four rules in the LiveKit group; the network security group decides who can reach them.
Change the API key and secret
To replace the key pair, for example after the secret has been shared by mistake:
- Open
C:\ProgramData\LiveKit\config.yamlin an administrator Notepad. - Under
keys:, replace the line<old key>: <old secret>with your new key and secret. A key is usuallyAPIfollowed by letters and digits, and the secret should be at least 32 random characters. You can keep more than onekey: secretline while your applications move to the new pair. - Run
Restart-Service LiveKit. - Update
C:\ProgramData\livekit-windows-server-credentials.txtso the file stays right.
Tokens signed with a removed secret stop working at once.
Use a DNS name and a trusted certificate
The image's certificate is self signed and named for the VM's IP addresses and computer name. To use a DNS name with a certificate your clients already trust:
- Point the name at the VM's public IP address.
- Get a certificate and key for that name as PEM files.
- Replace
C:\ProgramData\LiveKitProxy\tls\cert.pemwith the certificate, followed by any intermediate certificates. - Replace
key.pemin the same folder with the private key. - Run
Restart-Service LiveKitProxy. - Change the URL in the credentials file to
wss://<your DNS name>.
Maintenance
- Windows updates: Windows Update is on, as Microsoft ships it. Restarting the VM restarts both services automatically.
- Back up your settings: LiveKit keeps its configuration in
C:\ProgramData\LiveKitand the front keeps its Caddyfile and certificate inC:\ProgramData\LiveKitProxy. Back up both folders, or use Azure Backup of the VM. LiveKit keeps rooms in memory only, so there is no media or room data to back up. - Upgrade LiveKit: you choose when to upgrade.
- Download
livekit_<version>_windows_amd64.zipof the version you want from the LiveKit server releases on GitHub. - In an administrator PowerShell, stop the services:
Stop-Service LiveKitProxy, LiveKit. - Replace
livekit-server.exeinC:\Program Files\LiveKitwith the one from the zip. - Start them again:
Start-Service LiveKit, LiveKitProxy.
lk is upgraded the same way from the LiveKit CLI releases (lk_<version>_windows_amd64.zip). Your configuration is kept.
- Logs: LiveKit's log is in C:\ProgramData\LiveKit\service-logs and Caddy's in C:\ProgramData\LiveKitProxy\logs. The first boot log is C:\ProgramData\livekit-windows-server-firstboot.log; it never contains the key or secret.
- Read me: C:\Program Files\LiveKit\README.txt lists the services, folders and ports.
Support
cloudimg's support team is on hand 24 hours a day by email (support@cloudimg.co.uk), with a guaranteed response within 24 hours. Contact support@cloudimg.co.uk.