Fly.io is yet another Platform as a Service, you can think of it as a serverless and multi-regional Heroku.
It also offers a generous free plan:
In practice, this is more than enough for hosting a low-traffic Ghost blog.
To get started, you need to install Fly’s command line tool first, then create an account and log in with the CLI:
Create a new folder for this project:
Then create a fly.toml
with the following contents:
Be sure to replace ghost-blog
with a custom app name, try to make it unique because it’s also used as the subdomain.
After that you need to create a persistent volume to store Ghost contents such as images, themes and the SQLite database:
The [mounts]
source
section defines the name of the persistent volume you wanna bind this app to, here I have set it to ghost-blog
, the one created by the above command.
Now everything is ready, you can run fly deploy
to deploy this website. When it’s successfully deployed, you can visit ghost-blog.fly.dev/ghost (or your custom app name) to create an admin user.
To add a custom domain to your blog, go to your Fly dashboard:
Make sure to update the url
in fly.toml
to your custom domain and re-deploy it.