惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
V
Visual Studio Blog
The Register - Security
The Register - Security
A
About on SuperTechFans
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
S
Security @ Cisco Blogs
Google Online Security Blog
Google Online Security Blog
U
Unit 42
Spread Privacy
Spread Privacy
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Securelist
T
Tenable Blog
Help Net Security
Help Net Security
Recorded Future
Recorded Future
S
Secure Thoughts
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The GitHub Blog
The GitHub Blog
G
GRAHAM CLULEY
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
MyScale Blog
MyScale Blog
The Hacker News
The Hacker News
H
Heimdal Security Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 三生石上(FineUI控件)
Project Zero
Project Zero
T
Threat Research - Cisco Blogs
J
Java Code Geeks
T
Threatpost
Cyberwarzone
Cyberwarzone
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
S
Security Affairs
Security Latest
Security Latest
Martin Fowler
Martin Fowler
C
Cyber Attacks, Cyber Crime and Cyber Security
T
The Exploit Database - CXSecurity.com
Cisco Talos Blog
Cisco Talos Blog
L
LINUX DO - 热门话题
宝玉的分享
宝玉的分享
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky
C
CERT Recently Published Vulnerability Notes

Railway Blog

Where Railway is, and where it's going (Summer 2026) PaaS vs IaaS vs SaaS: What Each Means and Who Should Pick What in 2026 The Best Continuous Deployment Tools in 2026 The Best PaaS for Multi-Region Deployments in 2026 The Best Platforms for Monorepo Deployments in 2026 Compliance Isn't a Feature, It's a Posture What is BYOC (Bring Your Own Cloud)? A Developer's Guide for 2026 The Best Managed Kubernetes Hosting in 2026 The Best Container Registries in 2026 The Vanilla Cloud Tax: What Rolling Your Own on AWS Actually Costs What is a PaaS? A Developer's Guide for 2026 The Best Cloud Observability and Logging Tools in 2026 The Best PostgreSQL Hosting for Developers in 2026 The Best Multi-Region Hosting Platforms in 2026 The Best Platforms to Deploy AI Apps in 2026 (Not the Models, the Apps Around Them) The Agent-Native Cloud: What It Means and Why It Matters Incident Report: May 19, 2026- GCP Account Suspension Counting to 3 with a new builder processing 50M+ monthly builds Railway iOS preview now available via TestFlight Kill your onboarding: selling to 10,000+ new users a day Your AI wants to nuke your database. Guardrails fix that. Better Rails for Agents: A New Remote MCP and Railway Agent in the CLI Moving Railway's Frontend Off Next.js One command deploys, there's a Stripe APP for that From registrar to deployed: buying a domain inside Railway A letter to open source builders who deserve more Networking is a black box, we used eBPF to open it Heroku Walked So Railway Can Run Security Features Your Security Team Will Love Railway Runs Open Source, Now We're Funding It Railway raises $100M Series B to unburden the builders Deploy autoscaling services, AI Workflow automation, and LLM APIs Without Kubernetes Hosting Postgres with GeoLite2: a practical guide to IP geolocation, data loading, and updates Serverless functions vs containers: CI/CD, database connections, cron jobs, and long-running tasks Hosting Postgres with pgvector: provider tradeoffs, migrations, indexes, and tuning Introducing the Railway integration on Delve.co Secure Cloud Hosting for Compliance: A Practical Guide for Startups and Regulated Industries How G2X Unlocked Rapid Experimentation at Scale with Railway MindFort Runs 100+ AI Pen Testing Agents Without Their Previous $10k AWS Bill How Bilt's Marketing Engineering Team Delivers at Scale with Railway Railway Technology Partners: Earn Revenue on Templates You Didn't Build ~$1 Million Paid to Developers Who Built Railway Templates CI/CD for Modern Deployment: From Manual Deploys to PR Environments Kernel Powers 1,000+ AI Agents on $444/Month of Railway Infrastructure Deploy Full-Stack TypeScript Apps: Architectures, Execution Models, and Deployment Choices Railway vs Cloudflare: How Their Architectures Differ and When to Use Each Run Scheduled and Recurring Tasks with Cron Monitoring & Observability: Using Logs, Metrics, Traces, and Alerts to Understand System Failures Logs, Metrics, and Traces: What Does Each Signal Tell You? Server rendering benchmarks: Railway vs Cloudflare vs Vercel Top five Heroku alternatives Comparing top PaaS and deployment providers Pricing to Encourage Use The F in SOC2 stands for functional Deploy Together, Earn Together: Introducing Railway Partnerships How We Oops-Proofed Infrastructure Deletion on Railway Bring Back the Free Plan Railway MCP - Stateful, Serverful, Pay-per-use Infrastructure Hackathon: Winners Announced! Mark Your Calendar: Railway User Hackathon with Prizes Launching Railway's Affiliate Program Zero-Touch Bare Metal at Scale Ssh, We’re Announcing One More Thing! $1M for Open Source Introducing Central Station Speed Isn’t Just About Code, It’s About Where That Code Runs One-Second Deploys? We Didn’t Believe It Either Why We’re Moving on From Nix Railway V3: Faster and Cheaper How to Migrate from Cloudflare Pages to Railway Supercharging Directus on Railway with a Static Frontend How to Migrate from AWS Lambda to Railway Deploy Triton Inference Server on Railway How to Handle Database Connection Pooling Building a NestJS App on Railway Manually Optimize Deployments on Railway Implement a GitHub Actions Testing Suite Scaling a SaaS application on Railway Building a SaaS application on Railway Deploy a Dart App on Railway, Part 2 Deploy a Dart App on Railway, Part 1 Implementing Feature Flags from Scratch Cron Jobs with Django and GitHub Actions Deploy Offen on Railway Queues on Railway Working with NX, Railway and CI/CD Automated PostgreSQL Backups Using GitLab CI/CD with Railway Cron Jobs on Railway Deploy Beam on Railway Deploy Authorizer on Railway Deploying Monorepo Applications How to Backup and Restore Your Postgres Database How to Backup Your Redis Instance Deploy Cusdis on Railway Deploy Ghost on Railway Using Github Actions with Railway Deploy Calendso (cal.com) on Railway Self-hosted website analytics Use Notion as a CMS for your NextJS blog
Migrating From Heroku To Railway
Angelo Saraceno · 2022-08-19 · via Railway Blog

