Escaping GitHub's Shadow: A Practical Guide to Migrating Static Sites to Codeberg
Share this article
As Microsoft intensifies scrutiny with features like Windows Recall and GitHub's AI integrations, developers are increasingly seeking ethical, open-source alternatives. For those hosting static websites, GitHub Pages has long been a staple—but its corporate baggage and uptime concerns with platforms like Codeberg Pages are driving a migration wave. Based on a detailed guide from arscyni.cc, we break down how to shift your static sites to Codeberg paired with statichost.eu for robust, automated hosting.
Why Migrate? Ethics and Uptime Realities
Codeberg, a community-driven Git platform, offers a refuge from what critics call Microsoft's "ethically degenerate" practices, including lobbying and privacy invasions. Yet, Codeberg Pages itself warns against reliance for critical uptime due to unresolved server issues. Enter statichost.eu: a seamless companion that auto-deploys changes on push, ensuring reliability. As the source notes, "To hell with Microsoft. Microsoft owns GitHub... Windoze is a horrible OS, nay, malware." This sentiment underscores a broader shift toward decentralized infrastructure amid growing distrust of tech giants.
Step-by-Step Migration: From GitHub to Codeberg + statichost.eu
Repo Setup and Access Tokens:
Create a repository on Codeberg (no need for the restrictive "pages" name). If you have two-factor authentication enabled, generate an access token athttps://codeberg.org/user/settings/applicationswith "Repository and Organization Access" set to "Public only" and "Read and write" permissions. Store this securely—e.g., in KeePassXC—and use it for authentication instead of your password.Automate with statichost.eu:
Link your Codeberg repo to statichost.eu for automatic builds on every push. As founder Eric Selin confirms:“Yes, statichost.eu can automatically detect changes and update your website when you push to your Codeberg repository... Set up a webhook via their Forgejo documentation.”
Your site will live atusername-repository_name.statichost.euinitially.Tame DNS Complexity:
For custom domains (e.g.,yourwebsite.org), configure registrar DNS settings to point to statichost.eu. The source warns of inconsistencies: "I still have no idea how DNS configuration works after all these years." Key steps include:- Set CNAME records for
wwwsubdomains. - Use A records for root domains if CNAME fails, referencing statichost.eu's IP.
Allow hours for propagation, and unpublish GitHub Pages to avoid conflicts.
- Set CNAME records for
Handling Multi-Site Setups and Redirects
Avoid Codeberg's default "pages" repository for multiple sites. Instead, create distinct repos—preserving contribution histories and avoiding naming fatigue. For domains migrating from GitHub, use meta refresh tags for redirects, as GitHub Pages lacks .htaccess support. As credited to Jan Wildeboer and div72, this ensures https URLs forward correctly without plugin hassles.
The move to Codeberg and statichost.eu isn’t just technical—it’s a reclaiming of autonomy. With automated builds and ethical hosting, developers gain resilience against corporate overreach, turning migration into a silent protest for the open web.