railway-deploy

Deploy .NET 8 ASP.NET Core apps to Railway with PostgreSQL and migrations.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ecnepsyroc-bot/Dejavara --skill railway-deploy-ecnepsyroc-bot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: railway-deploy
Source: https://github.com/ecnepsyroc-bot/Dejavara/tree/main/deploy/skills/railway-deploy
Command: npx skills add https://github.com/ecnepsyroc-bot/Dejavara --skill railway-deploy-ecnepsyroc-bot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines deploying .NET 8 ASP.NET Core applications to Railway and connecting them to a PostgreSQL service while avoiding common build, runtime, and migration failures.

Core Features & Use Cases

  • Railway project setup: guidance to initialize a Railway project, connect a GitHub repository, and deploy via Railway's build pipeline.
  • PostgreSQL provisioning & connection: instructions for provisioning Railway PostgreSQL and using internal and external connection strings in runtime and development scenarios.
  • Migration strategies: recommended approaches to generate SQL migration scripts, run migrations remotely, or use a migration runner to work around Railway's short command timeouts.
  • Troubleshooting: targeted fixes for duplicate publish outputs, Nixpacks detection failures, port configuration mismatches, 502 gateway errors, and missing table/column issues.

Quick Start

Initialize a Railway project, add a PostgreSQL service, set ASPNETCORE_URLS to http://0.0.0.0:8080 and ConnectionStrings__DefaultConnection to your Railway connection string, then push the connected branch to deploy.

Frequently Asked Questions about railway-deploy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a .NET 8 API to Railway with PostgreSQL?

To deploy a .NET 8 API to Railway, link a GitHub repository to a Railway project, provision a PostgreSQL service, set ASPNETCORE_URLS to the Railway port, and apply EF Core migrations or generated SQL scripts for database connectivity.

What environment variables are needed to connect Railway PostgreSQL to an ASP.NET Core app?

Connecting Railway PostgreSQL to an ASP.NET Core app requires setting ASPNETCORE_URLS to http://0.0.0.0:8080 and configuring ConnectionStrings__DefaultConnection with your Railway PostgreSQL internal or external connection string.

How do I run EF Core migrations on Railway without hitting command timeouts?

Running EF Core migrations on Railway without hitting command timeouts involves generating SQL migration scripts, running migrations remotely, or using a migration runner to work around Railway's short execution limits.

Why does my .NET 8 Railway deployment return a 502 gateway error?

A 502 gateway error on a Railway .NET 8 deployment usually indicates a port configuration mismatch, meaning ASPNETCORE_URLS is not correctly set to the Railway proxy port or http://0.0.0.0:8080.

Can I use Nixpacks to build an ASP.NET Core microservice on Railway?

Yes, you can use Nixpacks to build ASP.NET Core microservices on Railway, though you may need targeted troubleshooting for Nixpacks detection failures or duplicate publish outputs during the build pipeline.