Deploying Oxy on Cloud
How to deploy Oxy on cloud environments
This guide walks you through deploying Oxy on a cloud environment, from provisioning infrastructure to configuring authentication.
The product currently doesn’t include built-in authentication and requires some technical setup, especially to work with your own files and configuration. It’s best suited for teams comfortable with a bit of customization and who want flexibility in how they deploy and integrate with existing systems.
We’re working on improving automation and usability, and are happy to help with setup—feel free to reach out via Discord or any support channel.
Quick Start with Docker: If you prefer a faster deployment option, you can use our Docker deployment method instead of the traditional setup. Docker provides a more streamlined experience with fewer manual steps.
Deployment Paths
There are several approaches to deploying Oxy:
- Traditional Linux Setup - Follow the step-by-step guide below to provision a machine, install dependencies, and configure each component manually.
- Docker Deployment - Use our Docker image for a containerized deployment that simplifies setup and maintenance. See the Docker deployment guide for details.
- Hands-on Guides - For practical, ready-to-use deployment recipes, check our hands-on guides section which includes:
- Google Cloud Platform (GCP) - Deploy Oxy on Google Cloud using our dedicated GCP deployment guide.
Deployment Overview
Deployment Request Flow Diagram
Data Persistence
When deploying Oxy in production, it’s important to understand how data is stored and persisted:
- Oxy uses SQLite by default for its internal state management
- Data is stored at the location specified by
OXY_STATE_DIR
environment variable - If
OXY_STATE_DIR
is not set, data defaults to~/.local/share/oxy/
- This directory contains database files, semantic information, cached query results, and workflow history
Persistence Strategies
For production deployments, ensure your data persistence strategy matches your reliability requirements:
- Docker deployments: Mount a volume to
/data
and setOXY_STATE_DIR=/data
- Cloud VMs: Use attached persistent disks (EBS volumes, Google Persistent Disks, etc.)
- Self-hosted: Consider regular backups of the state directory
Data loss can occur if proper persistence is not configured. Always ensure your Oxy state directory is backed by reliable storage and included in your backup strategy.
Deployment Steps
Follow these steps to deploy Oxy on your cloud environment:
1. Create Machine
Provision and set up your server with the necessary requirements
2. Install Oxy CLI
Install and configure the Oxy CLI on your server
3. Set Up Workspace & Repository
Set up your Oxy workspace and configure your repository
4. Configure Environment
Set up environment variables and secrets management
5. Set Up Reverse Proxy
Configure Caddy as a reverse proxy for HTTPS, security, and performance
6. Set Up Authentication
Configure authentication using Basic Auth or OAuth2
Docker Deployment
Deploy Oxy using Docker containers for simplified setup and management
GCP Deployment
Step-by-step guide for deploying Oxy on Google Cloud Platform
Troubleshooting
For further help or to ask questions, join our community on Discord.
Looking for quick, copy-paste deployment recipes? Check out our Hands-on Deployment Guides that provide step-by-step instructions for common deployment scenarios.
Quick One-Time Script
If you prefer to set up everything with a single script, you can use the following bash script that automates the entire deployment process. Customize the variables at the beginning to fit your requirements:
This script is provided as a starting point and may need adjustments for your specific environment. Always review scripts before running them on your server.o “Your Oxy instance should now be available at: https://${DOMAIN_NAME}” echo “Remember to update configuration variables in .env and restart the service if needed.”
To use the script:
- Save it to a file (e.g.,
deploy-oxy.sh
) - Make it executable:
chmod +x deploy-oxy.sh
This script is provided as a starting point and may need adjustments for your specific environment. Always review scripts before running them on your server. - Edit the configuration variables at the beginning of the script
- Run the script:
./deploy-oxy.sh