Skip to main content
This guide deploys Oxy on a single EC2 instance using oxy start, which manages PostgreSQL and the Oxy process for you.

1. Launch an EC2 instance

In the AWS ConsoleEC2Launch instance:
SettingValue
AMIUbuntu 22.04 LTS (64-bit ARM or x86)
Instance typet4g.medium (ARM, 2 vCPU, 4 GB) — or t3.medium for x86
Storage20 GB gp3
Security groupAllow SSH (22), HTTP (80), and port 3000 inbound
Note the Public IPv4 address once the instance is running.

2. Connect and install

SSH into your instance, then install Docker and Oxy:
ssh -i your-key.pem ubuntu@YOUR_PUBLIC_IP

# Install Docker
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker

# Install Oxy
curl --proto '=https' --tlsv1.2 -sSf https://get.oxy.tech | sh

3. Set up your project

# Clone existing project
git clone https://github.com/your-org/your-oxy-project.git
cd your-oxy-project

# Or initialize a new one
mkdir my-oxy && cd my-oxy
oxy init

4. Start Oxy

oxy start
oxy start launches PostgreSQL in Docker and starts the Oxy server. Your instance is now running at http://YOUR_PUBLIC_IP:3000.
To keep Oxy running after you close your SSH session, use a terminal multiplexer:
screen -S oxy
oxy start
# Detach with Ctrl+A, D

5. (Optional) Use an external database for production

When you’re ready to use a managed database instead of the Docker-managed PostgreSQL:
export OXY_DATABASE_URL="postgresql://user:password@your-rds-host:5432/oxy"
oxy serve
Use Amazon RDS for PostgreSQL for a fully managed option with automated backups and Multi-AZ support.
Team sizeARM (best value)x86
1–3 userst4g.small (2 GB)t3.small (2 GB)
3–10 userst4g.medium (4 GB)t3.medium (4 GB)
10+ userst4g.large (8 GB)t3.large (8 GB)

Next steps