This guide goes over setting up a Ghost blog on DigitalOcean. It's not free like heroku, but at least their cheapest plan is only $5 per month.
If you have intentions of contributing to Ghost, you can fork the repo and check that out.
For developing you can use master, but there's also a stable branch which is good for running in production.
Make sure you have a few of the prerequisite libraries installed.
At this point you should be able to visit your blog by pasting the visiting the ip address in your browser.
In the Droplets section you should see the droplet you just created. You can click on More and Add a Domain. From there you should be able to type your domain and link it to your droplet.
Once you add your domain record, it will take you to page that shows you your ns records. You'll have to take those and add them to your domain registrar. For me, I added them to godaddy.
You'll probably have to wait a few hours for things to propagate. If you run into issues read this.
Now it's time to change the nginx configuration to match the domain name. SSH into your droplet edit /etc/nginx/sites-available/ghost. Change the current server_name from my-ghost-blog.com to your domain name.
Now we need to add your domain to ghost's config. Edit /var/www/ghost/config.js and change the production url to your domain.
Start adding these values to your domain settings (same place where you grabbed ns records) in DigitalOcean. If you have issues with this, here's a helpful blog post.
Now you're going to have to grab the username and password that domain created for you and add them to your ghost config.
If you're blogging about code, you definitely need syntax highlighting. There's a library called Prism.js which is really easy to setup.
Go the download page and select a theme and which languages you'd like highlight support for.
Download the .js and .css files.
Hopefully now you have a brand spanking new Ghost blog! Now write about good things and share with the world!
Feel free to leave any feedback or ask any questions down below. I'd be more than happy to help!