Skip to content

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 owner access to the Workspace. A member with viewer or editor access 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 main first. 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:

bash
limilake workspace domain add reports.apps.limilake.app --app reports --workspace finance

The 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:

bash
limilake workspace domain add share.apps.limilake.app --function candidate-share --workspace finance

Use your own hostnameLink to this section

  1. Add the hostname:

    bash
    limilake workspace domain add reports.example.com --app reports --workspace finance

    The command prints the two DNS records to create. The domain starts in pending_dns.

  2. Create both records in your DNS zone, exactly as add printed them:

    NameTypeValue
    reports.example.comCNAMEdomains.limilake.app
    _acme-challenge.reports.example.comCNAME<token>.dcv.limilake.app

    The 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 a CNAME, the first record is an A record instead:

    NameTypeValue
    example.comAthe IPv4 address that add prints
    _acme-challenge.example.comCNAME<token>.dcv.limilake.app

    Custom domains are served over IPv4 only. Remove any AAAA record on an apex hostname, or the check fails.

  3. Check the records and wait until the domain is active:

    bash
    limilake workspace domain verify reports.example.com --wait=20m --workspace finance

    LimiLake also checks on its own, so you can close the terminal and come back. --wait checks every 15 seconds and prints each status it passes through. Without a duration it waits 10 minutes. It exits 1 if the domain stops in error, and 6 if it is not active in time.

  4. 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:

bash
limilake workspace domain connect reports.example.com \
  --cloudflare-token-file ./cloudflare-token.txt --workspace finance

LimiLake 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.

StatusWhat it means for you
pending_dnsLimiLake has not seen both records yet, or one of them points somewhere else. Create or fix the records.
verifyingBoth records were seen once. LimiLake needs to see them on two checks in a row, from every public resolver it asks.
issuing_certOwnership is proven and LimiLake is getting a certificate. If this takes more than 30 minutes, the domain goes to error.
activeThe domain serves the App or Function over HTTPS.
errorThe domain stopped. The output explains why in plain words. See Troubleshooting.
removingYou 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/candidate reaches 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:

bash
limilake workspace domain edge reports.example.com cloudflare --workspace finance

You can also pass --edge cloudflare to add. In this mode:

  1. The command prints an edge secret once. No later command shows it again.
  2. In Cloudflare, create a request header Transform Rule that sets the X-Limilake-Edge-Secret header 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.
  3. The hostname record may be proxied. The _acme-challenge record must stay DNS only, so that it answers with its CNAME.

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

LimitValue
Your own hostnames per Tenant5
LimiLake subdomains per Tenant, counting those removed in the last 30 days10
Time to publish the DNS records after add72 hours
Time a removed LimiLake subdomain stays reserved for its Workspace30 days
Targets per domainOne 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

bash
limilake workspace domain remove reports.example.com --workspace finance

The 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.

SymptomLikely causeWhat to do
Stays in pending_dnsA 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_dnsThe 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_blockedA 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_failedThe 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_lostThe _acme-challenge record has been gone or changed for 72 hours.Publish it again, then run verify.
add refuses with custom_domain_limit_reachedThe Tenant has reached 5 own hostnames or 10 LimiLake subdomains.Remove a domain you no longer use.
add refuses with platform_limitLimiLake cannot take another external domain right now.Contact LimiLake support.

Next stepsLink to this section