back
Self-Hosting Your Own Code
self-hosting · codeberg · git · sovereignty · open-source
date:2025-03-20
read:2 min
size:—
load:—

GitHub is owned by Microsoft. Microsoft is a US company. The Cloud Act means the US government can compel Microsoft to hand over any data stored on their infrastructure regardless of where the servers physically sit. This is not a hypothetical. It has happened.

For most developers this is an acceptable risk. For me, increasingly, it is not — not because I am hiding anything, but because the principle matters. Software that I write should be under my control, or at least under the control of an entity whose jurisdiction I have some relationship with.

Codeberg is a non-profit based in Berlin, Germany. It runs Forgejo, a fork of Gitea. It is not trying to be GitHub. It does not have Actions in the same form, it does not have Copilot, it does not have a marketplace. What it has is a git host run by people who care about software freedom, in a jurisdiction covered by the GDPR rather than the Cloud Act.

The migration was straightforward. Most of my projects are small enough that a git remote add codeberg and a push was sufficient. The CI situation required more thought — I am currently using a self-hosted Hetzner runner for anything that needs compute, which costs approximately €4/month and gives me complete control over the build environment.

What I learned: most of the things I thought I needed from GitHub I did not actually need. I needed a place to put code, a way to track issues, and occasionally a way to run automated tests. All of these exist on Codeberg. The rest was inertia and network effects.

The network effects are real though. GitHub is where developers look for code. Visibility matters for open source projects. I have not resolved this tension — I maintain mirrors on GitHub for discoverability while treating Codeberg as the canonical source. This is an imperfect solution. Most honest solutions are.

— —