---
title: "Deploy a Dart App on Railway, Part 2"
description: "Building Trivyal, a Kahoot-style trivia app, on Serverpod and Flutter and deploying it to Railway."
url: "https://swe.quest/articles/deploy-a-dart-app-on-railway-part-2-287e095280b728a4"
canonical: "https://blog.railway.com/p/deploy-a-dart-app-part-2"
source: "Railway"
published: "2024-12-13"
difficulty: "medium"
kind: "How-to"
reading_minutes: 10
tags: ["identity-auth","realtime","deployment","mobile"]
---

# Deploy a Dart App on Railway, Part 2

A post on [Railway](https://swe.quest/sources/railway.md), published 2024-12-13, 10 min read, How-to. Original: [https://blog.railway.com/p/deploy-a-dart-app-part-2](https://blog.railway.com/p/deploy-a-dart-app-part-2)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Mobile](https://swe.quest/tags/mobile.md) (Web & mobile)

## Prerequisites

- Dart and Flutter basics
- Serverpod project setup
- OAuth basics ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))

## Keywords

Serverpod, Flutter, Dart, Railway, Riverpod, Google Sign-In, Docker

## Related posts

- [Deploy a Dart App on Railway, Part 1](https://swe.quest/articles/deploy-a-dart-app-on-railway-part-1-9c43a3141edcb7ac.md): Railway · 2024-12-13 · Medium · 7 min read · Deployment, Containers, Cloud platforms, PostgreSQL
  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.
- [How to Add MCP Servers to ChatGPT with Docker MCP Toolkit](https://swe.quest/articles/how-to-add-mcp-servers-to-chatgpt-with-docker-mcp-toolkit-8e8db1704dea266e.md): Docker · 2025-12-12 · Medium · 21 min read · AI agents, Containers, LLMs
  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.
- [Railway MCP - Stateful, Serverful, Pay-per-use Infrastructure](https://swe.quest/articles/railway-mcp-stateful-serverful-pay-per-use-infrastructure-781833f07db0953c.md): Railway · 2025-08-20 · Easy · 5 min read · AI agents, Deployment, Cloud platforms, Developer tools
  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.
- [Better Rails for Agents: A New Remote MCP and Railway Agent in the CLI](https://swe.quest/articles/better-rails-for-agents-a-new-remote-mcp-and-railway-agent-in-the-cli-4b9abaf62a02f3cd.md): Railway · 2026-04-17 · Medium · 13 min read · AI agents, API design, Developer tools, TypeScript
  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.
- [Deploy Authorizer on Railway](https://swe.quest/articles/deploy-authorizer-on-railway-6b6e28c962bd461a.md): Railway · 2022-01-28 · Medium · 3 min read · Identity & auth, React, Deployment
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
