Video Tutorial: Deploying Your Agent to a TEE
Deployment Options
Below we’ll cover the two of the most popular approaches to deploying your elizaOS project:Quick Comparison
Complexity | Method | How it Works | Platforms | Cost |
---|---|---|---|---|
⭐ | Managed Cloud | Push to GitHub → Auto deploy | Railway, Render | ~$20/mo |
⭐⭐ | Self-Hosted | Docker → Your VPS | Phala, Hetzner, Coolify, DO | ~$10/mo |
For Advanced Users: If you’re experienced with server administration and networking, you can deploy elizaOS like any Node.js application using your preferred infrastructure setup. The sections below are for developers looking for guided deployment paths.
Option 1: Managed Cloud
The easiest deployment method, best for rapid prototyping. These platforms handle all of the complicated stuff automatically. This is a good option if you:- are a beginner,
- don’t know how to use Docker/VPS services (and don’t want to learn)
- aren’t expecting a huge amount of traffic,
- have a relatively simple agent, or
- are price insensitive
Cost Reality Check: A simple agent might cost ~$20 dollars per month, but as you scale up, the costs can quickly balloon. For this reason, it’s smart to set spending threshholds and closely monitor resource usage.
Pros & Cons
✅ Pros | ❌ Cons |
---|---|
Zero server management - No Linux, Docker, or infrastructure knowledge needed | Variable costs - Pricing based on usage (CPU, RAM, bandwidth, requests) |
Deploy in minutes - Push to GitHub, connect your repo, and you’re live | Can get expensive - Heavy traffic or processing can push bills really high |
Automatic everything - SSL certificates, scaling, updates, backups | Less control - Limited customization of infrastructure |
Great developer experience - Built-in logs, metrics, rollbacks | Vendor lock-in - Harder to migrate to other platforms |
Free tiers - Most platforms offer generous free plans to start | Resource limits - May not handle very high-performance requirements |
Railway (Recommended)
Railway website | Railway docs Railway is a solid, preferred option. They offer a free Trial plan with $5 of credits which is more than enough to test out. It also re-deploys everytime you push a change to Github, which is convenient. Here’s the steps from project creation => deployment:1
Create your project
Terminal
2
Push to GitHub repo
Create a GitHub repository and push your code. Choose one approach:Option A: Public Repository (Recommended)
- Create a PUBLIC GitHub repository
- Keep
.env
in your.gitignore
(stays secure) - You’ll add environment variables in Railway dashboard (Step 5)
- Create a PRIVATE GitHub repository
- Remove
.env
from your.gitignore
- Commit your
.env
file (secure since repo is private) - ✅ Skip Step 5 - Railway will use your committed .env file
Both approaches work well. Public repos are more common for open-source projects, while private repos let you skip the environment variables step.
3
Sign up for Railway
- Go to railway.com
- Click “Sign in” and sign up with your GitHub account

4
Deploy new project
- Click “Deploy New Project”
- Select “GitHub Repo”
- Select your project’s GitHub repository from the list

If you used Option A (Public Repository) and Railway starts auto-deploying immediately, stop the deployment - we need to add environment variables first! If you used Option B (Private Repository), you can let it deploy.
5
Add environment variables
Skip this step if you used Option B (Private Repository) - your .env file is already committed!For Option A (Public Repository), add your environment variables in Railway:
- Click on your service → Variables tab

- Add the variables your project needs:
env
What to add? Check your
.env
file to see which variables your specific project needs. The exact variables depend on your project’s configuration and integrations.6
Deploy your app
- Once environment variables are set, click “Deploy” to start deployment
- Monitor the deployment logs to ensure everything builds successfully
- Wait for deployment to complete (you’ll see “Build completed” in logs)
7
Get your production URL
- Go to Settings → Networking
- Click “Generate Domain” (or add custom domain if you own one)
- Railway may ask you to specify the port - set it to 3000 (default)
- Your agent is now live at your generated URL!

Render
Render website | Render docs Render is comparable to Railway, but its Free/Hobby plan is less generous and slower (Render turns your instance off when its not in use). Still it’s a good option.1
Create your project
Terminal
2
Push to GitHub repo
Create a GitHub repository and push your code. Choose one approach:Option A: Public Repository (Recommended)
- Create a PUBLIC GitHub repository
- Keep
.env
in your.gitignore
(stays secure) - You’ll add environment variables in Render dashboard (Step 5)
- Create a PRIVATE GitHub repository
- Remove
.env
from your.gitignore
- Commit your
.env
file (secure since repo is private) - ⚠️ Still need Step 5 - Render requires env vars on their side even with private repos
Unlike Railway, Render always requires you to add environment variables on their platform, even if you have a private repo with committed .env file.
3
Sign up for Render
- Go to render.com
- Create a Render account with your GitHub profile
4
Select Web Service and connect GitHub
- Click “Web Services” when asked to select a service type

