Migrating Rails Apps to VPS - worth it?
Tags: help, rails, server, migration
Published: 2018-12-05 01:48:18

---
title: Migrating Rails Apps to VPS - worth it?
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/qkbru7xj08vp7nivu665.png
tags: help, rails, server, migration
---

UPDATE: I decided to leave my apps on Heroku, thanks to a convo I had with @zspencer. I've reproduced our conversation below - hope it helps someone!

---

**ARIT**: Hi Zee. You recently provided a beautifully-detailed answer to my devTo question about migrating Rails from Heroku to VPS. I built these Rails apps while in coding bootcamp; their storage is linked to AWS S3 buckets and my AWS free year is coming to a close. I'd like to migrate the apps so they can use local storage on the server. Although they are client-facing, they dont use up too many resources, so I figure hosting them all on the same VPS would save me a bit of money.
I followed Oliver's migration tutorial on GoRails.com today; I got through it okay, but upon loading the server's IP, I'm getting a error: 
> Error ID: 35090cd9
> Details: Web application could not be started by the Phusion Passenger application server.

Don't know where to go from here, and my head hurts.

**ZEE**: Did you run the numbers to figure out how much S3 would cost if you left the apps on Heroku? I store a few gigabytes of data in S3 and it's pennies a month.
My guess is that you'll want to try and find the logs for nginx and/or phusion passenger to figure out why the application is refusing to start.
Further, there is a risk that if you rely on your server to provide storage capacity for your application, you no longer have the uptime and redundancy that S3 provides; s3 is a *really good* tool for storing files very very inexpensively and making sure that you can access it later.
If you *do* wind up storing the data on your web server, and then the web-server starts running out of space, you'll need to upgrade the storage capacity of the web-server, which will involve taking the server down for a period of time, duplicating the disk image, and re-inflating it on a larger virtual disk.
Also it's totally OK to ask these questions on devTo :) Someone else is probably in a very similar boat and would benefit from you exposing your uncertainty!

**ARIT**: You've convinced me Zee :) I'll stay with S3. I'll update my devTo post.

**ZEE**: I mean, I don't know if that's the *right* call, but I am supremely lazy and I'm happy to exchange dollars for time, especially if it's pennies on the hour or day.

**ARIT**: Lol. No, you've really convinced me - especially your argument about scaling. And you're right - S3 isn't that expensive for low storage use and queries. Plus, the process of migrating just 1 of my apps was so headache-inducing! 😫

**ZEE**: Wait until you have customers on the app and it goes down at 3am on a Tuesday and you thought adding a "call me when it goes down" alert was a good idea and you wake up to a phone screeching and you have to re-figure out what the hell is going on while groggy.

**ARIT**: 😆

---

***Old Post Follows Below:***

Hello DevTo Fam! I need some help.
I'd like to migrate my Rails apps from Heroku to a VPS on Vultr. There are several guides on how to do this for one Rails app. However, **I would like to host all 5 of my apps on the same VPS**, utilizing a name-based hosting approach to resolve all their domains. This is where I'm not finding much online that is helpful. One guide makes use of the Passenger server, but I understand that Puma is considered better. For a web server, I'm partial to Nginx.
I would really appreciate any help in mapping out how to accomplish this. Thank you so much in advance! 🙏🏾