Skip to main content

Installation Guide

This comprehensive guide covers all installation methods for CLI Proxy API, including binary releases, Docker, and building from source. Choose the method that best fits your environment and requirements.

System Requirements

Before installing, ensure your system meets these requirements:

Minimum Requirements

  • CPU: 1 core (2+ cores recommended for production)
  • RAM: 512 MB (2 GB+ recommended for production)
  • Storage: 100 MB for binary, 500 MB+ for auth tokens and logs
  • Network: Outbound HTTPS access to provider APIs

Supported Platforms

  • Distributions: Ubuntu 20.04+, Debian 11+, CentOS 8+, RHEL 8+, Fedora 35+
  • Architectures: AMD64 (x86_64), ARM64 (aarch64)
  • Kernel: 4.15+ (5.x recommended)
For production deployments, we recommend Linux servers with at least 2 CPU cores and 2 GB RAM to handle concurrent requests efficiently.

Installation Methods

The easiest way to get started. Pre-built binaries are available for all major platforms.

AMD64 (x86_64)

ARM64 (aarch64)

Create systemd Service

For running CLI Proxy API as a system service:
systemd service

Docker Installation

Docker provides the easiest deployment with automatic updates and isolated environments.

Pull Pre-built Image

Run with Docker

Basic Docker Run
Create a docker-compose.yml file:
docker-compose.yml
The Docker image includes all OAuth callback ports. Only expose ports you need for your OAuth providers.

Build Custom Docker Image

To build from source with custom modifications:
Dockerfile

Build from Source

For developers or custom modifications, build from source.

Prerequisites

  • Go: Version 1.26 or later (download)
  • Git: For cloning the repository
  • Make: Optional, for using Makefile commands

Build Steps

Clone and Build

Build for Different Platforms

Cross-compilation

Using GoReleaser

For release builds with all platforms:
The .goreleaser.yml configuration file in the repository defines build targets for Linux, macOS, and Windows on both AMD64 and ARM64 architectures.

Initial Configuration

After installation, configure CLI Proxy API for your environment.

Create Configuration File

Minimal Configuration

config.yaml

Configuration Validation

Test your configuration before starting the service:

OAuth Authentication Setup

Authenticate with at least one provider:
Gemini OAuth

Gemini OAuth

Authenticate with Google Gemini CLI

Claude OAuth

Authenticate with Claude Code

Codex OAuth

Authenticate with OpenAI Codex

Other Providers

Qwen, iFlow, Kimi, and Antigravity

Verification

Verify your installation is working:
Health Check
Expected output:

Upgrading

Keep CLI Proxy API up to date:
Always backup your config.yaml and ~/.cli-proxy-api/ directory before upgrading.

Uninstallation

Troubleshooting

Linux/macOS:
Windows:Ensure C:\Program Files\CLIProxyAPI is in your system PATH.

Next Steps

Quick Start

Get your first API call working in 5 minutes

Server Configuration

Learn about all configuration options

OAuth Setup

Authenticate with your provider accounts

Production Deployment

Deploy to production with best practices