<p>I just moved from <ahref="https://about.gitea.com/">gitea</a> to <ahref="https://forgejo.org/">forgejo</a> and the process could not have been simpler. I'm really impressed. I suppose since the latter was <ahref="https://forgejo.org/2024-02-forking-forward/">until very recently</a> a soft fork of gitea, I shouldn't be surprised at how easy it was. Still though, I sat down expecting to need to dedicate a few hours to debugging and it "just works" without a hitch after 15 minutes. The most jarring part was getting the actions runner working but the forgejo documentation is great, in fact I'd say better than gitea's docs, so in the end this wasn't a massive issue.</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2class="wp-block-heading">Why?</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>I have used gitea for hosting personal projects since about 2018 when I first became aware of it. I've been super impressed and I love the fact that it's so lightweight and simple to use. However, I've been a little disappointed by the founders' r<ahref="https://blog.gitea.com/a-message-from-lunny-on-gitea-ltd.-and-the-gitea-project/">ecent-ish pivot towards commercialisation</a>. Don't get me wrong, I'm an open source maintainer and contributor myself and I know that many of these folks are essentially doing a public service for free. The final straw for me has been the recent announcement of Gitea Enterprise and <ahref="https://blog.gitea.com/gitea-enterprise/">the direction they seem to be moving in </a>(open "core" with a bunch of paywalled features). </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>I was a huge fan of Gitlab about 10-11 years ago but they have since heavily commercialised and gotten worse, caring less and less about their community and more and more about corporate user. The open core model can be ok if the features that are paywalled genuinely are things that only big companies care about or if bleeding edge features are open sourced after an embargo period or <ahref="https://squidfunk.github.io/mkdocs-material/insiders/">once a funding milestone has been met</a>. However, I'm once bitten twice shy when it comes to these kinds of precedents in software forges so forgive my cynicism.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Forgejo was set up in response to Gitea's pivot towards commercialisation and their governance model is pretty much set up in a way to prevent the same thing happening again (I guess nothing is impossible but it is unlikely and there would be a lot of drama). For now I will throw in my lot with them.</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2class="wp-block-heading">How to Switch The Server</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>The server software was the easiest thing to switch. Following the instructions from forgejo, I simply replaced the name of the gitea image with the equivalent forgejo one in my <code>docker-compose.yml</code> and ran <code>docker-compose pull</code> followed by <code>docker-compose up</code>:</p>
<p>As soon as I ran this and started the server the whole thing came back up and apart from the new orange paint job, very little had changed about my server.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2class="wp-block-heading">Swapping the Runner</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>The runner was slightly more painful because I had made <ahref="https://brainsteam.co.uk/2024/01/20/gitea-forgejo-actions-and-postgresql-tests/">a couple of customisations</a> to my gitea actions runner before in order to get it running docker-in-docker (allowing me to push and pull images from inside the runner without those images appearing in the host system's user space)</p>
<p>Again, the documentation in forgejo is great and they provide an example for running docker-in-docker as a separate service and having the runner talk to it. All I had to do was change a couple of env vars and the runner image name:</p>
<figureclass="wp-block-image size-large"><imgsrc="/media/image-6-1024x222_a7f47ead.png"alt="a screenshot of a forgejo run with green ticks"class="wp-image-2092"/><figcaptionclass="wp-element-caption">Happy green ticks after the forgejo runner completes its run.</figcaption></figure>
<p>If you were thinking about checking out forgejo for philosophical reasons or simply because you were curious and you're worried about switching from gitea, it couldn't be easier. If you are thinking about trying it out though, I'd strongly recommend taking a backup and/or spinning up a temporary or beta site where you can try it out before committing. Also bear in mind that<ahref="https://code.forgejo.org/forgejo/runner#forgejo-runner"> Forgejo recommend not using their actions runner in prod yet</a> because it may not be secure enough. I don't let anyone else use or sign up in my instance and I'm pretty paranoid about what I do run there so I'm taking a calculated risk here.</p>