Is it allowed to run the token server in the docke...
# ask-ai
g
Is it allowed to run the token server in the docker file for livekit agent cloud?
t
Thanks for reaching out, Oliver. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hey there! Could you help me understand your main goal for running the token server in the Docker file for LiveKit Agent Cloud? For example: • Are you trying to make deployment easier by putting everything into one container? • Is the token server meant for the agent’s own authentication, or is it for external client applications? • Do you have any specific networking or scaling needs in mind? Knowing a bit more about your setup will really help us figure out the best way to support your deployment.
g
Yes. It'd make deployment easier. The token server is for client apps and agents to connect to rooms and use e2ee. No specific networking or scaling in mind
t
Hey there! Just a quick note: running a token server in the same Docker container as a LiveKit agent for Agent Cloud deployment isn’t something the docs cover directly. But here are a couple of things to keep in mind: • LiveKit Agent Cloud expects a fixed startup command that launches the agent right away (like
CMD ["python", "agent.py", "start"]
), which usually means the container is best focused on running just one main process. • Token servers are generally pretty lightweight and often run as standalone services, usually with Node.js or something similar. Putting both in one container might seem like it makes deployment easier, but it can clash with the single-process approach that Agent Cloud recommends. Most folks find it smoother to run the token server separately alongside the agent. If you want, I’m happy to help you set up a standalone token server or chat through other deployment options that fit what you’re aiming for. Just let me know! Sources: Deploying to production | LiveKit Docs | Authentication Examples | livekit/livekit_composite | DeepWiki | TEMPLATE.md | Web and mobile frontends | LiveKit Docs