is it possible to save recording of session in liv...
# ask-ai
f
is it possible to save recording of session in livekit when running from local? i can only see option to upload to S3 and not able to store the recording locally. Record audio or video Use LiveKit Egress to capture audio and video directly to your storage provider. The simplest pattern is to start a room composite recorder when your agent joins the room. https://docs.livekit.io/deploy/observability/data/
t
Thanks for reaching out, Viren. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — regarding saving recordings locally when running LiveKit locally: yes, you can. To save locally, start Egress with a local file output instead of a cloud target: • For composite or track egress, set the
filepath
or
filename_prefix
to a local path (e.g.,
/path/to/local/folder/recording.mp4
). • Ensure the Egress service/process (or its Docker container) has write permission to that folder — when using Docker, mount the host directory as a volume so the file is accessible. If you’d like, tell me which egress type you’re using (Room Composite, Track, or Track Composite) and whether you run Egress as a local binary or in Docker, and I’ll give the exact request snippet and Docker mount example. Sources: Egress API | LiveKit docs | RoomComposite Egress | LiveKit Docs | Egress examples | LiveKit docs | Egress output types | LiveKit docs | Self-hosting the Egress Service | LiveKit docs
f
is egress free? i am running it on local and not sure how to set it up
t
Thanks — I’ll answer both parts: cost and local setup. Cost • Egress is free when you self‑host (including running locally). The managed LiveKit Cloud has usage-based pricing, but self‑hosting avoids those fees. Quick local setup checklist 1. Install prerequisites: Redis and GStreamer with required plugins (
gstreamer
,
gst-plugins-base
,
gst-plugins-good
,
gst-plugins-bad
,
gst-plugins-ugly
,
gst-libav
). 2. Create an
config.yaml
for the Egress service with your API key/secret,
ws_url
(use
<ws://localhost:7880>
for local), and Redis address (
localhost:6379
). 3. Run Egress (example Docker command):
Copy code
docker run --rm \
  --cap-add SYS_ADMIN \
  -e EGRESS_CONFIG_FILE=/out/config.yaml \
  -v ~/livekit-egress:/out \
  -p 1935:1935 -p 8080:8080 \
  livekit/egress
• If using Docker, mount a host directory so recordings written to a local
filepath
are persisted and accessible. • Use
<ws://host.docker.internal:7880>
and
host.docker.internal:6379
on macOS/Windows if needed. 1. Start recordings via the Egress API/CLI/SDK. Include
roomRecord
permission in the access token. 2. To save files locally, specify a local
filepath
(or
filename_prefix
) in the egress request (e.g.,
/path/to/folder/recording.mp4
) and ensure the Egress process has write permission to that path. Would you like: • An exact egress request snippet for Room Composite or Track egress? • A Docker compose example that mounts the output directory for you? Sources: LiveKit Pricing | Recording and export | LiveKit docs | Self-hosting the Ingress Service | LiveKit docs | Self-hosting the Egress Service | LiveKit docs | Egress API | LiveKit docs