Migrate from Heroku to Railway⌁
APPLIES TO: +
Too complicated? Not what you're looking for? Consider a hosted Nightscout service! Check for easier solutions here.
Interested in building a Nightscout DIY site? Make sure you read and understand this before starting.
Using the M0 MongoDB Atlas database
Railway network model generates missing data issues with some follower apps and devices
Step 1 - Update your Github repository⌁
a) Click here to log in at GitHub: https://github.com/login.
b) Enter your username or email and your password. Click
c) Select your own
cgm-remote-monitor project (not
d) Your repository will open. If you see
This branch is xxx commits behind nightscout:master you need to update.
If you see
This branch is up to date with nightscout:master, leave the GitHub page opened and go directly to Step 2.
Fetch and merge
g) After a moment, your repository should display
This branch is up to date with nightscout:master
Leave the GitHub page opened.
Step 2 - Create a Railway account⌁
a) Open Railway in a new browser tab and click
login. Login with GitHub.
Authorize Railway App.
c) Click on
Please agree to the new terms to keep on using Railway.
d) Scroll down and click
I agree with Railway's Terms of Service.
e) Scroll down and click
I will not deploy any of that.
f) You now need to upgrade your account to a Developer plan. Click on the
Starter Plan information and select
Remove Resource Limits.
g) Enter your credit card information and select
Subscribe to a Developer Plan.
Your card will be billed 1$ that will be refund immediately. Bank fees won't be refund.
Step 3 - Log into Heroku⌁
- Log in Heroku https://id.heroku.com/login
- Leave the Heroku page opened and return to the Railway page.
- If you cannot log into Heroku, follow the new user guide and reuse your existing Atlas database.
Step 4 - Deploy Nightscout in Railway⌁
a) Click on
Create a New project.
If you don't see that, top right, click
+ New Project.
Deploy from GitHub repo.
Configure GitHub App.
Only select repositories, in the
Select repositories drop-down select your own fork of
Then, at the bottom, click
Install & Authorize.
e) You should be back to
Deploy from GitHub repo, select it.
f) Now you can select your own GitHub repository.
h) The Nightscout project will deploy in the background, just ignore it: now we need to import all variables from Heroku.
When you see this, press simultaneously the keys
If you use a Mac
Import variables from Heroku.
Connect Heroku account.
Ctrl K (or
⌘ K and select
Import variables from Heroku. Now you can select your Nightscout app.
m) Wait until import completes.
Your site will redeploy, wait until redeploy completes.
n) Change your site name (you need to keep the
Select your Nightscout app
Domainsgo to the end of line and click the edit icon
Write your new name and check it's available
Your Nightscout URL will now be
Congratulations. You migrated from Heroku to Railway.
Click the site name to open Nightscout.
Step 5 - Update your uploaders and downloaders⌁
Now you will need to update all the devices connected to Nightscout with the new web address.
Change the URL!
Note that Railway will display he same information than Heroku even if you don't do so, but this will stop when Heroku will shutdown the free service.
Make sure you update the uploader and follower devices with the new railway.app address!
For Dexcom users, if you use the bridge plugin you should be set.
xDrip+ users (including Medtronic CareLink followers) should update the uploader as shown here.
xDrip4iOS users here.
AAPS and Loop: consult the relative documentation to change your site name.
To fully test your new Railway Nightscout app: put your Heroku app in maintenance mode.
If things don't go as expected, you can disable it and return to Heroku whilst you fix it.
Better test it now than once Heroku will shutdown your app.