Build
Custom domains
Serve a published App, or a Function's HTTP routes, on a LimiLake subdomain or on a hostname you own.
A custom domain is another address for one published App, or for the HTTP
routes of one Function, in your Workspace. You can use a LimiLake subdomain
such as reports.apps.limilake.app, which works at once, or a hostname you
own, such as reports.example.com, which needs two DNS records.
The examples use a Workspace named finance and an App named reports.
Before you startLink to this section
- You need
owneraccess to the Workspace. A member withvieweroreditoraccess gets exit code 5 from these commands, and someone who is not a member gets exit code 4. - The App must be published: push it to
mainfirst. A Function must declare at least one HTTP route. - For your own hostname, you need to be able to add records in its DNS zone.
You run every step with limilake workspace domain. Owners also see a
Custom domains card on the Workspace's settings page in LimiLake.
Use a LimiLake subdomainLink to this section
Add a name under apps.limilake.app. It is active at once and needs no DNS:
limilake workspace domain add reports.apps.limilake.app --app reports --workspace financeThe name is one label of 3 to 40 characters: lowercase letters, digits and
inner hyphens. A few platform names, such as www, api and admin, are
reserved. To serve a Function instead, pass --function with its name as
limilake function list shows it:
limilake workspace domain add share.apps.limilake.app --function candidate-share --workspace financeUse your own hostnameLink to this section
-
Add the hostname:
bashlimilake workspace domain add reports.example.com --app reports --workspace financeThe command prints the two DNS records to create. The domain starts in
pending_dns. -
Create both records in your DNS zone, exactly as
addprinted them:Name Type Value reports.example.comCNAMEdomains.limilake.app_acme-challenge.reports.example.comCNAME<token>.dcv.limilake.appThe token in the second record is new for every domain you add, so copy it from the output. To read the records again, run
limilake workspace domain show reports.example.com --workspace finance.For an apex domain such as
example.com, which cannot have aCNAME, the first record is anArecord instead:Name Type Value example.comAthe IPv4 address that addprints_acme-challenge.example.comCNAME<token>.dcv.limilake.appCustom domains are served over IPv4 only. Remove any
AAAArecord on an apex hostname, or the check fails. -
Check the records and wait until the domain is active:
bashlimilake workspace domain verify reports.example.com --wait=20m --workspace financeLimiLake also checks on its own, so you can close the terminal and come back.
--waitchecks every 15 seconds and prints each status it passes through. Without a duration it waits 10 minutes. It exits 1 if the domain stops inerror, and 6 if it is not active in time. -
Open
https://reports.example.com.
If you do not publish the records within 72 hours of add, the claim expires,
the domain is removed and the hostname is free again.
Publish the records through CloudflareLink to this section
If the zone is on Cloudflare, LimiLake can create both records for you with a Cloudflare API token that has Zone Read and DNS Edit on that zone. Keep the token in a file and pass the file:
limilake workspace domain connect reports.example.com \
--cloudflare-token-file ./cloudflare-token.txt --workspace financeLimiLake uses the token for this one request and never stores it. The
command lists each record as created, updated or unchanged, then checks
the records at once. If other records are in the way at the same names, it
refuses with record_conflict and lists them. Add --replace to replace
them. At the hostname itself it replaces only A, AAAA and CNAME records,
never MX or TXT. At _acme-challenge.<host> it also replaces a TXT
record, such as one another certificate tool left there. Passing the token
itself as a flag value is refused.
StatusesLink to this section
limilake workspace domain list --workspace finance shows every domain of the
Workspace with its status. show adds the last thing the DNS check saw.
| Status | What it means for you |
|---|---|
pending_dns | LimiLake has not seen both records yet, or one of them points somewhere else. Create or fix the records. |
verifying | Both records were seen once. LimiLake needs to see them on two checks in a row, from every public resolver it asks. |
issuing_cert | Ownership is proven and LimiLake is getting a certificate. If this takes more than 30 minutes, the domain goes to error. |
active | The domain serves the App or Function over HTTPS. |
error | The domain stopped. The output explains why in plain words. See Troubleshooting. |
removing | You removed the domain and LimiLake is cleaning up. It no longer serves. |
A LimiLake subdomain goes straight to active.
What visitors seeLink to this section
The domain serves the same App with the same access:
- A members App still asks visitors to sign in with LimiLake.
- A public App opens for anyone, with no sign-in.
- A Function domain passes each request path to the Function's routes, so
https://share.example.com/candidatereaches a route declared as@fn.post("/candidate"). Paths under/__limilake/are not passed on. Cookies are not forwarded to the Function.
An App on your own hostname shares that domain with your other sites: cookies you set for the parent domain also reach the App. Do not keep secrets in an App's browser storage. A later owner of the same address could read what visitors' browsers kept.
Put Cloudflare's proxy in frontLink to this section
By default (--edge direct), your DNS points straight at LimiLake. This is
the recommended setup. If you want Cloudflare to proxy the hostname, switch
the domain to Cloudflare edge mode:
limilake workspace domain edge reports.example.com cloudflare --workspace financeYou can also pass --edge cloudflare to add. In this mode:
- The command prints an edge secret once. No later command shows it again.
- In Cloudflare, create a request header Transform Rule that sets the
X-Limilake-Edge-Secretheader to that secret on requests to the hostname. With it,limilake.client_address()in a Function returns the visitor's address instead of Cloudflare's. - The hostname record may be proxied. The
_acme-challengerecord must stay DNS only, so that it answers with itsCNAME.
To get a new secret, run the same edge ... cloudflare command again and
update the Transform Rule. To go back, run edge reports.example.com direct.
Edge mode is only for your own hostnames, not for LimiLake subdomains.
LimitsLink to this section
| Limit | Value |
|---|---|
| Your own hostnames per Tenant | 5 |
| LimiLake subdomains per Tenant, counting those removed in the last 30 days | 10 |
Time to publish the DNS records after add | 72 hours |
| Time a removed LimiLake subdomain stays reserved for its Workspace | 30 days |
| Targets per domain | One App or one Function |
A hostname can belong to only one domain on LimiLake. If any Tenant already
uses it, add refuses it with hostname_unavailable.
Remove a domainLink to this section
limilake workspace domain remove reports.example.com --workspace financeThe domain stops serving at once. The command asks for confirmation; add
--yes to skip it. Then delete the two DNS records.
A removed LimiLake subdomain stays reserved for its Workspace for 30 days: only that Workspace can add it again, and it still counts toward the subdomain limit until then.
TroubleshootingLink to this section
Run limilake workspace domain show <hostname> first: it shows the status,
the error reason and what the last DNS check saw.
| Symptom | Likely cause | What to do |
|---|---|---|
Stays in pending_dns | A record is missing, has a typo, or has not reached the public resolvers yet. | Compare your records with show, wait for your DNS provider, then run verify. |
Stays in pending_dns | The hostname is a CNAME to another target, or an apex hostname has other A or any AAAA records. | Point the hostname only at the value show lists. |
Stays in pending_dns | _acme-challenge is a TXT record or a CNAME with an old token. | Replace it with the CNAME that show lists. A domain you removed and added again has a new token. |
error with caa_blocked | A CAA record on the hostname or a parent domain does not allow letsencrypt.org. | Add CAA 0 issue "letsencrypt.org". LimiLake checks again on its own. |
error with issuance_failed | The certificate was not issued within 30 minutes, or could not be renewed. | Check the _acme-challenge record, then run verify. LimiLake does not retry this on its own. |
error with ownership_lost | The _acme-challenge record has been gone or changed for 72 hours. | Publish it again, then run verify. |
add refuses with custom_domain_limit_reached | The Tenant has reached 5 own hostnames or 10 LimiLake subdomains. | Remove a domain you no longer use. |
add refuses with platform_limit | LimiLake cannot take another external domain right now. | Contact LimiLake support. |
Next stepsLink to this section
- Apps: members Apps, public Apps and their limits.
- Functions: declare HTTP routes. Read the visitor's address
with
limilake.client_address(). - Templates: start a new App from a template.
- CLI command reference: every
limilake workspace domainflag.