Installation Guide¶
This guide covers various methods to install and set up Relyr on different platforms.
System Requirements¶
Minimum Requirements¶
- Operating System: Linux, macOS, or Windows
- Memory: 512MB RAM (2GB recommended)
- Storage: 100MB free space
- Network: Internet connection for initial setup
Recommended Requirements¶
- Memory: 4GB RAM or more
- CPU: 2+ cores
- Storage: 1GB free space
- Network: Stable broadband connection
Installation Methods¶
Package Managers¶
Binary Downloads¶
Download pre-built binaries from the releases page:
# Download using PowerShell
Invoke-WebRequest -Uri "https://github.com/relyr/relyr/releases/latest/download/relyr-windows-amd64.zip" -OutFile "relyr.zip"
# Extract and install
Expand-Archive -Path "relyr.zip" -DestinationPath "C:\Program Files\Relyr"
# Add to PATH (run as Administrator)
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\Relyr", [EnvironmentVariableTarget]::Machine)
Container Installation¶
# Pull the official image
docker pull relyr/relyr:latest
# Run Relyr container
docker run -d \
--name relyr \
-p 8080:8080 \
-v $(pwd)/config:/etc/relyr \
relyr/relyr:latest
# Run with custom configuration
docker run -d \
--name relyr \
-p 8080:8080 \
-e RELYR_LOG_LEVEL=debug \
-v $(pwd)/relyr.yml:/etc/relyr/relyr.yml \
relyr/relyr:latest
Create a docker-compose.yml file:
version: '3.8'
services:
relyr:
image: relyr/relyr:latest
container_name: relyr
ports:
- "8080:8080"
- "8443:8443"
volumes:
- ./config:/etc/relyr
- ./data:/var/lib/relyr
environment:
- RELYR_LOG_LEVEL=info
- RELYR_CONFIG_PATH=/etc/relyr/relyr.yml
restart: unless-stopped
networks:
- relyr-network
networks:
relyr-network:
driver: bridge
Run with:
apiVersion: apps/v1
kind: Deployment
metadata:
name: relyr
namespace: default
spec:
replicas: 3
selector:
matchLabels:
app: relyr
template:
metadata:
labels:
app: relyr
spec:
containers:
- name: relyr
image: relyr/relyr:latest
ports:
- containerPort: 8080
env:
- name: RELYR_LOG_LEVEL
value: "info"
volumeMounts:
- name: config
mountPath: /etc/relyr
volumes:
- name: config
configMap:
name: relyr-config
---
apiVersion: v1
kind: Service
metadata:
name: relyr-service
spec:
selector:
app: relyr
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: LoadBalancer
Post-Installation Setup¶
Initial Configuration¶
-
Create configuration directory:
-
Generate default configuration:
-
Edit configuration file:
Service Setup¶
Create a systemd service file:
sudo tee /etc/systemd/system/relyr.service <<EOF
[Unit]
Description=Relyr Proxy Service
After=network.target
[Service]
Type=simple
User=relyr
Group=relyr
ExecStart=/usr/local/bin/relyr server
Restart=on-failure
RestartSec=5
Environment=RELYR_CONFIG_PATH=/etc/relyr/relyr.yml
[Install]
WantedBy=multi-user.target
EOF
# Enable and start service
sudo systemctl enable relyr
sudo systemctl start relyr
Create a launch daemon:
sudo tee /Library/LaunchDaemons/io.relyr.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>io.relyr</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/relyr</string>
<string>server</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
EOF
# Load and start service
sudo launchctl load /Library/LaunchDaemons/io.relyr.plist
User and Permissions¶
Create a dedicated user for Relyr:
# Create user and group
sudo useradd -r -s /bin/false relyr
sudo mkdir -p /etc/relyr /var/lib/relyr /var/log/relyr
# Set permissions
sudo chown -R relyr:relyr /etc/relyr /var/lib/relyr /var/log/relyr
sudo chmod 755 /etc/relyr /var/lib/relyr /var/log/relyr
Verification¶
Check Installation¶
# Verify binary installation
relyr --version
relyr --help
# Check configuration
relyr config validate
# Test connectivity
relyr health-check
Basic Functionality Test¶
# Start Relyr in foreground mode
relyr server --config /etc/relyr/relyr.yml
# In another terminal, test proxy
curl -x http://localhost:8080 http://httpbin.org/ip
Development Installation¶
For development and testing:
From Source¶
# Clone repository
git clone https://github.com/relyr/relyr.git
cd relyr
# Install dependencies
make deps
# Build from source
make build
# Run tests
make test
# Install locally
make install
Development Environment¶
# Create virtual environment (Python)
python -m venv venv
source venv/bin/activate # Linux/macOS
# or
venv\Scripts\activate # Windows
# Install in development mode
pip install -e .
# Install development dependencies
pip install -r requirements-dev.txt
Troubleshooting Installation¶
Common Issues¶
-
Permission denied errors:
-
Port already in use:
-
Missing dependencies:
Getting Help¶
- Check the Troubleshooting Guide
- Visit our GitHub Issues
- Join our Community Forum
Next Steps¶
After installation, check out:
- Quick Start Guide - Get up and running quickly
- Proxy Setup - Configure HTTP proxies
- API Reference - Explore the API
- Examples - See practical examples