egma self-host up to build and start the Egma platform from its source repository. This guide sets up a local instance. For a server used by other people or a remote agent, also configure its public URL and storage URL.
Before you start
Install:- Git.
- Node.js 22 or newer and npm.
- Docker Desktop, or Docker Engine with the Docker Compose plugin. Start the Docker daemon.
- OpenAI and Cartesia API keys for the model choices used by the built-in persona. Add a Deepgram key if you select Deepgram speech-to-text.
Download Egma
Add model credentials
.env in your editor. Set EGMA_OPENAI_API_KEY and EGMA_CARTESIA_API_KEY to your provider keys.
For this local setup, remove all four EGMA_PHONE_* lines copied from the example. Add a carrier route later only if you need Retell phone simulations.
Leave EGMA_DEEPGRAM_API_KEY empty unless a selected persona uses Deepgram. Keep .env out of Git. Put values that contain $ in single quotes so Docker Compose keeps them literal.
Start the platform
.egma-platform/platform.env. Keep this file private and preserve it with the installation’s data. Its encryption key is needed to read the provider credentials stored in PostgreSQL. Later starts reuse it.
Use egma self-host up when you start the instance again or change its .env. A direct docker compose up does not automatically load the generated credential file.
Create your account
Sign up in the web app. With the defaultEGMA_SINGLE_ORGANIZATION=true, the first account becomes the instance’s admin. Later users join by invitation from Settings → People.
SMTP is optional for local signup. Without SMTP, the admin receives an invitation link to share. Configure email if users need verification emails or password-reset emails.
Connect an agent repository
Open a terminal in the repository that contains your voice agent:await simulation(agent, ctx, session) before the session starts for every simulation. Set EGMA_URL to an address the worker can reach and EGMA_API_KEY to a key for the simulation’s project. Both simulation traces and production monitoring need these settings. A worker deployed elsewhere cannot reach this machine through localhost.
Check the installation
You should be able to sign in, open your project, and complete a test run. For a voice run, open its recording and verify playback too. If startup fails, use the error printed byegma self-host up:
Use Configuration to set model credentials, public access, authentication, and storage.