hazel 07dc2fc395
All checks were successful
Deploy to VPS / build_site (push) Successful in 5s
Relicense to OQL
2024-04-16 16:38:49 -05:00

2.5 KiB

A static site server for Forgejo instances.


sign into and make a repository called "pages". place static files in the repository (index.html for the homepage!) on the default branch, and visit in a browser!

you can make a page for a project by making a branch named "pages" in another repository, and putting your static files there. it can then be accessed at

custom domains

to use a custom domain, create a .domains file in your repository with the domain you'd like to use.

then, add a DNS CNAME record on your domain pointing to [[branch.]repo.]

for apex domains, where CNAME records don't work, just add an A record pointing to, an AAAA record pointing to 2605:a142:2135:4519::1, and a TXT record with the content [[branch.]repo.]


selfhosting the server somewhere else is simple- but you need a separate host for this. unlike typical web servers, where you can put them behind nginx and be fine, this server handles its own SSL in order to support custom domains.

git clone
cd pages
go build

configuration is done through a .env file:

# the PAGES_DOMAIN should be just the domain, with no leading period:
# FORGEJO_USER_URL is needed for generated repository links if FORGEJO_URL is a local address inaccessible by users

# mock ACME_DIRECTORY_URL, useful for testing:
# staging LetsEncrypt:
# actual LetsEncrypt:

# A Cloudflare API token with Zone Edit permissions for the domain you'll be hosting this on.
# This is used for solving the ACME challenges.


  • pages
  • pages
  • custom domains
  • https support
  • auto-renewal of certificates
  • support SPAs with _redirects file
  • markdown rendering (set back with go rewrite, TODO!)


the server is copyright (c) hazycora 2023. it's under the OQL.

made with ❤️ by besties