Deploy a Go App to Railway

After using Heroku for many years, I’ve recently taken a look into Railway as an alternative hosting platform for various side projects. These projects are often written in Go (of course!) so I thought I’d write a quick guide on how to setup a new project - the good news is, it’s easy!

1) Get an Account

It’s easy to setup, the link on their home page will help you.

Signup to Railway  

2) Create Project & Connect your Repo

create a new project

select project

Pick your repo as part of their wizard. I choose one from Github, see our example below:

View Repo on Github View on Project on Railway  

3) Setup any Environment Variables

You may need to add sensitive information to your project as ‘Variables’. Again, these work in a similar way to our hosting platforms like Heroku. You access them by opening your project, clicking on the web process, and selecting the Variables tab.

railway env vars