I currently selfhosted the LiveKit server on Virtu...
# ask-ai
b
I currently selfhosted the LiveKit server on Virtual machine but when i down the docker compose & restart it it's loss all sip trunks & dispatch rules so is there any solution to reload them back when docker is up again
t
Thanks for reaching out, Dhruvil. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
SIP trunks and dispatch rules in a self-hosted LiveKit deployment are stored in Redis. To ensure that these configurations persist after restarting Docker Compose, you need to: • Use a Docker volume to persist Redis data: Your
docker-compose.yml
should include a volume (for example,
redis_data:/data
) mapped to the Redis container. This makes Redis retain its data—including SIP trunks and dispatch rules—across reboots and container restarts. • Check Redis persistence configuration: Redis should have persistence enabled. By default, it uses snapshotting (RDB files), but for better durability, you can enable the Append Only File (AOF) option in Redis's configuration. When these are set up, any SIP trunks and dispatch rules added through the LiveKit API or SIP service are automatically reloaded after you bring up your Docker Compose stack again, since they are restored from Redis’s persisted data. No manual reloading process is needed unless your Redis data was deleted or a misconfiguration caused loss of volume data. If you are still encountering loss of configuration after confirming you are using persistent volumes, please provide details of your
docker-compose.yml
and Redis setup so I can help further. References: Sources: pkg/service/redisstore_sip.go | docker-compose.yaml | SIP overview | LiveKit Docs