How to: Reliable hosting and deployments for free

  • Heroku Cloud: Heroku is one of the most easy to use PaaS solutions out there. Best part? The lowest version is free! It includes a host name (Subdomain on and shared a SSL. It requires a credit card for registration, but as long as you don’t opt for more powerful deployment server they don’t charge. It’s definitely one great solution! However, it does limit in terms of technologies that run your app. For me, I could deploy my code as a Golang application, but there was compilation of Vue.js involved. How did I get around this? Using Docker. Details are discussed below.
  • Cloudflare: If you have a domain, Cloudflare free tier gives superfast DNS, assets caching, free SSL, and CDN. Cloudflare also does redirection based on URL pattern, but there is a limitation on the free tier and protects against DDoS.
  • Database: With Heroku, you can get numerous free add-ons. It includes PostgreSQL, MySQL, etc. However, since I have been using the free tier MongoDB Atlas for almost 2 years now, I went with it. Know that there are numerous options available in free tier.
  • Mailgun: Do you need to send out emails for free? This might fall under extended requirements, but yes, Heroku does offer a free tier Mailgun account that can be used free of cost. Mailgun has SDK available in numerous languages and can be integrated easily to send out emails from your application.
  • Docker: As I had mentioned above, Heroku is great as long as your app is written on one technology only. However, Heroku supports docker based deployments as well, that’s where the real flexibility comes into picture. My portfolio website is registered as a Docker based app on Heroku. The docker file that I have written, uses Golang image as base and builds Golang code, then downloads Node.js, builds Vue.js code, and copies the built assets on an alpine linux distribution. This lets me use theoretically any tech stack for my application, which is limited by using a tech-specific language pack on Heroku.
  • TravisCI: Don’t like building your code on development machine and copy files over to server or build code on PaaS again? Wire up a Travis pipeline to do it for you! It’s free as long as your project is open source and is merely a few clicks and a small script away from getting up and running.
  • Github: The ease of integration with all the above mentioned services is the sheer power of Github. Push code to main branch, the code is built on TravisCI (or any other CI that you are using) and upon a successful build, the website is deployed on Heroku! Big firms more or less set up similar pipelines for their production systems.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gaurav Saini

Gaurav Saini

SMTS • Web Services • Rust/Go/Py/JS • Cloud & Distributed Systems