Codeberg Pages

Host your website in Codeberg

If you own a personal domain, you can host your website in Codeberg Pages service

source: 🚀 <gemini://gem.xmgz.eu/gemlog/2021-12-10-codeberg-pages-en.gmi>

Instructions

HowTo in Codeberg.org

Create a new repo

captura de pantalla

Login in codeberg.org, then press “+” icon beside avatar and then press “new repository”

First field is “Repository Name”, just write “pages” there.

Leave defaults for all other fields and press “Create Repository” button.

Note: you can use a diferent branch than “main”, or a branch in a existing repo, but in my opinion you should keep it simple untill you set things up and working and then make the changes that better suit your needs.

In codeberg.org website

Add files to your repo

You have to create at least this two files:

  • index.html
  • .domains

They are text files. On your text editor of choice, o directly in codeberg’s web interface, create index.html with this content:

<html>
    <head><title>website title!</title></head>
    <body>
    Ola Mundo!!!
    </body>
</html>

Now in your web browser go to https://username.codeberg.page and you should see your newly created website. You may need to give codeberg’s bot a minute to set all configs.

The second one is “.domains” (no extension and with one dot at the front), where you have to write full URL of your domain.

Example:

https://yourdomain.tld

on one single line

Warning

review your profile privacy settings

Account Settigns -> Public Profile 

section

Privacy -> User Visibility -> Set as "public"

In my case it was set as “private” and made pages fail

I had opened an issue in Pages.

Registar

config your domain DNS section (yourdomain.tld) to redirect to codeberg service

DNS config

you have to do this in your registar webpage. In my case setting “CNAME” (as in codeberg howto) was enough, but you may need type “A” config.

Let a few minutes to your register to propagate the changes and codeberg to request a let’sencrypt ssl certificate for your website and install it.

Upload your website

aftert checking that https://yourdomain.tld serves index.html using https: then you can upload your website.

This is a static web site, so you can upload .html files (and pictures, files, etc.) that no require server-side processing. Plain html, css, javascript you directly write or some website created by assistants like jeckyll, hugo, pelican, etc.

Warning

Do NOT delete .domains file, codeberg bot needs it to serve your website.


CC BY-SA