> ## Content Index
> Fetch the complete content index at: https://www.autodidacts.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# A few more things I've learned about self-hosting Ghost on Fly’s free tier
- URL: https://www.autodidacts.io/things-ive-learned-self-hosting-ghost-on-fly-io-free-tier/
- Published: 2022-11-03T22:45:06.000Z
- Updated: 2022-11-03T22:54:30.000Z
- Author: Curiositry
- Tags: Tech, Ghost, Hosting, Free, Fly.io

Following on from my [previous](https://www.autodidacts.io/host-a-ghost-blog-free-on-fly-io/) two [posts](https://www.autodidacts.io/host-ghost-mysql8-on-fly-io-free-tier/) on the topic, here are some additional things I’ve learned running this blog for free on Fly:

![HN traffic spike HTTP response count graph](https://www.autodidacts.io/content/images/size/w1000/2022/11/Screenshot-2022-11-03-at-21-47-47-Fly-App---Dashboards---Grafana.png)![HN traffic spike disk usage](https://www.autodidacts.io/content/images/size/w1000/2022/11/Screenshot-2022-11-03-at-21-48-34-Fly-App---Dashboards---Grafana.png)

HTTP response count & volume usage on the day of the spike.

1. **You can survive a HackerNews traffic spike, *without scaling*.** However, your access logs will pile up. [One of my posts](https://www.autodidacts.io/taxonomy-is-hard/) made it to [#3 on HN](https://news.ycombinator.com/item?id=33383598&ref=autodidacts.io) while I was sleeping, without any downtime. (In fact, average response times went down.) However, if you stayed at #1 for long you might run out of disk space.
2. **Fly forgives monthly bills under $5.** This means you can **scale to 512MB RAM on both Ghost and MySQL instances, without having to actually pay anything.** To be nice, you should probably stay at 256MB. But it's good to know you can scale up during traffic spikes (or when expecting traffic spikes) without being billed for it.
3. **Importing a large JSON file takes lots of RAM.** However, you can just scale up for a few minutes and the bill will be forgiven. I scaled up to 1GB RAM when I migrated from an out-of-date version of Ghost on Heroku to Ghost 5 on Fly, importing \~8 years of content. (Other things that seem to use a lot of RAM: saving posts too frequently, and creating bookmark cards.)
4. **The script kiddies will come for you**. So far, the amount of traffic looking for security vulnerabilities (which fortunately don't exist) has been low. But it is there. If it increases, I will have to put this blog back on Cloudflare, or configure [Fail2Ban](https://en.wikipedia.org/wiki/Fail2ban?ref=autodidacts.io).
5. **Be careful when fiddling with firewall rules.** When tinkering with `iptables`, `ufw`, and `fail2ban` trying to block an attacking IP address, I made the mistake of running `ufw enable` … which instantly froze my SSH session, took down my app, locked me out of my fly volume, and prevented me from redeploying. After frantically scrabbling to spin up a new application instance and restore from my most recent backup, my Fly app recovered. Lesson learned.
6. **Managed Ghost hosting is expensive for a reason.** If I was billing for the time it takes to run this blog for free, it would be *way* more expensive than [Ghost(Pro)](https://ghost.org/?via=curiositry&ref=autodidacts.io) (referral link) or any of the other managed hosting providers. Then again, I don't really know what I'm doing, which *might* have something to do with it...
7. **Eventually, your backup will be all you have.** In addition to the incident with `ufw enable`, one time back in 2014 I deleted my entire production database on Heroku, losing many posts permanently. Backups are important! I regularly export my blog's content as JSON, and use Fly's SFTP shell to backup my content. (Tutorial coming soon. The TL;DR version: `flyctl ssh sftp shell -a APPNAME`, then `get /var/lib/ghost/content/ GHOST-CONTENT-BACKUP-YYYY-MM-DD`.)
8. **The Fly staff are very friendly and helpful** even though I haven't paid them a cent. They’ve promptly answered every question I’ve posted to the forum, and even tweeted my blog post … which was specifically about how to run a blog on their infrastructure *without* paying them money. Just sayin’.