Forked because I can.
  • Go 90.5%
  • Go Template 6.9%
  • Shell 2.6%
Find a file
nghialele 15c8db49f4
Some checks failed
Deploy to VPS / build_site (push) Has been cancelled
update .gitignore
2026-06-09 11:23:54 +07:00
.forgejo/workflows use redis-cli 2024-09-28 03:08:19 -05:00
cache heavy refactor 2025-01-02 12:15:46 -06:00
certificates feat: add multi DNS provider support for ACME challenges 2026-06-09 10:39:46 +07:00
errors Add specific error message for failing to find repository 2025-01-22 00:15:20 -06:00
forgejo remove now-unused size field on tree files 2025-11-20 20:56:51 -06:00
handler disallow other methods 2025-11-20 21:00:44 -06:00
redirects add forcing redirect option 2025-08-24 15:25:08 -05:00
render fix streaming of larger files 2025-11-20 18:47:31 -06:00
timer heavy refactor 2025-01-02 12:15:46 -06:00
utils fix streaming of larger files 2025-11-20 18:47:31 -06:00
views fix code blocks in markdown.tmpl 2024-04-25 02:43:34 -05:00
.gitignore update .gitignore 2026-06-09 11:23:54 +07:00
go.mod feat: add multi DNS provider support for ACME challenges 2026-06-09 10:39:46 +07:00
go.sum feat: add multi DNS provider support for ACME challenges 2026-06-09 10:39:46 +07:00
LICENSE.md Relicense to OQL 2024-04-16 16:38:49 -05:00
local_test update ipv6 address in local_test 2024-10-26 12:16:12 -05:00
main.go path handling cleanup 2025-11-13 15:22:49 -06:00
README.md feat: add multi DNS provider support for ACME challenges 2026-06-09 10:39:46 +07:00
serve.go use new SetQUICHeaders function 2024-10-14 05:41:30 -05:00

pages.gay

A static site server for git.gay's pages.gay service

usage

follow instructions on pages.gay!

selfhosting

selfhosting the pages.gay 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 https://git.gay/gitgay/pages
cd pages
go build

configuration is done through a .env file:

# the PAGES_DOMAIN should be just the domain, with no leading period:
PAGES_DOMAIN=pages.gay
FORGEJO_URL=https://git.gay
# FORGEJO_USER_URL is needed for generated repository links if FORGEJO_URL is a local address inaccessible by users
FORGEJO_USER_URL=https://git.gay
PORT=80
HTTPS_PORT=443

ACME_ACCEPT_TERMS=true
ACME_EMAIL=example@example.com
# mock ACME_DIRECTORY_URL, useful for testing:
# ACME_DIRECTORY_URL=https://acme.mock.directory/
# staging LetsEncrypt:
# ACME_DIRECTORY_URL=https://acme-staging-v02.api.letsencrypt.org/directory
# actual LetsEncrypt:
ACME_DIRECTORY_URL=https://acme-v02.api.letsencrypt.org/directory

# DNS provider for ACME DNS-01 challenges (wildcard certs).
# Supported values: cloudflare, porkbun, route53, hetzner, digitalocean,
# googleclouddns (or gcp), ovh, alidns (or alibaba/alicloud), powerdns,
# gandi, netcup, godaddy, inwx, duckdns, bunny, namecheap, technitium
# Defaults to "cloudflare" if not set.
DNS_PROVIDER=cloudflare

# --- Cloudflare ---
CLOUDFLARE_TOKEN=abcd1234

# --- Porkbun ---
# PORKBUN_KEY=
# PORKBUN_SECRET_KEY=

# --- Route53 (AWS) ---
# AWS_REGION=
# AWS_ACCESS_KEY_ID=
# AWS_SECRET_ACCESS_KEY=
# AWS_SESSION_TOKEN=

# --- Hetzner ---
# HETZNER_API_TOKEN=

# --- DigitalOcean ---
# DIGITALOCEAN_AUTH_TOKEN=

# --- Google Cloud DNS ---
# GCP_PROJECT=
# GCP_SERVICE_ACCOUNT_JSON=

# --- OVH ---
# OVH_ENDPOINT=
# OVH_APPLICATION_KEY=
# OVH_APPLICATION_SECRET=
# OVH_CONSUMER_KEY=

# --- AliDNS (Alibaba Cloud) ---
# ALIDNS_ACCESS_KEY_ID=
# ALIDNS_ACCESS_KEY_SECRET=
# ALIDNS_REGION_ID=

# --- PowerDNS ---
# POWERDNS_SERVER_URL=
# POWERDNS_SERVER_ID=
# POWERDNS_API_TOKEN=

# --- Gandi ---
# GANDI_BEARER_TOKEN=

# --- Netcup ---
# NETCUP_CUSTOMER_NUMBER=
# NETCUP_API_KEY=
# NETCUP_API_PASSWORD=

# --- GoDaddy ---
# GODADDY_API_TOKEN=

# --- INWX ---
# INWX_USERNAME=
# INWX_PASSWORD=
# INWX_SHARED_SECRET=

# --- DuckDNS ---
# DUCKDNS_TOKEN=

# --- Bunny ---
# BUNNY_API_KEY=

# --- Namecheap ---
# NAMECHEAP_API_KEY=
# NAMECHEAP_USER=
# NAMECHEAP_CLIENT_IP=

# --- Technitium DNS Server ---
# TECHNITIUM_API_TOKEN=
# TECHNITIUM_API_URL=

features

  • username.pages.gay pages
  • username.pages.gay/repo pages
  • custom domains
  • https support
  • auto-renewal of certificates
  • support SPAs with _redirects file
  • markdown rendering

license

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

made with ❤️ by besties