---
title: "Frontend"
description: "Ship Next.js, Astro, SvelteKit and SPAs, and run Node.js, Bun and full-stack TypeScript apps."
url: https://railway.com/guides/topics/frontend
guides: 47
last_updated: 2026-11-05T22:09:41.567Z
---

# Frontend

Ship Next.js, Astro, SvelteKit and SPAs, and run Node.js, Bun and full-stack TypeScript apps.

## Get started

1. [Build a TanStack App](https://railway.com/guides/tanstack-start.md): Deploy a TanStack Start 1.0 app to Railway. Covers scaffolding with the Railway option, upgrading older apps, one-click, GitHub, and CLI deploys, environment variables, database migrations, and troubleshooting.
2. [Deploy a SvelteKit App](https://railway.com/guides/sveltekit.md): Learn how to deploy a Sveltekit app to Railway with this step-by-step guide. It covers quick setup, adapter configuration, one-click deploys and other deployment strategies.
3. [Build and Deploy Your Own MCP Server](https://railway.com/guides/mcp-server.md): Build a remote MCP server in TypeScript with Streamable HTTP transport and deploy it on Railway. Expose your app's data as tools that AI assistants like Claude and Cursor can call over the network.

## Build and deploy

- [Build an LLM Gateway in TypeScript](https://railway.com/guides/llm-gateway.md): Build and deploy an LLM gateway on Railway that issues its own API keys, enforces per-key token budgets, and tracks spend across teams. One place to hold provider keys instead of scattering them across services.
- [Host a Documentation Site with Astro Starlight](https://railway.com/guides/host-documentation-site.md): Build a documentation site with Astro Starlight and deploy it to Railway, with full-text search, a structured sidebar, and a custom domain.
- [Deploy a Claude Agent SDK App](https://railway.com/guides/claude-agent-sdk-app.md): Deploy a Claude Agent SDK service on Railway that runs agent tasks over HTTP, streams progress as NDJSON, and stays inside the platform's request limits.
- [Build an AI API on Hosted Inference Providers](https://railway.com/guides/ai-api-hosted-inference.md): Build and deploy an AI API on Railway that calls hosted inference providers for model output. Covers provider selection, OpenAI-compatible endpoints, streaming, timeouts, and provider fallback.
- [Self-host Supabase with Postgres, Auth, and Storage](https://railway.com/guides/supabase.md): Deploy the Supabase stack on Railway with Postgres, GoTrue auth, PostgREST API, storage, and the Studio dashboard. Covers multi-service setup and JWT configuration.
- [Self-host Strapi with Postgres and File Uploads](https://railway.com/guides/strapi.md): Deploy Strapi on Railway with a Postgres database and persistent file storage. Covers one-click template deployment, environment configuration, and upload provider setup.
- [Configure Client-Side Routing for Single-Page Applications](https://railway.com/guides/spa-routing-configuration.md): Set up Caddy or Nginx to handle client-side routing for single-page applications on Railway. Avoid blank pages on refresh and configure fallback routes.
- [Deploy a WebSocket Application with Socket.IO](https://railway.com/guides/socketio.md): Deploy a Socket.IO server and client on Railway. Covers CORS configuration, reconnection handling, and scaling with a Redis adapter.
- [Self-host Payload CMS with Postgres](https://railway.com/guides/payload-cms.md): Deploy Payload CMS 3.x on Railway inside a Next.js application. Covers database setup, media storage with buckets, and production configuration.
- [Deploy a Gatsby App](https://railway.com/guides/gatsby.md): Deploy a Gatsby static site to Railway with Caddy. Covers one-click template deployment, CLI deploys, GitHub deploys, and Dockerfile setup.
- [Deploy a Full-Stack Next.js App with Postgres, Background Jobs, and File Uploads](https://railway.com/guides/fullstack-nextjs.md): Deploy a production Next.js application on Railway with a Postgres database, Redis-backed background workers, and file uploads via storage buckets. Covers multi-service architecture and production hardening.
- [Add Authentication to a Frontend Application](https://railway.com/guides/frontend-authentication.md): Implement authentication in a frontend application deployed on Railway. Covers third-party providers (Clerk, Supabase Auth), session-based auth with Postgres, and common deployment pitfalls.
- [Deploy an AI-Powered SaaS App on Railway](https://railway.com/guides/deploy-ai-saas.md): Deploy a production AI-powered SaaS application on Railway with an Express backend, Postgres database, and external LLM API integration. Covers API key management, request caching, rate limiting, and async processing for longer tasks.
- [Deploy an AI Chatbot with Streaming Responses](https://railway.com/guides/ai-chatbot-streaming.md): Deploy a chatbot on Railway that streams LLM responses token by token using Server-Sent Events. Covers Next.js with the AI SDK, API key management, and optional conversation persistence with Postgres.
- [Deploy a Next.js App with Postgres](https://railway.com/guides/nextjs.md): Deploy a Next.js app with a Postgres database on Railway. Covers standalone output, one-click deploys, Dockerfile setup, database wiring, and pre-deploy migrations.
- [Deploy a Hono App](https://railway.com/guides/hono.md): Learn how to deploy a Hono app to Railway with this step-by-step guide. It covers quick setup, community templates, Dockerfile and other deployment strategies.
- [Deploy a Bun App](https://railway.com/guides/bun.md): Learn how to deploy a Bun app to Railway with this step-by-step guide. It covers one-click deploys, Dockerfile setup, and other deployment strategies.
- [Deploy Caddy](https://railway.com/guides/caddy.md): Learn how to deploy Caddy on Railway with one-click templates or CLI. This guide covers how to choose plugins, and configure static sites and reverse proxies.
- [Deploy a Vue App](https://railway.com/guides/vue.md): Learn how to deploy a Vue app to Railway with this step-by-step guide. It covers quick setup, caddy server setup, one-click deploys, Dockerfile and other deployment strategies.
- [Deploy Static Sites with Zero Configuration and Custom Domains](https://railway.com/guides/static-hosting.md): Learn how to deploy static websites to Railway with automatic GitHub builds, SSL certificates, custom domains, and integrate with a CDN. Perfect for marketing sites, blogs, and documentation.
- [Deploy a SolidJS App](https://railway.com/guides/solid.md): Learn how to deploy a SolidJS app to Railway with this step-by-step guide. It covers quick setup, one-click deploys and other deployment strategies.
- [Deploy a Sails App](https://railway.com/guides/sails.md): Learn how to deploy a Sails app to Railway with this step-by-step guide. It covers quick setup, database integration, the Boring JavaScript stack, one-click deploys and other deployment strategies.
- [Deploy a Remix App](https://railway.com/guides/remix.md): Learn how to deploy a Remix app to Railway with this step-by-step guide. It covers quick setup, one-click deploys, Dockerfile and other deployment strategies.
- [Deploy a React App](https://railway.com/guides/react.md): Learn how to deploy a React app to Railway with this step-by-step guide. It covers quick setup, caddy server setup, one-click deploys and other deployment strategies.
- [Deploy a Nuxt App](https://railway.com/guides/nuxt.md): Learn how to deploy a Nuxt app to Railway with this step-by-step guide. It covers quick setup, one-click deploys, Dockerfile and other deployment strategies.
- [Deploy a NestJS App](https://railway.com/guides/nest.md): Learn how to deploy a NestJS app to Railway with this step-by-step guide. It covers quick setup, database integration, one-click deploys and other deployment strategies.
- [Deploy a Lovable App on Railway](https://railway.com/guides/lovable.md): Learn how to deploy applications generated by Lovable.dev to Railway. This guide covers the workflow from prompt-based generation to continuous deployment.
- [Deploy a Fastify App](https://railway.com/guides/fastify.md): Learn how to deploy a Fastify app to Railway with this step-by-step guide. It covers quick setup, one-click deploys, Dockerfile and other deployment strategies.
- [Deploy an Express App](https://railway.com/guides/express.md): Learn how to deploy an Express app to Railway with one-click templates, GitHub, CLI, or Dockerfile. This guide covers setup, private networking, database integration, and deployment strategies.
- [Deploy an Astro App](https://railway.com/guides/astro.md): Learn how to deploy an Astro app to Railway with this step-by-step guide. It covers quick setup, server side rendering, one-click deploys, Dockerfile and other deployment strategies.
- [Deploy an Angular App](https://railway.com/guides/angular.md): Learn how to deploy an Angular app to Railway with this step-by-step guide. It covers quick setup, caddy server setup, one-click deploys, Dockerfile and other deployment strategies.
- [Add a CDN using Amazon CloudFront](https://railway.com/guides/add-a-cdn-using-cloudfront.md): Learn how to integrate Amazon CloudFront as a CDN for your Fastify app in this step-by-step guide.
- [Deploy Full-Stack TypeScript Apps: Architectures, Execution Models, and Deployment Choices](https://railway.com/guides/deploy-full-stack-typescript-apps-architectures-execution-models-and-deployment-choices.md): This guide compares full-stack frameworks vs independently deployed services, breaks down Cloudflare Workers and Vercel as serverless deployment targets, and explains where long-running servers excel. It also shows how Railway provides persistent compute without traditional ops overhead and why many teams pair Railway with Cloudflare to get global performance with stateful backends. Ideal for engineers choosing the right architecture and platform for real-world workloads.
- [Building a NestJS App on Railway](https://railway.com/guides/building-nestjs-on-railway.md): Learn how to build and scale a NestJS application on Railway
- [Use Notion as a CMS for your NextJS blog](https://railway.com/guides/next-notion-blog.md): In our first detailed guide, we want to help you build a blog just like ours using https://www.notion.so/ as the CMS.

## Run in production

- [Deploy Node.js & Express API with Autoscaling, Secrets, and Zero Downtime](https://railway.com/guides/deploy-node-express-api-with-auto-scaling-secrets-and-zero-downtime.md): Learn how to deploy Node.js and Express applications with automatic scaling, environment secrets, zero-downtime updates, and preview environments, all without managing servers or learning Kubernetes/container orchestration.

## Compare and decide

- [Choose Between SSR, SSG, and ISR for Your Frontend](https://railway.com/guides/ssr-ssg-isr.md): When to use server-side rendering, static site generation, or incremental static regeneration. Covers Railway deployment implications, cost tradeoffs, and framework support.
- [Node.js Hosting Options Compared](https://railway.com/guides/nodejs-hosting-options-compared.md): A guide to the most popular hosting options for Node.js applications.
- [Choose Between SSE and WebSockets](https://railway.com/guides/sse-vs-websockets.md): When to use Server-Sent Events vs WebSockets for real-time data. Covers protocol differences, reconnection handling, and how to deploy both on Railway.

## More guides

- [Manage Environment Variables in Frontend Builds](https://railway.com/guides/frontend-environment-variables.md): Understand build-time vs runtime environment variables in frontend frameworks. Covers Vite, Next.js, Nuxt, SvelteKit, Astro, and Angular prefix conventions and how Railway handles each.
- [Stream AI Responses to a Frontend with Server-Sent Events](https://railway.com/guides/streaming-ai-responses.md): Stream LLM tokens from an API service to a frontend using Server-Sent Events on Railway. Covers Express and Hono server implementations, client-side consumption, and reconnection handling.
- [Speed Up a Global App with Cache-Control Headers and a CDN](https://railway.com/guides/cache-headers-cdn.md): Set Cache-Control headers correctly for static assets, HTML, and API responses, then put a CDN in front of your Railway service to serve users from the nearest edge.
- [GitHub Actions PR Environment](https://railway.com/guides/github-actions-pr-environment.md): Learn how to use the CLI in a GitHub Action to create environments for PRs
- [Supercharging Directus on Railway with a Static Frontend](https://railway.com/guides/supercharging-directus-on-railway.md): Learn how to use Directus to power your static frontend on Railway!

## Related topics

- [Storage](https://railway.com/guides/topics/storage.md): Run Postgres, Redis, MySQL and object storage on Railway: pooling, backups, migrations and vector search.
- [AI Agents](https://railway.com/guides/topics/ai.md): Host agents, MCP servers, RAG pipelines, model gateways and inference services.
- [Networking](https://railway.com/guides/topics/networking.md): Domains, private networking, proxies, CDNs, WebSockets and multi-region traffic.
- [Comparisons and Migrations](https://railway.com/guides/topics/comparisons.md): How Railway compares with other platforms, what it costs, and how to move over from Heroku, AWS and others.
- [Containers and Hosting](https://railway.com/guides/topics/containers.md): Deploy from Docker and Compose, self-host open-source tools, and scale across replicas and regions.
- [Security](https://railway.com/guides/topics/security.md): Manage secrets, add authentication, lock down projects and meet compliance requirements.
