Step-by-step guide for deploying Oxy on Amazon EC2
Access AWS Management Console
Navigate to EC2 Dashboard
Launch an Instance
oxy-server
)t4g.small
(2 vCPU, 2 GB memory) or t4g.medium
(2 vCPU, 4 GB memory)t3.small
(2 vCPU, 2 GB memory) or t3.medium
(2 vCPU, 4 GB memory)Note Your Public IP
Access DNS Settings
Add DNS Records
@
or your subdomain (e.g., oxy
)Wait for DNS Propagation
Connect to Your Instance
Update System and Install Essential Packages
Install Required Dependencies
Install Oxy
Verify the Installation
oxy init
command to initialize a new workspace with all the necessary files and configuration:
Create and Navigate to Workspace Directory
Initialize Oxy Project
config.yml
file with your database and model configurationsagents
and workflows
Alternative: Set Up Git and Clone Existing Project
oxy init
.Create Data Directory
Configure Environment Variables
.env
file in the workspace directory:OXY_STATE_DIR
, Oxy will use the default location ~/.local/share/oxy/
.
We recommend setting it explicitly for production deployments to make backups and maintenance easier.oxy init
process.Create a Systemd Service File
ubuntu
user which is standard on EC2 Ubuntu instances. If you’re using a different username, adjust accordingly.Save and exit.Enable and Start the Service
Verify the Service
View Logs (if needed)
Test the Connection
Access Your Deployment
Access Security Groups
Find Your Instance's Security Group
Add Inbound Rule for Port 3000
Save Changes
OXY_STATE_DIR
environment variable (we set it to ~/oxy-data)OXY_STATE_DIR
is not set, Oxy uses ~/.local/share/oxy/
by defaultStopping the Service
Updating Oxy
Backup Data
Usage Level | ARM-based (Best Value) | x86-based |
---|---|---|
Small (1-3 users) | t4g.small (2 vCPU, 2 GB memory) or t4g.medium (2 vCPU, 4 GB memory) | t3.small (2 vCPU, 2 GB memory) or t3.medium (2 vCPU, 4 GB memory) |
Medium (3-5 users) | t4g.large (2 vCPU, 8 GB memory) | t3.large (2 vCPU, 8 GB memory) |
Large (5-15 users) | t4g.xlarge (4 vCPU, 16 GB memory) | t3.xlarge (4 vCPU, 16 GB memory) |
Cannot access Oxy through the domain or public IP
sudo systemctl status oxy
curl http://localhost:3000
dig yourdomain.com
to verify DNS is pointing to your EC2 instance’s public IPOxy service won't start
sudo journalctl -u oxy -f
cat ~/oxy-workspace/.env
sudo cat /etc/systemd/system/oxy.service
ls -la ~/oxy-workspace
which oxy
Data not persisting between restarts
ls -la ~/oxy-data
grep OXY_STATE_DIR ~/oxy-workspace/.env
OXY_STATE_DIR
, check the default location: ls -la ~/.local/share/oxy/
sudo chown -R ubuntu:ubuntu ~/oxy-data
Instance stopped responding
df -h
Connection refused or timeout errors
sudo systemctl status oxy
sudo netstat -tlnp | grep :3000