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 runs the official Oxy installation script.

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"

[Install]
WantedBy=multi-user.target
EOF

Make sure to replace /home/ubuntu/your-oxy-project with the actual path to your Oxy workspace that you’ll set up in a later step.

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.