This guide covers setting up, configuring, and using routatic-proxy on Fedora 44.
- Prerequisites
- Installation Methods
- Configuration
- Running the Proxy
- Configuring Claude Code
- Systemd Service Setup
- Troubleshooting
Before installing routatic-proxy, ensure you have:
- An OpenCode account with an API key from opencode.ai
- Claude Code CLI installed (optional, for using with Claude Code)
- Basic familiarity with the terminal
- Fedora 44 (or compatible Fedora version)
- Internet connectivity for API calls
- At least 100MB disk space
Download the latest Linux binary from the Releases page:
# Download for x86_64 (most common)
curl -L -o routatic-proxy https://github.com/routatic/proxy/releases/latest/download/routatic-proxy_linux-amd64
# Download for ARM64 (aarch64)
curl -L -o routatic-proxy https://github.com/routatic/proxy/releases/latest/download/routatic-proxy_linux-arm64
# Make executable and move to PATH
chmod +x routatic-proxy
sudo mv routatic-proxy /usr/local/bin/
# Verify installation
routatic-proxy --versionBuilding from source requires Go 1.25.0 or later.
# Install Go using dnf
sudo dnf install golang
# Verify Go installation
go versionIf the dnf version is older than 1.25.0, install Go manually:
# Download Go 1.25 (or latest)
wget https://go.dev/dl/go1.25.0.linux-amd64.tar.gz
# Extract to /usr/local
sudo tar -C /usr/local -xzf go1.25.0.linux-amd64.tar.gz
# Add to PATH (add to ~/.bashrc for persistence)
export PATH=$PATH:/usr/local/go/bin
# Verify
go version# Clone the repository
git clone https://github.com/routatic/proxy.git
cd proxy
# Build the binary
make build
# The binary is now at bin/routatic-proxy
# Optionally install system-wide
sudo make install
# Verify
routatic-proxy --versionInstall Docker on Fedora 44:
# Install Docker
sudo dnf install docker docker-compose
# Enable and start Docker
sudo systemctl enable --now docker
# Add your user to docker group (optional, for non-root access)
sudo usermod -aG docker $USER
# Log out and back in for group changes to take effectRun routatic-proxy with Docker:
# Clone the repository
git clone https://github.com/routatic/proxy.git
cd proxy
# Create environment file with your API key
cp .env.example .env
# Edit .env and add your API key
# Build and run
make docker-up
# Or manually:
docker build -t routatic-proxy .
docker run -d --restart unless-stopped --name routatic-proxy \
--env-file .env -p 3456:3456 routatic-proxy# Create default config file
routatic-proxy initThis creates ~/.config/routatic-proxy/config.json with default settings.
You have three options for setting your API key:
# Add to ~/.bashrc for persistence
echo 'export ROUTATIC_PROXY_API_KEY=sk-opencode-your-key-here' >> ~/.bashrc
source ~/.bashrc# Edit the config file
nano ~/.config/routatic-proxy/config.jsonFind the api_key field and replace it:
{
"api_key": "sk-opencode-your-key-here",
...
}For advanced setups with multiple providers:
# OpenCode Go key
export ROUTATIC_PROXY_OPENCODE_GO_API_KEY=sk-opencode-go-key
# OpenCode Zen key
export ROUTATIC_PROXY_OPENCODE_ZEN_API_KEY=sk-opencode-zen-key
# AWS Bedrock key
export ROUTATIC_PROXY_AWS_BEDROCK_API_KEY=your-bedrock-keyroutatic-proxy validateroutatic-proxy modelsroutatic-proxy serveThe proxy runs on http://127.0.0.1:3456 by default. Press Ctrl+C to stop.
# Start in background
routatic-proxy serve -b
# Check status
routatic-proxy status
# Stop the proxy
routatic-proxy stoproutatic-proxy serve --port 8080If you haven't installed Claude Code yet:
# Install via npm (requires Node.js)
npm install -g @anthropic-ai/claude-code
# Or download directly
curl -L https://claude.ai/code/install.sh | bashSet the environment variables to route Claude Code through routatic-proxy:
# Add to ~/.bashrc for persistence
echo 'export ANTHROPIC_BASE_URL=http://127.0.0.1:3456' >> ~/.bashrc
echo 'export ANTHROPIC_AUTH_TOKEN=unused' >> ~/.bashrc
source ~/.bashrcclaudeClaude Code will now route all requests through routatic-proxy to your configured upstream providers.
For production use, run routatic-proxy as a systemd service.
sudo nano /etc/systemd/system/routatic-proxy.servicePaste the following content:
[Unit]
Description=Routatic Proxy Service
After=network.target
[Service]
Type=simple
User=%USER%
Group=%USER%
WorkingDirectory=/home/%USER%
ExecStart=/usr/local/bin/routatic-proxy serve
Restart=on-failure
RestartSec=5
# Environment variables
Environment="ROUTATIC_PROXY_API_KEY=sk-opencode-your-key-here"
# Or load from a file
# EnvironmentFile=/home/%USER%/.config/routatic-proxy/env
# Security settings
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=read-only
PrivateTmp=true
[Install]
WantedBy=multi-user.targetReplace %USER% with your actual username.
# Reload systemd daemon
sudo systemctl daemon-reload
# Enable auto-start on boot
sudo systemctl enable routatic-proxy
# Start the service
sudo systemctl start routatic-proxy
# Check status
sudo systemctl status routatic-proxy
# View logs
journalctl -u routatic-proxy -f# Stop
sudo systemctl stop routatic-proxy
# Restart
sudo systemctl restart routatic-proxy
# View logs
journalctl -u routatic-proxy --since "1 hour ago"For per-user auto-start without systemd:
# Enable autostart
routatic-proxy autostart enable
# Check status
routatic-proxy autostart status
# Disable autostart
routatic-proxy autostart disable# Check what's using port 3456
sudo ss -tlnp | grep 3456
# Kill the process if needed
sudo kill -9 <PID>
# Or use a different port
routatic-proxy serve --port 8080# Ensure the binary is executable
chmod +x /usr/local/bin/routatic-proxy
# Check config directory permissions
ls -la ~/.config/routatic-proxy/# Check if the proxy is running
routatic-proxy status
# Check firewall (Fedora uses firewalld)
sudo firewall-cmd --list-ports
sudo firewall-cmd --add-port=3456/tcp --permanent
sudo firewall-cmd --reload# Verify environment variable
echo $ROUTATIC_PROXY_API_KEY
# Check config file
cat ~/.config/routatic-proxy/config.json | grep api_key
# Validate config
routatic-proxy validateEnable verbose logging for troubleshooting:
# Set log level via environment
export ROUTATIC_PROXY_LOG_LEVEL=debug
routatic-proxy serve
# Or in config file
# ~/.config/routatic-proxy/config.json:
{
"logging": {
"level": "debug",
"requests": true
}
}Fedora uses SELinux by default. If you encounter permission issues:
# Check SELinux status
sestatus
# If enforcing and having issues, check audit logs
sudo ausearch -m avc -ts recent
# For custom binary locations, you may need to set context
sudo chcon -t bin_t /usr/local/bin/routatic-proxy# If running as systemd service
journalctl -u routatic-proxy -f
# If running in background mode
# Logs go to stdout, view with:
routatic-proxy logs# Check for updates
routatic-proxy update --check
# Update to latest version
routatic-proxy update
# Skip confirmation
routatic-proxy update --yes# Download new version
curl -L -o routatic-proxy https://github.com/routatic/proxy/releases/latest/download/routatic-proxy_linux-amd64
chmod +x routatic-proxy
sudo mv routatic-proxy /usr/local/bin/- CONFIGURATION.md - Full configuration reference
- MODELS.md - Model capabilities and routing
- TROUBLESHOOTING.md - General troubleshooting guide
- CONTRIBUTING.md - Development setup
- Discord: Join the community
- GitHub Issues: Report bugs or request features