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.

Heroku vs Cloud 66

Let's deploy a basic production-ready application to both Heroku and Cloud 66 with DigitalOcean and compare the results.

Standard web application workload

Application spec:

  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 for ($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.

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

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 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 Register Servers feature. We will automate the build and deployment of your application 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 us, you can use our dashboard to pull your code directly from your Git repository. We will analyse 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.

Note: If you  have a private Git repository you will need to add SSH key to your Git account. And use the SSH version of the Git URL.  Learn more...

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 pgbackups: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 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, login 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 pointers on configuring your web server and Procfile, Dyno recycling and asset pipeline compilation.

Successful migration stories

These Cloud 66 customers successfully migrated their applications from Heroku:

Recently Published:

Try Cloud 66 for Free, No credit card required