-
Notifications
You must be signed in to change notification settings - Fork 74
Xata Agent ‐ Deploy on EC2
Tudor Golubenco edited this page Apr 10, 2025
·
5 revisions
This guide walks you through deploying the Xata Agent on an EC2 instance using Docker.
- Open the AWS console and create a new EC2 instance.
- Name it something like
xata-agent. - Select Ubuntu as the operating system.
- Use
t2.mediumas the instance type (recommended). - Set storage to 25GB (recommended).
- Select or create a key pair for SSH access.
- Configure VPC and Security Group settings so the instance can access the RDS instances you want to monitor. This depends on your network setup.
- Click Launch instance.
Once the instance is running, connect via SSH:
ssh -i your-key.pem ubuntu@your-ec2-ipRun the following command to install Docker:
sudo snap install dockergit clone https://github.com/xataio/agent.git
cd agentEdit the .env.production file and set the public URL to the EC2 instance’s DNS name or IP (port 8080). Also, add at least the OpenAI API key:
# Public URL of the app
PUBLIC_URL=http://<your-ec2-ip>:8080
# LLM API credentials
OPENAI_API_KEY=sk-proj-....
DEEPSEEK_API_KEY=
ANTHROPIC_API_KEY=
Run the following steps:
-
Start a
tmuxsession to keep the process running in the background:tmux
-
Start the agent using Docker Compose:
sudo docker compose up
- Open the public URL (
http://<your-ec2-ip>:8080) your browser to continue setup. - Give a name to your project.
- Follow the Onboarding guide in the UI