Table of Contents
Codeberg Pages
With Codeberg Pages, you can easily deploy static websites on Codeberg using Git.
The Codeberg Pages server responds to four different URLs:
- https://raw.codeberg.org/username/reponame/: raw content, uses correct MIME types (HTML is forbidden though) & is accessible with CORS.
- https://username.codeberg.page: user page, points the default branch of a user's or organization's
pages
repository - https://username.codeberg.page/reponame/: repo page, points to the
pages
branch of the repository - https://example.org: custom domain, points to a repo of choice as outlined below
In all cases, you can append a branch using an @
(e.g. https://username.codeberg.page/@develop/README.md).
Custom Domains
WARNING: Custom domains aren't fully tested yet and you may run into Let's Encrypt Rate Limits for your domains. It is recommended to try it out on an unused subdomain first so you can make one request, and if it fails, contact us and we can check what the problem is. A better process for such errors is being worked on. Currently known pitfalls:
- you must either not have a CAA record, or explicitly allow letsencrypt.org there
For custom domains, two things are required:
-
A
.domains
file in the repository (in the branch in question), containing a list of domains that shall be usable to access that repository:- One domain per line, you can leave lines empty and comment out lines with
#
. - All domains (including
*.codeberg.page
) will be redirected to the first domain in that file.
- One domain per line, you can leave lines empty and comment out lines with
-
A CNAME record pointing to one of the following targets:
username.codeberg.page
→ https://username.codeberg.pagereponame.username.codeberg.page
→ https://username.codeberg.page/reponame/branchname.reponame.username.codeberg.page
→ https://username.codeberg.page/reponame/@branchname/
If you can't use a CNAME record to configure the target (e.g. for a zone root), you can use an A/AAAA/ALIAS record to
codeberg.page
with an additional TXT record for the target (just as shown above for CNAME records).