Step-by-step guide for deploying Oxy on Google Cloud Platform
Access Google Cloud Console
Create or Select a Project
Navigate to Compute Engine
Create a VM Instance
oxy-server
)t2a-standard-1
(1 vCPU ARM, 4 GB memory)Note Your External IP
Access DNS Settings
Add DNS Records
@
(represents the root domain)www
Wait for DNS Propagation
Connect to Your VM
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 Firewall Rule
Create Rule for Port 3000
allow-oxy-port-3000
oxy-server
(or the tag you want to use)0.0.0.0/0
(for public access) or your specific IP range for restricted access3000
Apply Tag to Your VM
oxy-server
(or whatever tag you used in the firewall rule).Click SAVE.Create a Systemd Service File
ubuntu
user which is standard on GCP 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
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
gcloud
CLI installed and authenticated for the last command.Usage Level | ARM-based (Best Value) | x86-based |
---|---|---|
Small (1-3 users) | t2a-standard-1 (2 vCPU, 4 GB) | e2-medium (1 vCPU, 4 GB) |
Medium (3-5 users) | t2a-standard-2 (2 vCPU, 8 GB) | e2-standard-2 (2 vCPU, 8 GB) |
Large (5-15 users) | t2a-standard-4 (4 vCPU, 16 GB) | e2-standard-4 (4 vCPU, 16 GB) |
Cannot access Oxy through the domain or IP
curl http://localhost:3000
dig yourdomain.com
to verify DNS is pointing to your VM’s external 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
Connection refused or timeout errors
sudo systemctl status oxy
sudo netstat -tlnp | grep :3000