polite-oil-10264
10/09/2025, 1:57 PMtall-airline-16756
10/09/2025, 1:57 PMtall-airline-16756
10/09/2025, 1:58 PMegress test-egress-template subcommand from the LiveKit CLI. This handy command lets you create a room, add virtual publishers, and open a browser instance to your app URL with the right parameters—all set up for you!
Here’s a simple way to get started and test:
1. First, make sure your custom template application is deployed and accessible through a URL.
2. Next, configure your LiveKit server with the needed details like ws_url, api_key, and api_secret. You can set these in environment variables or a config file—whichever works best for you.
3. Then, run the Egress service locally using a YAML configuration file. For example:
api_key: your-api-key
api_secret: your-api-secret
ws_url: ws://192.168.65.2:7880
insecure: true
redis:
address: 192.168.65.2:6379
After that, start the Egress service by running this command:
docker run --rm \
-e EGRESS_CONFIG_FILE=/out/config.yaml \
-v ~/egress-test:/out \
--cap-add=SYS_ADMIN \
livekit/egress
Once the Egress service is up and running, you can use the CLI to test your custom template with your self-hosted setup.
If you run into any hiccups, here are a few things to double-check:
• Is Redis accessible and properly configured?
• Does the ws_url resolve correctly from inside Docker?
• Is Chrome sandboxing enabled by running the container with --cap-add=SYS_ADMIN?
Please don’t hesitate to reach out if you need any more help—I’m here to support you every step of the way!
Sources: Custom recording templates | LiveKit Docs | template-sdk/README.md | Self-hosting the Egress Service | LiveKit Docs | README.mdpolite-oil-10264
10/09/2025, 1:59 PMtall-airline-16756
10/09/2025, 2:01 PM/token that takes parameters such as roomName and participantName.
2. Next, from your local environment, you can send a POST request to this endpoint. Here's an example:
curl -X POST <PRODUCTION_SERVER_URL>/token \
-H "Content-Type: application/json" \
-d '{"roomName": "my-room", "participantName": "user1"}'
This will give you a JWT token that you can then use in your local custom template.
Also, please double-check that your production server’s token generation logic includes all the necessary permissions for what you need—like joining the room or publishing. If you run into any questions or want me to help you with the token generation or configuration, just let me know. I'm here to help!
Sources: TEMPLATE.md | src/pages/api/token.ts | LiveKit CLI Setup | LiveKit Docs | README.md