<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Razrfly]]></title><description><![CDATA[Thoughts, stories and ideas.]]></description><link>https://razrfly-ghost.fly.dev/</link><image><url>https://razrfly-ghost.fly.dev/favicon.png</url><title>Razrfly</title><link>https://razrfly-ghost.fly.dev/</link></image><generator>Ghost 5.2</generator><lastBuildDate>Wed, 29 Apr 2026 12:25:47 GMT</lastBuildDate><atom:link href="https://razrfly-ghost.fly.dev/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Host a Ghost 5.0 Blog for Free on Fly.io using Docker and Amazon S3 storage]]></title><description><![CDATA[<p>I found a few great articles on how to host Ghost using Fly.io but I also wanted to use external storage to manage the images instead of the default local storage which is difficult to scale or move later.</p><p>Using Docker directly you could also use any other extra</p>]]></description><link>https://razrfly-ghost.fly.dev/host-a-ghost-5-0-blog-for-free-on-fly-io-using-docker-and-s3-storage/</link><guid isPermaLink="false">62b2021bb71526020bc09ae8</guid><dc:creator><![CDATA[holden]]></dc:creator><pubDate>Tue, 21 Jun 2022 18:44:32 GMT</pubDate><content:encoded><![CDATA[<p>I found a few great articles on how to host Ghost using Fly.io but I also wanted to use external storage to manage the images instead of the default local storage which is difficult to scale or move later.</p><p>Using Docker directly you could also use any other extra packages supported by Ghost as well.</p><h2 id="installing-flyio">Installing Fly.io</h2><p>You probably have fly.io installed already but if not it&apos;s amazingly straightforward, so much so that I won&apos;t cover it here.</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://fly.io/docs/hands-on/installing/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Installing flyctl &#xB7; Fly Docs</div><div class="kg-bookmark-description">Documentation and guides from the team at Fly.io.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://fly.io/public/images/favicon/apple-touch-icon.png" alt><span class="kg-bookmark-author">Fly</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://fly.io/public/images/fly-social-square.jpg" alt></div></a></figure><h2 id="getting-started">Getting started</h2><p>First I just wanted to keep it tidy by creating a local directory for a few files to keep track of, by default you only need one .toml file but to customize the install and add a few things I&apos;ll be using Dockerfile instead of an image.</p><pre><code class="language-bash"># create a folder
mkdir ghost-flyio &amp;&amp; cd ghost-flyio

# creates the .toml file but don&apos;t deploy it yet, i&apos;m specifying the image but we&apos;ll remove this in the next step, probably you can leave it out altogether.
flyctl launch --name ghost-flyio --image=ghost:5-alpine --region dfw --no-deploy

# create the local storage, by default it uses sqlite which is just fine for me, but you could change this as well
flyctl volumes create data --region dfw --size 1

# Create a blank Dockerfile
touch Dockerfile</code></pre><h2 id="creating-the-dockerfile">Creating the Dockerfile</h2><pre><code class="language-dockerfile">FROM ghost:5.2.3-alpine

# install S3
RUN npm install -g ghost-storage-adapter-s3 &amp;&amp; \
  ln -s /usr/local/lib/node_modules/ghost-storage-adapter-s3 ./current/core/server/adapters/storage/s3</code></pre><p>That&apos;s it. &#xA0;Normally the .toml file will include the image inside it, but if you add a Dockerfile in the same directory it will use it. &#xA0;Now that we&apos;re using Docker directly, we could also add any other optional packages supported by Ghost, for example, you could use another external storage other than S3, such as Google storage.</p><h2 id="a-couple-of-changes-to-make-ghost-work">A couple of changes to make Ghost work</h2><p>The defaults are mostly correct however there are two changes you need to make to get Ghost to work correctly.</p><!--kg-card-begin: markdown--><ul>
<li>You need to change the default internal port from 8080 to 2368</li>
<li>You need to mount the drive we created previously</li>
<li>Add a few optional ENV variables</li>
</ul>
<!--kg-card-end: markdown--><pre><code class="language-toml"># fly.toml file generated for ghost-flyio on 2022-06-21T19:04:29+02:00

app = &quot;ghost-flyio&quot;
kill_signal = &quot;SIGINT&quot;
kill_timeout = 5
processes = []

# add this, also be sure and remove the [img] section to ensure it uses docker
[env]
  url = &quot;https://ghost-flyio.fly.dev&quot;
  storage__active = &quot;s3&quot;
  storage__s3__acl = &quot;public-read&quot;

