Deploy Redoc

Clean three-panel API reference docs from your OpenAPI definition

Deploy Redoc

Deploy and Host Redoc on Railway

Redoc is an open-source tool from Redocly that turns an OpenAPI definition into a clean, three-panel API reference: navigation on the left, documentation in the middle and request and response samples on the right. It also renders AsyncAPI definitions and GraphQL schemas, and has search and deep links to every operation.

About Hosting Redoc

This template runs the official Redoc image (3.2.0, pinned by digest) as one service built from a public GitHub repo. nginx serves the Redoc page on port 8080, with a /healthz health check. Set SPEC_URL to your API definition: a public URL, or an address on Railway's private network such as http://my-api.railway.internal:8000/openapi.json. The service fetches the definition server-side and serves it from its own domain, so definitions without CORS headers still load. There is no database and no volume, because Redoc keeps nothing on the server. It deploys with Redocly's Museum sample until you set your own URL.

Common Use Cases

  • Publish public reference docs for a REST API from its OpenAPI file
  • Give a team internal API docs for a service that runs on Railway's private network
  • Preview an OpenAPI, AsyncAPI or GraphQL definition as rendered docs before a release

Dependencies for Redoc Hosting

  • An OpenAPI 2.0/3.x, AsyncAPI or GraphQL definition reachable over HTTP(S), publicly or on Railway's private network

Deployment Dependencies

Implementation Details

After deploy, open the service's Variables tab and set SPEC_URL to your definition, then redeploy. Docs re-read the definition on every page load, so they follow your API without a redeploy. Optional variables: PAGE_TITLE (tab title), REDOC_OPTIONS (extra attributes for the redoc tag, for example hide-download-button="true"), PAGE_FAVICON, BASE_PATH (serve under a path such as docs), SPEC_PROXY=false (let the browser fetch SPEC_URL directly) and REDOC_TELEMETRY=true (Redoc's anonymous usage data is off by default here). The proxy only passes GET requests for the definition and the .yaml, .yml or .json files beside or below it, without cookies or Authorization headers. The docs page is public: don't point it at a definition you need to keep private.

Updates: the template builds from aalfath/redoc-railway-template. When a new Redoc release is pinned there, Railway shows an update notice on your project; read the repo's CHANGELOG.md before you apply it.

Why Deploy Redoc 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 Redoc 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.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0