Why I host my blog
A little island on the internet
5 minute read
( )This post is also available in different formats so you can read on the go or share it around!
Photo by Tom Winckels on Unsplash
When I started blogging I used Blogger, it was easy and flexible enough at the time. Best of all, it was free. As a teenager, I couldn't afford to pay for hosting or a buy a custom domain. I happily used Blogger for a long time, but as my interest in web development grew, I needed a new platform that would help me grow and maybe even get people reading my stuff too!
Why did I switch to Medium?
Eventually, I moved to another hosted service, Medium. It took a very different approach, it stripped away the clutter and focused on a distraction-free writing experience and uncluttered reading experience. Like Blogger, it was free and provided a good editing experience that I used to focus on content. Over time, I noticed a few things that were frustrating with Medium.
As good as Medium is, there is one place it falls down, specifically as I write about code, the code blocks. They're dull and devoid of syntax highlighting. The way around this is to upload your code snippets to a Gist and embed them back in the article, but I found the hassle of doing this for more than a single snippet was getting painful. The other issue came up for the reader, the embed would take a while to load on mobile or slow connections, which result in sudden layout shift if you had scrolled down past one of these code blocks. Not great. I needed something that I could control, and Medium wasn't the answer.
Moving to Ghost?
Ghost was the first time I decided to self-host something to replace my blog. It was easy to setup, and it just required a small fee per month to host on Digital Ocean. Best of all, it had good-looking code syntax and was customisable. If I didn't like the way it looked, I could change it. This flexibility was the biggest bonus while still having a nice editor experience. Ghost had the features I required at the time, but the more I wrote, the more ideas I had and the more cumbersome it felt to customise.
The difficulty came as I added more and more customisations to the Ghost theme. It was pretty cumbersome to work with, so I didn't really add that many in the beginning. It was a big investment to add features, and anything more complex was challenging. I wanted to leverage React to add some interactivity, include a comments section, and have more control over the look and feel of my blog. This is when I took a more extreme approach and decided to do it myself with Gatsby.
Why did I switch to Gatsby?
Gatsby was an obvious choice at the time because it was React-based, which I used at work, but it also generated static sites that were performant. I could add interactivity to my site easily and build a more tailored experience. Customisation was easy because I could leverage most React libraries and modern tooling to add features as I saw fit. I could add comments, light and dark mode with more flexible theming, and I could write in MDX – markdown that allows React components to be embedded directly into posts. This wasn't easy, and my blog has gone through many iterations. The editing experience isn't as nice as with Ghost or Medium, but it's tailored towards my use case.
What's next?
As a web developer, I am constantly seeing the issues with my blog, room for improvement and I am constantly tweaking CSS, adding features or removing features I don't want any more. This constant change is beneficial as it allows me to tailor the experience to get exactly what I want. It can evolve when I choose. I am not beholden to a platform, changes are my decision. The downside is that constant tinkering detracts from the time I have to actually write content for my blog. This is a balance I don't think I'd have to think about if I went with something hosted like Medium.
The next iteration of my blog is going down the same route. I want more flexibility and although Gatsby could handle it, it would require almost a full rewrite to migrate to a newer version, update dependencies and restructure my site to allow for new features. Instead, I've migrated from Gatsby to Next.js (you're probably reading this now on Next.js unless it's the future, and I've rewritten it yet again). This is the flexibility that building something yourself has.
Why I like self-hosting my blog
There are three main reasons why I think self-hosting a blog is great.
Flexibility
I touched on this in my reasoning for moving from Blogger to Medium to Gatsby. As I became comfortable with each platform, I began to see the edges. Where the boundaries lie and what I could do within them. If I had stuck with Medium, I'd still be longing for better code support and syntax highlighting, or maybe I'd resort to embedding images of nicely highlighted code instead but sacrifice accessibility.
Self-hosting gives you the opportunity to build what you want when you see an opportunity. You have the power to add features the way you want them, explore different ideas of how you want your platform to work. All this without having to wait or switch platforms. You are in control.
Curiosity
Self-hosting isn't for everyone, but I think almost anyone can learn how to do it to some degree. There's an entire spectrum of ways for you to get your feet wet and experience the joy of having something you can call your own. Even if it's not perfect, it's your own little slice of the internet.
An unintended consequence of self-hosting is the learning experience. You might find you start self-hosting more and more, like analytics solutions and commenting systems. It satisfies a curiosity and can be truly awesome – both terrifying and exhilarating. This can be a fun way to see expand your skillset and learn a bit about how things work behind the scenes. Some endeavours aren't for the faint of heart, but they're worth setting out on, even if it's just to say you've ventured.
Autonomy
Medium got a lot of flack from the internet as their pricing model rolled out, and more writers started to engage with it, monetising their work and frustrating some readers. YouTube is under constant critique by creators as their algorithm promotes content that is manufacture rather than carefully crafted and change their terms and conditions on a whim. This has become common practice.
When your product is a platform that's used by others, the changes you make have consequences that ripple out across the internet. If you're a creator on one of these platforms, you may have had to try to figure out how you adapt. Self-hosting gives you autonomy. You own the platform. You decide what happens, when it happens and how to do it. Self-hosting is the key to moving away from control that platforms have over you and gives you the freedom of autonomy.
How did I get started?
Static Site Hosting on Netlify
The majority of my static websites are hosted on Netlify, I'm not going to set up a server and host static websites myself when Netlify does an impressive job, has a great developer experience and is free. If anything happens, they're static websites connected directly to GitHub and I can move them where I please. Netlify is an easy way to get something on the internet without the hassle. It's the best way to start hosting your static websites, apart from GitHub pages or Vercel.
DigitalOcean
Infrastructure I use like analytics and my comment system is hosted on DigitalOcean. Until I moved to Gatsby, I hosted my Ghost blog on there too. Again, I chose this provider not because they're the cheapest – they're not, I chose DigitalOcean because you're paying for a great experience. I know I could host something on AWS, but I want to avoid having to deal with the poor user experience, complicated pricing and smorgasbord of services required to actually get anything done. DigitalOcean is easy to use, easy to manage and worth the price.
Everything else
You can quite happily have a static blog with Netlify and call it a day. You might want to add some more dynamic features and decide you need a server for that and opt for a hosting provider to run that too. Then there's everything else, maybe you want to send email newsletters or get error reporting when something goes wrong. You have the power to make the decision on whether you find a solution to self-host or look for a hosted provider like Mailchimp or Sentry. You don't necessarily have to host everything, you still have the flexibility of mixing and matching – find what works for you.
What now?
Try it out! Self-hosting is fun. You can dip your toes in the water with a side project and see how it goes. There are countless free plans or free credit with hosting platforms that will give you the opportunity to experiment without financial investment. You just need to take the first step and start exploring on your journey into a world where you aren't beholden to platforms.
A Fullstack Software Engineer working with React and Django. My main focus is JavaScript specialising in frontend UI with React. I like to explore different frameworks and technologies in my spare time. Learning languages (programming and real life) is a blast.