Deploy Letta Server on Railway
Deploying the Letta Railway template
We’ve prepared a Letta Railway template that has the necessary environment variables set and mounts a persistent volume for database storage. You can access the template by clicking the “Deploy on Railway” button below:
Accessing the deployment via the ADE
Now that the Railway deployment is active, all we need to do to access it via the ADE is add it to as a new remote Letta server.
The default password set in the template is password
, which can be changed at the deployment stage or afterwards in the ‘variables’ page on the Railway deployment.
Click “Add remote server”, then enter the details from Railway (use the static IP address shown in the logs, and use the password set via the environment variables):
Accessing the deployment via the Letta API
Accessing the deployment via the Letta API is simple, we just need to swap the base URL of the endpoint with the IP address from the Railway deployment.
For example if the Railway IP address is https://MYSERVER.up.railway.app
and the password is banana
, to create an agent on the deployment, we can use the following shell command:
This will create an agent with two memory blocks, configured to use gpt-4o-mini
as the LLM model, and text-embedding-3-small
as the embedding model. We also include the base Letta tools in the request.
If the Letta server is not password protected, we can omit the X-BARE-PASSWORD
header.