---
title: "Deploy GoModel"
description: "AI gateway with PostgreSQL, Redis caching, and OpenAI/Anthropic APIs."
category: "AI/ML"
url: https://railway.com/deploy/gomodel
---

# Deploy GoModel

AI gateway with PostgreSQL, Redis caching, and OpenAI/Anthropic APIs.

**[Deploy GoModel on Railway](https://railway.com/template/gomodel)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/gomodel/manifest.json

- **Creator:** dardan
- **Category:** AI/ML

## Template content

### GoModel https://raw.githubusercontent.com/ENTERPILOT/GoModel/v0.1.90/docs/logo.svg

- **Image:** enterpilot/gomodel:0.1.90
- **Health check:** /health/ready
- **Public domain:** Yes

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host GoModel with Railway

GoModel is a lightweight, open-source AI gateway with OpenAI-compatible and Anthropic-compatible APIs. Connect applications to multiple model providers through one endpoint, with streaming, model routing, and a built-in dashboard. Manage provider access, create application API keys, and track token usage and estimated costs in one place.

## About Hosting GoModel

**Choose this template if…** you want a separate database, shared response caching, and the option to run multiple GoModel instances. For a simpler single-service setup, choose [GoModel Lite](https://railway.com/deploy/gomodel-lite).

The template includes GoModel's API and dashboard, PostgreSQL for persistent data, and Redis for caching, already connected over Railway's private network. HTTPS and credentials are configured automatically. No provider key is needed to deploy; bring your own provider access to make model requests. This template starts with one instance per service, not a highly available cluster. Configure database backups before production use.

## Common Use Cases

- Connect AI applications to multiple providers through a consistent API.
- Route agents and coding tools through your own gateway.
- Track token usage and estimated costs by application.
- Reuse identical model responses through shared caching.

## Dependencies for GoModel Hosting

- PostgreSQL and Redis with persistent volumes; included and configured.
- Access to a [supported provider](https://gomodel.enterpilot.io/docs/providers/overview) or a reachable self-hosted model endpoint. Model hosting and inference credits are not included; provider charges are separate from Railway hosting.

### Deployment Dependencies

- [GoModel source](https://github.com/ENTERPILOT/GoModel) and [official Docker image](https://hub.docker.com/r/enterpilot/gomodel)
- [Production and scaling guidance](https://gomodel.enterpilot.io/docs/guides/production)
- [Response caching](https://gomodel.enterpilot.io/docs/features/cache) and [Railway backups](https://docs.railway.com/volumes/backups)

### Implementation Details

#### Get started after deployment

1. Find GoModel's public domain under **Settings → Networking** in Railway and open `https://YOUR_DOMAIN/admin/dashboard`.
2. Sign in with `GOMODEL_MASTER_KEY` from GoModel's **Variables** tab in Railway.
3. Open **Providers → Add Provider**, choose your provider type, paste its API key, and click **Save**.
4. Open **Playground**. Once model discovery finishes, select a chat model, type “Say hello”, and click **Send** to make your first request.

Dashboard-added provider keys are stored as plaintext; prefer Railway variables for production. Audit-body logging is disabled, but Redis caches generated responses with a one-hour TTL.

For API integration, routing, and other advanced usage, see the [GoModel documentation](https://gomodel.enterpilot.io/docs).

### Why Deploy GoModel on Railway?

Run your gateway, database, and cache in one project with HTTPS, private networking, logs, and resource metrics. Railway handles hosting so you can focus on connecting your applications.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/gomodel