Moving your app can be stressful for those looking to move off of Heroku. Railway makes it easy. This guide will walk through what we offer and show, not only tell, how to migrate your app from Heroku. We promise it'll be quick.


What's Railway

Railway is a simple and powerful deployment platform. Software is hard enough; thinking about deployments is a rabbit hole we don't want you to worry about. Give us a GitHub repo, and we build and host it. Contrary to our name, we aren't a Rails-only hosting service. We support over 20+ languages and runtimes.

Other products seek to replace the magic that Heroku offered developers; we think Railway best philosophically fits the mold of having you focus on your code, not infrastructure.

Just like Heroku, we offer…

  • GitHub Repo Deployments
  • A CLI that lets you do everything our Web App does
  • Built-in databases
  • PR deploys, secrets management

Users tell us that we really shine in the following...

  • Speedy quick builds. Users report that building and deploying on Railway is significantly faster.
  • Built-in multiple language support (languages like Crystal, Elixir, .NET, and much more)
  • Resource-based pricing, only pay for what you use.
  • Interfaces, using words like "absolutely gorgeous."
  • Community standing at the ready to help them scale
  • And much more...

If you want to know more about the features that Railway has, you can see our docs here.

What's covered in this guide?

We'll walk through an app from Heroku over to Railway. This guide applies to any language your workload may use. However, we will use a Rails 7 app with Postgres as an example.

You can follow along with the same steps for your own workload!

Pre-requisites

  • A Heroku app previously successfully deployed
  • Your code repo hosted on Github
  • A Railway account eligible for the free-tier (Signing up is free and easy!)
  • (Optional)The Railway CLI installed on your machine

Steps

This guide will walk you through the following on the platform.

  1. Your First Deploy on Railway
  2. Importing Environment Variables
  3. Thinking in Services (adding Databases on Railway)

1. Your First Deploy

Navigate to https://dev.new

You should see an open Command Palette ready for your input. Select: "Deploy From GitHub Repo"

If you haven't, log in with GitHub.

Then select: "Configure GitHub App." This will allow Railway to deploy your code from your account.

CleanShot 2022-08-26 at 19.32.47.gif

Then select the repo you wish to deploy. We will go ahead and deploy our Rails repo.

You will then see the Project Canvas, a blank slate to espouse your applications into existence. Finally, you should see one or multiple services building and deploying.

Clicking on the service opens a panel to see your build logs. This is where we will later add domains and variables. But, first, let's put a pin on this and explain what just happened.

Railway detects if there is a Procfile at the root of your repo. Then we map each Heroku process within the Procfile into a service. We even carry over the name of the process from the Procfile.

It’s likely you have some DBs that your app is talking to, let’s import your Config Vars from Heroku to have your app talk to them.

2. Importing Environment Variables

On Railway, with the exception of Database Environment Variables, secrets are scoped to the service within Railway. We offer a variable import from Heroku.

CleanShot 2022-08-26 at 19.05.50.gif

Within your service’s variables pane, Command + K and type Import Variables From Heroku. After you complete the prompt, you can run the import on any and all services that need variables from your old project.

