← All Articles

How to move from Heroku to Cloud 66

Kasia HoffmanKasia Hoffman
Aug 13th 19Updated May 12th 22
Ruby on Rails

how-to-move-from-heroku-to-cloud-66

Key benefits of Cloud 66

Cloud 66 offers Heroku-like functionality with the flexibility of running on any cloud provider or your own servers.

  • No vendor lock-in. Build and configure your servers the way you want.
  • Full control. You have SSH access to all your servers.
  • Deploy to any cloud or your own servers.
  • Resize server CPU, memory & disk for free.
  • Wide database support + bring your own database.
  • Supports rolling, parallel, blue/green, and canary deployment strategies and full deployment history with easy rollbacks.
  • Works well for web agencies - from team management and access control to server cost breakdown by the client.

Heroku vs Cloud 66

Are you looking for a Heroku alternative? Cloud 66 creates an environment like Heroku but on any cloud. Let's deploy a basic production-ready application to both Heroku and Cloud 66 with DigitalOcean and compare the results.

Standard web application workload

how-to-move-from-heroku-to-cloud-66

Application specs:

  1. Two front-end web servers with a load balancer. We have selected servers with 1GB of RAM on Heroku (Standard 2x - $50/server/mo) and on DigitalOcean ($5/server/mo + $10/mo for load balancer) plus Cloud 66 fees for managing two servers ($14.99/server/mo)
  2. One PostgreSQL instance with managed backups. On Heroku, we have selected a Standard Postgres database with 4GB RAM and 64GB storage ($50/mo). The closest equivalent server size on DigitalOcean offers 4GB RAM and 80 GB storage ($20/mo). Add management costs from Cloud 66 ($14.99/mo) and database backups ($1.95/mo).  You can store standard database backups for free or use Cloud 66's managed database backup ($0.34/GB/mo). Managed backups are secure "off-site" backups, stored on S3 and reachable via a simple web UI.
  3. SSL - On Heroku SSL encryption starts from $20/mo whereas basic SSL is free of charge at Cloud 66.

Workers & Background Intensive Workload

Initially, you may share the servers for the services like Redis or workers, however when your application grows you might want to add Redis and workers on separate servers.

how-to-move-from-heroku-to-cloud-66

As you can see, Cloud 66 is more than $100 cheaper per month for the same capacity.

Why do developers leave Heroku?

Usually, companies migrate from Heroku to cut the cost as they grow. However, in recent Heroku outages, many developers are looking for more reliable alternatives. Additionally, developers are not happy with:

  • Lack of flexibility to adjust the available CPU, as Heroku offers six basic dyno types. As a result when the company grows they need to deal with overhears.
  • Heroku runs its servers on AWS, however, developers do not have access or control over the regions. This is an issue for the companies that deal with data requirements.
  • It does not offer support for crons/jobs.
  • Heroku default environment does not offer static IPs. (Private Spaces are only available on the Heroku Enterprise subscription.)

Moving from Heroku to Cloud 66

Checklist before you get started:

  • Sign up for a Cloud 66 account with a free 4-week trial and no credit card is required during the trial period.
  • A Git repo containing your application code. This can be a private or public repo.
  • A cloud account or your own server(s). Cloud 66 does not host applications. We natively integrate with major cloud providers to manage servers on your own account, or you can bring your own servers via our Registered Servers feature. We will automate the build and deployment of your application to any cloud provider.

_ Note: Heroku offers the following server sizes: 512MB, 1GB, 6GB. This is a good guideline to calculate server requirements for your application._

Move your apps in 3 steps: Code, Data, and Traffic:

Step 1: Migrate your code

Once your Cloud 66 account is set up, you can use our dashboard to pull your code directly from your Git repository. We will analyze the code to determine what dependencies you have in your application. This helps us to provision the required servers on your cloud account, configure & secure them, install components, etc.

Step 2: Migrate your data

Once your code is deployed, you will need to migrate your data across. It is worth noting there are differences in migrating PostgreSQL and MySQL databases.

PostgresSQL - to migrate your PostgreSQL data, use your Heroku toolbelt to create a database backup URL by running: heroku pg:backups:url

Paste the URL into the field in the Application Overview dashboard, and click Import Heroku data to complete the migration_._

MySQL - start the migration by running a MySQL dump of your existing database. Check out the ClearDB documentation for more information.

$ mysqldump -u [username] -p[password] [dbname] > backup.sql

Next, use Cloud 66 Toolbelt to upload the mysqldump file to your stack database server. Remember to replace the fields below with your values.

$ cx upload -s "[stack_name]" --server [database_server_name] backup.sql /tmp/backup.sql

Now use Toolbelt to SSH to your server.

$ cx ssh -s "[stack_name]" [server_first_name]

Lastly, import your backup into the database with the command below. Visit the Application Overview dashboard and click on the database server to find the generated username, password, and database name.

$ mysql -u [generated_user_name] -p [generated_password] "[database_name]" < /tmp/backupfile.sql

Step 3: Switch your Traffic

The last step is to point your public DNS at your new Cloud 66 application.  To redirect your traffic to the new version of your app, log in to the admin console for your DNS provider and update your CNAME records to point to your new server. Check out our Configure your DNS documentation for more information.

_ Note : We recommend checking out our help documentation for the useful pointerson configuring your web server and Procfile, Dyno recycling and asset pipeline compilation._

Cloud 66 Products:

  • Cloud 66 for Rails -  lets you deploy your Ruby, Rails Sinatra, and Rack applications to the cloud. Cloud 66 for Rails offers ease of management and reduces the load on your DevOps resources.
  • Cloud 66 Maestro - is a perfect option to quickly and easily deploy any application that has a Dockerfile.  It's a full container management service. It builds a Kubernetes cluster on your servers, builds your code into Docker images, and takes care of databases, firewalls, and networks for your applications on any cloud.
  • Cloud 66 Prepress - builds and deploys static (Jamstack) websites to your own cloud account. Teams, real-time logs, programmable traffic management, and SSL certificates are all included. It supports the following frameworks: Hugo, Gatsby, Jekyll, Next.js, Vue.js, Nuxt.js, Svelte, Middleman, and Docusaurus, with more generators on the way.

Successful migration stories

These Cloud 66 customers successfully migrated their applications from Heroku:


Try Cloud 66 for Free, No credit card required