- Select Git Provider → GitHub to give Render access to your repos

- Select the repository you want to deploy
5
Configure build settings
Render will ask you about Build and Start commands:
- Build Command:
bun install && bun run build
- Start Command:
bun run start
- Instance Type: Free (Hobby) - works but slower, or paid for faster performance
Render automatically detects the port, so no port configuration needed!
6
Add environment variables
Put all your environment variables in here, even if you commited your .env file, you still need to add it on Render-side:
Add your variables:

env
What to add? Check your
.env
file to see which variables your specific project needs. The exact variables depend on your project’s configuration and integrations.7
Deploy and access your app
- Click “Create Web Service” to start deployment
- Monitor the build logs as Render builds and deploys
- Once deployment completes, Render provides your production URL at the top
- Visit your URL - your agent is now live!

Free tier note: Free (Hobby) services spin down after 15 minutes of inactivity and are slower. Upgrade to paid plans for always-on hosting and better performance.
Option 2: Self-Hosted
Deploy on your own Virtual Private Server (VPS) for more control and predictable costs. Different platforms handle the build process differently. Some build from GitHub (like Coolify), others use Docker (like Phala).Pros & Cons
✅ Pros | ❌ Cons |
---|---|
Lower costs - Fixed monthly VPS cost regardless of traffic | Requires server knowledge - Need basic Linux/Docker skills |
Complete control - Full access to your infrastructure | More setup time - Initial configuration takes longer |
Better security - Your data never leaves your servers | You handle maintenance - Updates, backups, monitoring are your responsibility |
Predictable pricing - No surprise bills from traffic spikes | Downtime risk - If your server goes down, you fix it |
Performance control - Choose exact CPU/RAM specifications | Learning curve - Need to understand Docker, networking basics |
Phala Network (Recommended)
Phala website | Phala docs | Video Tutorial Phala offers secure deployment with excellent elizaOS integration and a good CLI. Perfect for production agents requiring a good mix of cost-effective and good security.1
Create your project
Terminal
Both regular projects and TEE projects include Docker files. Use regular projects unless you specifically need TEE security features.
2
Install prerequisites
Terminal
3
Setup accounts and authentication
- Create Phala account at dashboard.phala.network
- Add a credit card (small amounts for testing)
- Create API token in dashboard → API Tokens
- Authenticate:
Terminal
4
Configure environment variables
Set up your production
.env
file with the variables your project needs:.env
What to add? Check your
.env
file to see which variables your specific project needs. We recommend neon.tech for easy PostgreSQL setup.5
Build and push Docker image
Terminal
.env
:.env
6
Deploy to Phala Cloud
Terminal
- vCPUs: 2 (sufficient for most agents)
- Memory: 4096 MB (4GB recommended)
- Disk: 40 GB
- TEEPod: Select any online TEE pod
7
Access your live agent
After running the
cvms create
command, you’ll receive an App URL - this is your cloud dashboard where you can monitor everything.To access your agent:- Visit the App URL provided after deployment (your cloud dashboard)
- In the dashboard, click Network → “Endpoint #1”
- This gives you your agent’s public URL
- Test both the web interface and any connected platforms (Discord, Twitter, etc.)
Other Self-Hosted Options
Different approaches for self-hosting: Platform-Assisted (Like Managed Cloud, but bring-your-own VPS):- Coolify - Railway-like UI on your VPS, builds from GitHub automatically
- Install:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash
on any VPS
- Use any VPS provider: Hetzner, DigitalOcean, Netcup
- Process: Build Docker image → Push to Docker Hub →
docker run
on VPS
- Clone repo directly on VPS, install Node.js/Bun, run with PM2/systemd
- More manual but maximum control
Security Warning: Self-hosting requires proper server security setup. If you’re new to server administration, you can accidentally expose sensitive data. Consider using managed cloud services (Option 1) which handle security for you, or follow platform-specific guides carefully.
Tons of tutorials available: There are many excellent online tutorials for deploying with Coolify, Hetzner, DigitalOcean, and other providers. Search for “[Provider Name] Docker deployment tutorial” or “[Provider Name] Node.js deployment” for platform-specific guides.