Alternatively: if you are using a .env file within your repo, we offer an easy GUI to help facilitate the import called the RAW Editor.

Click into your Rails service on Railway select the Variables table and then click the RAW editor. Adding variables to a service triggers a redeploy to make your application aware of the secrets.

Now your code should be running on Railway but using the Heroku connection strings. In the next section, we will set up Database services on Railway.

3. Thinking in Services

Zooming out. A mental shift that we see reported from users when they move from Heroku is process scheduling and management. Those familiar with Heroku know their application runs on a Dyno than can be vertically or horizontally scaled.

To handle the start command of the user’s application. Heroku would use a Procfile to handle a single or multiple process running on these Dynos.

Heroku has this system to allow developers to scale these processes independently of each other.

Our Heroku Procfile for a multi-process deployment looks like the following:

web: /bin/bash -l -c "bundle exec puma -C config/puma.rb"
worker: /bin/bash -l -c "bundle exec sidekiq -e production -C config/sidekiq.yml"

Like you just witnessed: we support Procfiles out of the box. Any named process within a Procfile should build and deploy normally, without any further intervention on your part.

Introduction to Railway Services

On Railway, Projects have multiple Services. Services are just deploys of code/image. There are two types of services: Database Services and Code Deploy Services.

We already have our code deployed, now let’s spin up our database services.

Command + K → Database

Our Rails app needs Redis and Postgres. (Your app might need them too.) Lets navigate back to our Project Canvas. Press Command (or Ctrl) + K and type in “New Service”

download (2).jpeg

Navigate to “Database” and then “Add PostgreSQL”. Repeat these steps and select “Add Redis” for your Redis instance.

After a few moments, you should see it pop up within your Project Canvas. DBs on Railway have Table View GUIs, Manual Queries, and much more.

Railway by default injects DB variables into all services within your Project. Just like Heroku, we use the env var name DATABASE_URL for the connection string for Postgres and REDIS_URL for Redis. (If your Heroku variable import imported these Config Vars, you’ll need to delete them from your variables else it will overwrite the Railway connection strings.)

Slam a commit through for now or manually add a variable to trigger a redeploy. (We know… redeploy button coming soon.) On a new deploy, these variables will be sourced in. Everything should work now.

Optional: Moving Our Data From Heroku

It’s very likely that you have some data on Heroku that you’d like to bring over. You can follow our tutorial on how to backup and restore your PG database here.

Can it run Crysis Does it Scale?

As your application grows, Railway will let your application consume more resources depending on the plan you are on to scaling vertically. No need to resize a dyno or look at 5 by 20 matrix to decide witch instance is right for you.

You can spin up additional services to meet demand and use a reverse proxy to coordinate them together similar to adding additional dynos. (Built in horizontal scaling is on the roadmap)

Common Workflows on Railway

Developing Locally

One really cool thing about developing and deploying with Railway is the ability to pull down your variables locally so you can use your cloud infra. No need to run local versions of Postgres.

Example, running a migration from your terminal is as easy as:

railway run rake db:migrate

When you preface your command with railway run we pull down your variables locally. No need to SSH into your Rails app any longer.

CLI Deploys

Many people coming from Heroku are big fans of how easy it is to just type git push heroku master and get a new deploy of your code going. We have something similar with our CLI.

After you railway link or railway init to your project, you can trigger a new deploy from your repo’s root within your terminal with:

railway up

It’s snazzy, try it out!

Custom Domains

Railway by default assumes the code you want to push doesn’t always need a domain. Web services on a Procfile always get an autogenerated domain and cert. We’ll show you how to get a Railway provided domain to expose your app to the internet.

Within your service, under Settings, the top menu has an option to use a Railway provided domain, or a custom domain.

Untitled
Untitled

Generating a domain will give you a customizable domain that will use the *.up.railway.app wildcard domain.

About the Port

Not all apps listen on Port 80. Railway will do it’s best to guess what PORT your app is running on to expose it but that information is best provided by you.

The easiest way to get up and running is to have your application listen on 0.0.0.0:$PORT, where PORT is a Railway-provided environment variable. You can manually override the PORT environment variable by adding PORT to your service’s variables page. (Command + K and type Variables or you can use the keyboard shortcut: G + V under your selected project)

Standing Invitation

Railway not only supports Rails, but Node, Python, Clojure, Elixir and much more out of the box. We have 40+ templates to get you going ready to be deployed in minutes.

If something didn’t quite work out, please let us know! We are very active on our Discord where the community and team are actively helping out of issues of all types. If you see anything within the product that can be improved: we have a feedback page just for you.

We can’t wait to see your projects here on Railway. Tweet at @Railway and let us know what you are hosting!