Deploy Clove
A Claude.ai reverse proxy
Just deployed
Deploy and Host Clove on Railway
Clove is an all-in-one Claude reverse proxy tool designed to provide standard API access to Claude.ai. It features dual-mode operation supporting both OAuth authentication (via Claude Code API) and web proxy mode. It offers high compatibility with Claude API clients, a user-friendly web management interface, automatic authentication switching, and built-in quota tracking.
About Hosting Clove
When deploying Clove on Railway, Railway hosts the containerized Clove application service based on its official Docker image. Railway manages the underlying infrastructure, providing seamless container deployment, continuous operation, and automatic HTTPS endpoint provision through HTTP proxy networking.
Clove requires persistent storage mounted to /app/data to retain configuration files, API key records, and user session information across deployments or system restarts. Networking is simplified as Railway automatically routes external traffic to the container's exposed internal web port. Clove functions as a lightweight service, allowing easy scaling of memory and CPU resources directly from the Railway dashboard as request volumes grow.
Common Use Cases
- API Proxy for Claude Services: Standardizing Claude.ai web access or OAuth logins into OpenAI/Claude-compatible API endpoints for local LLM tools and integrations.
- API Key & Quota Management: Managing multi-account Claude credentials, tracking usage, and issuing individual application API keys for team members or personal projects.
- Unified Claude Access: Consolidating multiple Claude access methods into a single, reliable web service with automated switching.
Dependencies for Clove Hosting
| Dependency | Purpose | Required |
|---|---|---|
| Railway Volume | Persistent storage for configuration (/app/data) | Yes |
| Claude Account Credentials / Session Cookie | Authentication with Claude backend services | Yes |
Deployment Dependencies
| Resource | Link |
|---|---|
| Docker Hub Image | mirrorange/clove |
Implementation Details
Docker
Clove is deployed using its official prebuilt Docker image:
mirrorange/clove:latest
Railway pulls and deploys this image directly without requiring custom build scripts.
Public Networking
| Setting | Value |
|---|---|
| Proxy Type | HTTP Proxy |
| Target Port | 5201 |
To make the service publicly accessible, generate a domain under the Railway project settings for the Clove service.
Environment Variables
| Variable | Required | Description |
|---|---|---|
PORT | Yes | The internal network port the service listens on (Default: 5201). |
ADMIN_API_KEYS | Optional | Custom admin access key for the Clove management panel. Auto-generated if not specified. |
BASE_URL | Optional | The external domain or base URL assigned to your Railway deployment. |
DEFAULT_MODEL | Optional | Default model used for processing requests (Default: claude-sonnet-4-20250514). |
LOCALE | Optional | UI language setting for the management panel (Default: zh). |
LOG_LEVEL | Optional | Logging verbosity (Default: INFO). |
REQUEST_TIMEOUT | Optional | HTTP request timeout in seconds (Default: 300). |
STREAM_TIMEOUT | Optional | Streaming response timeout in seconds (Default: 300). |
COOKIES | Optional | Claude.ai session cookies for web proxy mode. |
Example Raw Editor format for Railway Variables:
PORT=5201
ADMIN_API_KEYS=your-secure-admin-key
BASE_URL=https://your-railway-domain.up.railway.app
DEFAULT_MODEL=claude-sonnet-4-20250514
LOCALE=zh
LOG_LEVEL=INFO
REQUEST_TIMEOUT=300
STREAM_TIMEOUT=300
Persistent Storage
Clove requires persistent volume storage to prevent losing user sessions, accounts, and generated API keys when the deployment updates or restarts.
- Open the Clove Service in your Railway dashboard.
- Go to Settings → Volumes.
- Click Add Volume.
- Set the Mount Path to:
/app/data
Database
No external database service (such as PostgreSQL or Redis) is required. Data persistence is handled internally via local file storage under the /app/data volume mount.
Build & Start
No custom build or start commands are required. The image handles runtime startup automatically on port 5201.
Accessing the Application
- In Railway, go to Service Settings → Networking and click Generate Domain.
- Open your web browser and navigate to the generated public URL.
- Access the admin dashboard using the
ADMIN_API_KEYSset in your environment variables (or check deployment logs if left to auto-generate). - Add your Claude credentials in the management interface and generate client API keys for your applications.
Why Deploy Clove on Railway?
Railway provides a seamless platform for deploying and scaling web applications. With automated deployments from GitHub, instant persistent storage attachment, easy environment variable management, and default HTTPS routing, hosting your applications on Railway ensures reliable performance and operational simplicity.
Template Content
ADMIN_API_KEYS
Your passward to login