[experimental]
  allowed_public_ports = []
  auto_rollback = true

# add the mounted storage
[mounts]
  destination = &quot;/var/lib/ghost/content&quot;
  source = &quot;data&quot;

[[services]]
  http_checks = []
  internal_port = 2368 # change this
  processes = [&quot;app&quot;]
  protocol = &quot;tcp&quot;
  script_checks = []
  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = &quot;connections&quot;

  [[services.ports]]
    force_https = true
    handlers = [&quot;http&quot;]
    port = 80

  [[services.ports]]
    handlers = [&quot;tls&quot;, &quot;http&quot;]
    port = 443

  [[services.tcp_checks]]
    grace_period = &quot;1s&quot;
    interval = &quot;15s&quot;
    restart_limit = 0
    timeout = &quot;2s&quot;
</code></pre><p>At this point, you can go ahead and launch your app now and check that it works. It won&apos;t use S3 quite yet, but it will work (images might not as we add S3 in the settings, but if you remove this local storage will work fine to test with).</p><h2 id="adding-your-s3-credentials">Adding your S3 credentials</h2><p>You could add these to your .toml file which would probably be fine except if you end up committing your information somewhere, the better practice is to use Fly.io&apos;s secrets. &#xA0;I should mention that they have different variable names.</p><p>I won&apos;t cover setting up the S3 bucket here, but you&apos;ll need to do this correctly for it to work correctly. &#xA0;You could also fairly easily use any other external method that Ghost supports and the process would be more or less the same.</p><pre><code class="language-bash">flyctl secrets set AWS_ACCESS_KEY_ID=YOUR-ID-HERE
flyctl secrets set AWS_SECRET_ACCESS_KEY=YOUR-KEY-HERE
flyctl secrets set AWS_DEFAULT_REGION=us-east-2

# optional
flyctl secrets set GHOST_STORAGE_ADAPTER_S3_PATH_BUCKET=cdn-ghost.yourdomain.com</code></pre><h2 id="add-your-domain">Add your domain</h2><p>You probably don&apos;t want to use </p><pre><code class="language-bash">flyctl certs create blog.example.com</code></pre><p>This step takes a couple of minutes. &#xA0;It will generate two IP addresses for you, IP4 &amp; IP6 which you can point to using Cloudflare or any other service. &#xA0;You could also use the CNAME but since they provide the IP option this seems like a better route.</p><h2 id="references">References</h2><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://www.autodidacts.io/host-a-ghost-blog-free-on-fly-io/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Host a Ghost 5.0 Blog for Free on Fly.io &#x2014; In 1 Minute</div><div class="kg-bookmark-description">Ghost is one of the fastest-growing publishing platforms. However, for those looking to dip their toes in the water, one aspect can be off-putting: the shiny Ghost(Pro) hosting (referral link) starts at $11/month or $108/year &#x2014; $300/year a year if you want to use your own theme</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://www.autodidacts.io/favicon.ico" alt><span class="kg-bookmark-author">The Autodidacts</span><span class="kg-bookmark-publisher">Curiositry</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://cdn.autodidacts.io/img/autodidacts/ghost-on-flyio/ghost-on-fly-io.png" alt></div></a></figure><p></p>]]></content:encoded></item><item><title><![CDATA[Coming soon]]></title><description><![CDATA[<p>This is Razrfly, a brand new site by holden that&apos;s just getting started. Things will be up and running here shortly, but you can <a href="#/portal/">subscribe</a> in the meantime if you&apos;d like to stay up to date and receive emails when new content is published!</p>]]></description><link>https://razrfly-ghost.fly.dev/coming-soon/</link><guid isPermaLink="false">62b1fa673754ec020c779fae</guid><category><![CDATA[News]]></category><dc:creator><![CDATA[holden]]></dc:creator><pubDate>Tue, 21 Jun 2022 17:05:43 GMT</pubDate><media:content url="https://static.ghost.org/v4.0.0/images/feature-image.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://static.ghost.org/v4.0.0/images/feature-image.jpg" alt="Coming soon"><p>This is Razrfly, a brand new site by holden that&apos;s just getting started. Things will be up and running here shortly, but you can <a href="#/portal/">subscribe</a> in the meantime if you&apos;d like to stay up to date and receive emails when new content is published!</p>]]></content:encoded></item></channel></rss>