Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Railway 10 min read How-to mediumAdept

Deploy a Dart App on Railway, Part 2

Building Trivyal, a Kahoot-style trivia app, on Serverpod and Flutter and deploying it to Railway. The steps cover Google sign-in via serverpod_auth with GCP OAuth origins and redirect URIs, Riverpod providers for the Serverpod client and session manager, and keeping secrets out of git. Secrets are stored as base64 Railway environment variables and decoded into files during the Docker build. Later sections define Serverpod YAML models with relations for games, questions and live games, add CRUD and streaming live-game endpoints, and wire up Flutter screens for editing and hosting games in real time.

Assumes: Dart and Flutter basicsServerpod project setupOAuth basics

Related posts

  • Deploy a Dart App on Railway, Part 1

    Railway mediumAdept

    A Flutter + Serverpod trivia app is deployed to Railway with a Railway-hosted PostgreSQL database, using the Railway CLI and a custom multi-stage Dockerfile that compiles the Dart server and bundles a Flutter web build into Serverpod's static webserver. Database credentials are wired in through Railway variable references, and migrations are applied in production mode. Because Railway exposes only one port per domain, a Caddy reverse proxy template routes traffic between Serverpod's API port (8080) and web port (8082). A curl request to the example hello endpoint confirms the deployment works.

  • How to Add MCP Servers to ChatGPT with Docker MCP Toolkit

    Docker mediumAdept

    Docker MCP Toolkit lets ChatGPT's Developer Mode call real tools by running MCP servers in isolated containers behind a Docker MCP Gateway exposed to ChatGPT via an ngrok tunnel. The guide walks through initializing a gateway from the chatgpt-app-basic template, running it with Docker Compose on port 8811 with streaming transport, and registering it as a custom connector. It then configures seven servers (Firecrawl, SQLite, Stripe, GitHub, Node.js Sandbox, Sequential Thinking, Context7) to build a competitive repricing agent that scrapes competitor prices, updates Stripe prices, logs decisions to SQLite and pushes audit reports to GitHub.

  • Railway MCP - Stateful, Serverful, Pay-per-use Infrastructure

    Railway easyNovice

    Railway's MCP server lets coding agents deploy services and templates, create isolated environments, manage variables and pull logs, pitched alongside Railway's usage-based pricing and vertical autoscaling as a good fit for agent-driven infrastructure. The design deliberately omits destructive tools like delete actions. It runs as a local stdio server rather than a remote Streamable HTTP one, because Railway lacks OAuth and its users work in local editors. The server wraps the Railway CLI under the hood, which reuses the CLI's login flow and lets agents fall back to CLI commands when they hit edge cases.

  • Better Rails for Agents: A New Remote MCP and Railway Agent in the CLI

    Railway mediumAdept

    Railway shipped a remote MCP server at mcp.railway.com, which connects to MCP clients over OAuth with no local install, and a new `railway agent` CLI command for interactive, scripted or CI use with JSON output. The MCP surface is kept deliberately small at 7 tools, because every tool definition costs client context and multi-step operations cost a round-trip each. Questions such as "why is my deploy crashing" go to a `railway-agent` tool that runs the multi-step investigation server-side and returns one answer. Instead of a separate service, the MCP server is a stateless Koa route inside the main backend. It reuses the existing OIDC provider and permission controllers, passes per-request context through AsyncLocalStorage, and wraps tools in a factory that handles auth and errors.

  • Deploy Authorizer on Railway

    Railway mediumAdept

    Authorizer, an open-source self-hosted alternative to Auth0, can be deployed on Railway with a one-click template that provisions PostgreSQL and Redis automatically and wires up DATABASE_URL and REDIS_URL. Deployment needs only ADMIN_SECRET and JWT_SECRET, plus OAuth client credentials if social logins are wanted. A React integration follows: install @authorizerdev/authorizer-react, wrap the app in AuthorizerProvider pointed at the Railway endpoint, and use the Authorizer component and useAuthorizer hook for login flows and user state.

The quest for software engineering knowledge.

Look:
Layout: