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>
Create a new repo
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:
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.
on one single line
review your profile privacy settings
Account Settigns -> Public Profile
Privacy -> User Visibility -> Set as "public"
In my case it was set as “private” and made pages fail
config your domain DNS section (yourdomain.tld) to redirect to codeberg service
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
index.html using https: then you can upload your website.
Do NOT delete
.domains file, codeberg bot needs it to serve your website.