Set Up Reverse Proxy
Configuring Caddy as a reverse proxy for your Oxy deployment
Set Up Reverse Proxy
A reverse proxy is essential for providing secure access to your Oxy deployment. We recommend using Caddy, which automatically handles SSL certificate management.
Install Caddy
Install Caddy on your server:
Create Basic Caddyfile
Create a basic Caddyfile to configure your reverse proxy:
Replace your-domain.com
with your actual domain name or use localhost
for local testing. Adjust the port if your Oxy instance listens on a different port.
Caddy automatically manages SSL certificates for you, making HTTPS setup effortless. Just make sure your domain’s DNS is properly configured to point to your server.
Set Up Caddy as a Service
Configure Caddy to run as a systemd service:
Configure Firewall for HTTP/HTTPS
Update your firewall to allow HTTP and HTTPS traffic:
These ports are necessary for Caddy to obtain and renew SSL certificates (port 80) and serve your site securely (port 443).
Now that you have a reverse proxy set up with automatic HTTPS, you can proceed to set up your Oxy workspace and repository.
Data Persistence Considerations
When setting up your Oxy deployment behind a reverse proxy, it’s important to properly configure data persistence:
- Oxy stores its state data (including SQLite database files) at the location specified by
OXY_STATE_DIR
- If not specified, data defaults to
~/.local/share/oxy/
in the user’s home directory - Ensure this directory is backed by reliable storage and included in your backup strategy
- For high-availability setups, consider using network-attached storage that can be accessed by multiple instances
Your reverse proxy configuration remains unchanged regardless of where Oxy stores its data, but ensuring proper data persistence is critical for production deployments.