Skip to main content

Install Oxy CLI

After setting up your server, the next step is to install and configure the Oxy CLI.
1

Install Oxy

Follow the Oxy installation instructions to install the Oxy CLI on your server.
bash <(curl --proto '=https' --tlsv1.2 -LsSf https://get.oxy.tech)
This command downloads and installs the latest stable release of Oxy.
Edge vs Nightly: Edge builds are created on every push to main, while nightly builds are scheduled daily. Both are pre-release versions for testing the latest features. Browse all available builds at oxy-hq/oxy-nightly.
2

Verify Installation

After installation, verify that Oxy is correctly installed:
oxy --version
This should display the current version of Oxy installed on your system.
3

Set Up Oxy as a System Service

To ensure Oxy runs automatically and persists across server restarts, set it up as a systemd service:
cat <<EOF | sudo tee /etc/systemd/system/oxy.service
[Unit]
Description=Oxy server
After=network.target

[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/your-oxy-project
ExecStart=/bin/bash -c "/usr/local/bin/oxy serve & /usr/local/bin/oxy mcp-sse"
Restart=always
Environment="OXY_STATE_DIR=/home/ubuntu/oxy_data"
Environment="OXY_DATABASE_URL=postgresql://user:password@your-postgres-host:5432/oxy"

[Install]
WantedBy=multi-user.target
EOF
About oxy serve: This command runs the web interface only and requires an external PostgreSQL database.Two options for running Oxy:
  • oxy start - Automatically manages PostgreSQL in Docker (requires container runtime)
  • oxy serve - Connects to external PostgreSQL via OXY_DATABASE_URL (recommended for production)
For production deployments, use oxy serve with a managed PostgreSQL service (AWS RDS, Cloud SQL, etc.).
Make sure to replace:
  • /home/ubuntu/your-oxy-project with your Oxy workspace path
  • OXY_DATABASE_URL value with your actual PostgreSQL connection string
4

Enable and Start the Service

Enable the service to start automatically on boot and start it:
sudo systemctl daemon-reload
sudo systemctl enable oxy
sudo systemctl start oxy
You can check the status of the service with:
sudo systemctl status oxy
Now that the Oxy CLI is installed and configured to run as a service, you can proceed to set up a reverse proxy for secure access.