Railway

Deploy Clove

A Claude.ai reverse proxy

Deploy Clove

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

DependencyPurposeRequired
Railway VolumePersistent storage for configuration (/app/data)Yes
Claude Account Credentials / Session CookieAuthentication with Claude backend servicesYes

Deployment Dependencies

ResourceLink
Docker Hub Imagemirrorange/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
SettingValue
Proxy TypeHTTP Proxy
Target Port5201

To make the service publicly accessible, generate a domain under the Railway project settings for the Clove service.

Environment Variables
VariableRequiredDescription
PORTYesThe internal network port the service listens on (Default: 5201).
ADMIN_API_KEYSOptionalCustom admin access key for the Clove management panel. Auto-generated if not specified.
BASE_URLOptionalThe external domain or base URL assigned to your Railway deployment.
DEFAULT_MODELOptionalDefault model used for processing requests (Default: claude-sonnet-4-20250514).
LOCALEOptionalUI language setting for the management panel (Default: zh).
LOG_LEVELOptionalLogging verbosity (Default: INFO).
REQUEST_TIMEOUTOptionalHTTP request timeout in seconds (Default: 300).
STREAM_TIMEOUTOptionalStreaming response timeout in seconds (Default: 300).
COOKIESOptionalClaude.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.

  1. Open the Clove Service in your Railway dashboard.
  2. Go to SettingsVolumes.
  3. Click Add Volume.
  4. 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
  1. In Railway, go to Service SettingsNetworking and click Generate Domain.
  2. Open your web browser and navigate to the generated public URL.
  3. Access the admin dashboard using the ADMIN_API_KEYS set in your environment variables (or check deployment logs if left to auto-generate).
  4. 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

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
36
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
52