Skip to content

Custom domain support#63

Merged
FluxCapacitor2 merged 9 commits into
mainfrom
custom-domain-support
May 7, 2026
Merged

Custom domain support#63
FluxCapacitor2 merged 9 commits into
mainfrom
custom-domain-support

Conversation

@FluxCapacitor2
Copy link
Copy Markdown
Collaborator

@FluxCapacitor2 FluxCapacitor2 commented May 4, 2026

Notable changes:

  • Users can now add custom domains to their apps from the Domains tab on the app page
  • Custom domains need to be verified by adding a TXT record and an A record (for top-level domains) or a CNAME record (for subdomains)
  • Once verified, we use an ACME client to generate a certificate for the domain. (The most popular ACME service is Let's Encrypt, from the creators of the protocol)
  • This process uses the HTTP-01 challenge. The ACME server sends a request to http://(the custom domain)/.well-known/acme-challenge/(token), and we need to respond with the value that it's expecting to pass the challenge. Once we pass the challenge, we can generate a certificate.
  • The certificate is added as a K8s secret in the user's namespace. It isn't stored in the DB anywhere.
  • Certificate validity periods are checked daily in a CronJob. If less than 1/3 of the lifespan is remaining, the certificate is regenerated.
  • Cached values can now be optionally encrypted using the same setup as encrypted environment variables. We use this for the ACME accounts, since they're identified by a public-private keypair that should be kept secret.
  • The Tilt setup now optionally includes Pebble, an ACME server for local development. After running the setup shell script and setting enable_pebble to True, you should be able to generate certificates for custom domains locally.

To do:

  • Deleting domains
  • Update staging and prod values files to include the right CNAME domain and ACME server URL
  • Test on staging

@FluxCapacitor2 FluxCapacitor2 merged commit 47a51a2 into main May 7, 2026
4 checks passed
@FluxCapacitor2 FluxCapacitor2 deleted the custom-domain-support branch May 7, 2026 05:59
FluxCapacitor2 added a commit that referenced this pull request May 9, 2026
* Update builder images to Ubuntu 26.04 LTS (#48)

* Add support for custom domains

* Run npm audit fix

* Fix lockfile by installing on more recent NPM version

* Allow users to delete domains

* Run npm audit fix

* Prefer 1.1.1.1 for DNS lookups

* Use regular DNS queries instead of ANY

Turns out it's considered harmful?
https://blog.cloudflare.com/deprecating-dns-any-meta-query-type/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant