---
title: "Deploy openhedge"
description: "Discover hedges in event contracts and prediction markets"
category: "Other"
url: https://railway.com/deploy/openhedge-1
---

# Deploy openhedge

Discover hedges in event contracts and prediction markets

**[Deploy openhedge on Railway](https://railway.com/template/openhedge-1)**

- **Creator:** Márk Csizmadia's Projects
- **Category:** Other
- **Total deploys:** 2

## Template content

### caddy https://devicons.railway.app/railway

- **Source:** https://github.com/mark-antal-csizmadia/openhedge
- **Health check:** /health
- **Public domain:** Yes

### sync https://devicons.railway.app/railway

- **Source:** https://github.com/mark-antal-csizmadia/openhedge
- **Start command:** `python -m openhedge_core.sync_markets`

### api https://devicons.railway.app/railway

- **Source:** https://github.com/mark-antal-csizmadia/openhedge
- **Start command:** `/bin/sh -c 'export API_HOST=0.0.0.0 API_PORT="$PORT"; exec python -m openhedge_core.server'`
- **Health check:** /health

### mcp https://devicons.railway.app/railway

- **Source:** https://github.com/mark-antal-csizmadia/openhedge
- **Start command:** `/bin/sh -c 'export MCP_HOST=0.0.0.0 MCP_PORT="$PORT"; exec python -m openhedge_core.mcp_server'`
- **Health check:** /health

### Qdrant https://devicons.railway.app/railway

- **Image:** qdrant/qdrant:v1.19.0

## Documentation

# Deploy and Host openhedge with Railway

openhedge is an open source experimental tool for discovering relevant hedges using event contracts and prediction markets. It does not hold money or place trades. Any order happens on the source venue (today, Kalshi).

## About Hosting openhedge

This template deploys five services from GitHub (`api`, `sync`, `mcp`, `caddy`) plus Qdrant as `qdrant/qdrant:v1.19.0` with a volume at `/qdrant/storage`. `api` and `mcp` stay private. `caddy` is the only public HTTP edge and reverse-proxies streamable HTTP MCP. `sync` ingests open Kalshi markets and writes embeddings on an hourly cron. You must provide an OpenRouter API key (`OPENROUTER_API_KEY`) for embeddings and search. Point an MCP client at the Caddy public hostname plus `/mcp`. Search stays empty until the first successful `sync` pass (`open batch created=` in logs). After deploy, trigger **Run now** on `sync` if you do not want to wait until `:00` UTC.

## Why Deploy openhedge on Railway

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying openhedge on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

## Common Use Cases

- Point a coding agent at live Kalshi markets via streamable HTTP MCP
- Search event contracts semantically for a described exposure
- Size a cash-flow hedge and present basis risk, including when nothing fits
- Self-host the catalog, embeddings, and MCP edge without running local Compose

## Dependencies for openhedge Hosting

- Qdrant `qdrant/qdrant:v1.19.0` (private, volume at `/qdrant/storage`, no API key)
- OpenRouter API key for embeddings (`OPENROUTER_API_KEY` on `api` and `sync`)
- Caddy reverse proxy (public) in front of private MCP
- Kalshi public market API (read-only ingest)

### Deployment Dependencies

- [openhedge GitHub repository](https://github.com/mark-antal-csizmadia/openhedge)
- [OpenRouter](https://openrouter.ai/)
- [Kalshi](https://kalshi.com)
- [Qdrant](https://qdrant.tech)


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/openhedge-1
