VPS Deployment and Quota Management Guide
Was this page helpful?
Loading OmniRoute...
(LTS version is highly recommended).).
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - sudo apt-get install -y nodejs
git clone https://github.com/markprovjp/OmniRoute.git cd OmniRoute npm ci
to :
cp .env.example .env
and set the following critical production configurations:
# Set the port OmniRoute will run on
PORT=20132
# Essential production security flags
REQUIRE_API_KEY=true # Reject unauthenticated upstream proxy requests
AUTH_COOKIE_SECURE=true # Force Secure flag on session cookies (requires HTTPS)
# Generate strong, unique secret keys
JWT_SECRET=your-random-strong-jwt-secret
API_KEY_SECRET=your-random-strong-db-encryption-secret
INITIAL_PASSWORD=ChooseYourAdminPasswordHere
npm run build
sudo npm install -g pm2 pm2 start npm --name "omniroute" -- run start pm2 save pm2 startup
version: "3.8"
services:
omniroute:
image: node:22-alpine
container_name: omniroute
working_dir: /app
volumes:
- .:/app
- ~/.omniroute:/root/.omniroute
ports:
- "20132:20132"
environment:
- PORT=20132
- NODE_ENV=production
- REQUIRE_API_KEY=true
- JWT_SECRET=your-random-jwt-secret
- API_KEY_SECRET=your-random-db-secret
- INITIAL_PASSWORD=ChooseYourAdminPasswordHere
command: sh -c "npm ci && npm run build && npm run start"
restart: always
docker compose up -d
sudo apt update sudo apt install nginx certbot python3-certbot-nginx -y
with the following configuration:
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://127.0.0.1:20132;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
# Required for SSE streaming responsiveness
proxy_set_header X-Accel-Buffering no;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
}
sudo ln -s /etc/nginx/sites-available/omniroute /etc/nginx/sites-enabled/ sudo nginx -t && sudo system ceases reload nginx sudo certbot --nginx -d your-domain.com
) using default accounts.
- Provider Key Pools: To let users use external provider accounts, configure your API keys under Providers and assign them to specific rotating key lists. Copy and paste extra keys in round-robin pools with live error and health status tracking.