[{"data":1,"prerenderedAt":31},["ShallowReactive",2],{"doc-custom-domains":3},{"html":4,"headings":5},"\u003Cp>Serve a project's public pages on your own domain: \u003Ccode>feedback.lightbites.app\u003C\u002Fcode> for the feedback board,\n\u003Ccode>change.lightbites.app\u003C\u002Fcode> for the changelog, \u003Ccode>blog.lightbites.app\u003C\u002Fcode> for the blog. Visitors never see the HelpBites\naddress; the pages, the embeds and the public API answer on your host.\u003C\u002Fp>\n\u003Cp>Community installs get this with no limits. On HelpBites Cloud it is part of the Pro plan\n(\u003Ccode>customPublicDomain\u003C\u002Fcode>). Editing and verifying domains needs the \u003Ccode>projects.manage\u003C\u002Fcode> permission.\u003C\u002Fp>\n\u003Ch2 id=\"how-it-works\">How it works\u003Ca class=\"heading-anchor\" href=\"#how-it-works\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Col>\n\u003Cli>\n\u003Cp>\u003Cstrong>Add a host\u003C\u002Fstrong> in \u003Cem>Project → Settings → Custom domains\u003C\u002Fem>, and pick what its root (\u003Ccode>\u002F\u003C\u002Fcode>) opens: the public hub,\nthe feedback board, the roadmap, the changelog or the blog.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Add two DNS records\u003C\u002Fstrong> where your domain's DNS lives:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Type\u003C\u002Fth>\n\u003Cth>Name\u003C\u002Fth>\n\u003Cth>Value\u003C\u002Fth>\n\u003Cth>Why\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>TXT\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>_helpbites.feedback.lightbites.app\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>helpbites-verify=&lt;token&gt;\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Proves the host is yours. Nobody else can add it once you have.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>CNAME\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>feedback.lightbites.app\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>your HelpBites host (for example \u003Ccode>support.yourdomain.com\u003C\u002Fcode>)\u003C\u002Ftd>\n\u003Ctd>Sends visitors here.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>A bare domain (\u003Ccode>lightbites.app\u003C\u002Fcode>) cannot hold a CNAME. Use your DNS provider's ALIAS\u002FANAME record, or an \u003Ccode>A\u003C\u002Fcode>\nrecord to the address in \u003Ccode>CUSTOM_DOMAIN_IP\u003C\u002Fcode> (the panel shows the right one when the server has it set).\nKeep the record \u003Cstrong>DNS only\u003C\u002Fstrong>: a proxy such as Cloudflare's orange cloud hides the target from the check and\ngets its own certificate.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Check DNS.\u003C\u002Fstrong> When both records are found the host is \u003Cem>Live\u003C\u002Fem>. DNS can take a few minutes to spread: check\nagain. A certificate is issued by your reverse proxy the first time the host is visited (see\n\u003Ca href=\"#certificates\">Certificates\u003C\u002Fa>).\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Every public page is reachable under every host of the project, so \u003Ccode>feedback.lightbites.app\u002Fchangelog\u003C\u002Fcode> works too;\nthe target only chooses what \u003Ccode>\u002F\u003C\u002Fcode> shows. The panel, its login and the admin API are \u003Cstrong>not\u003C\u002Fstrong> served on a custom\nhost (they answer \u003Ccode>404\u003C\u002Fcode>).\u003C\u002Fp>\n\u003Ch2 id=\"what-changes-on-the-page\">What changes on the page\u003Ca class=\"heading-anchor\" href=\"#what-changes-on-the-page\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\n\u003Cp>Links the page builds for itself (the blog's canonical URL and sitemap, the legal page's language links, the\nhub's section links, pricing return links) use your host.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Scripts load from your host. Replace the HelpBites host in a snippet with yours and nothing else changes:\u003C\u002Fp>\n\u003Cdiv class=\"code-block\">\u003Cbutton type=\"button\" class=\"copy-btn\" data-copy aria-label=\"Copy to clipboard\">Copy\u003C\u002Fbutton>\u003Cpre class=\"shj-lang-html\">\u003Ccode>\u003Cspan class=\"shj-syn-var\">\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">&lt;\u003C\u002Fspan>\u003Cspan class=\"shj-syn-var\">script\u003C\u002Fspan> \u003Cspan class=\"shj-syn-class\">src\u003C\u002Fspan>\u003Cspan class=\"shj-syn-str\">\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">=\u003C\u002Fspan>\u003Cspan class=\"shj-syn-str\">\"https:\u002F\u002Ffeedback.lightbites.app\u002Ffeedback.js\"\u003C\u002Fspan> \u003Cspan class=\"shj-syn-class\">data-project\u003C\u002Fspan>\u003Cspan class=\"shj-syn-str\">\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">=\u003C\u002Fspan>\u003Cspan class=\"shj-syn-str\">\"pk_…\"\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">&gt;\u003C\u002Fspan>\u003Cspan class=\"shj-syn-var\">\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">&lt;\u002F\u003C\u002Fspan>\u003Cspan class=\"shj-syn-var\">script\u003C\u002Fspan>\u003Cspan class=\"shj-syn-oper\">&gt;\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>Forms and checkout return links accept your host as &quot;this site&quot; without adding it to the project's allowed\norigins.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Mail still links to the main HelpBites host.\u003C\u002Fstrong> Unsubscribe and confirmation links, and the legal links that\nare saved on the project for email, use \u003Ccode>APP_URL\u003C\u002Fcode>.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"certificates\">Certificates\u003Ca class=\"heading-anchor\" href=\"#certificates\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>HelpBites checks the DNS; your reverse proxy gets the certificate. With the bundled Caddy (the \u003Ccode>proxy\u003C\u002Fcode> profile)\nthere is nothing to do: \u003Ccode>Caddyfile\u003C\u002Fcode> asks \u003Ccode>GET \u002Fv1\u002Finternal\u002Fdomain-check?domain=&lt;host&gt;\u003C\u002Fcode> before it requests a\ncertificate, and the app answers \u003Ccode>200\u003C\u002Fcode> only for verified hosts, so no one can make your server request\ncertificates for hosts you did not register.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\">\u003Cbutton type=\"button\" class=\"copy-btn\" data-copy aria-label=\"Copy to clipboard\">Copy\u003C\u002Fbutton>\u003Cpre class=\"shj-lang-plain\">\u003Ccode>{\n\ton_demand_tls {\n\t\task http:\u002F\u002Fapp:3000\u002Fv1\u002Finternal\u002Fdomain-check\n\t}\n}\n\nhttps:\u002F\u002F {\n\ttls { on_demand }\n\t@root path \u002F\n\trewrite @root \u002F_domain\n\treverse_proxy app:3000 { flush_interval -1 }\n}\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>Other proxies need the same two things: a certificate for each verified host (ask the endpoint above, or add\nthe host by hand), and \u003Ccode>\u002F\u003C\u002Fcode> sent to \u003Ccode>\u002F_domain\u003C\u002Fcode> for hosts other than your main one (the home page is a static file,\nwhich the app cannot redirect by itself). \u003Ccode>X-Forwarded-Host\u003C\u002Fcode> (or \u003Ccode>Host\u003C\u002Fcode>) must reach the app unchanged.\u003C\u002Fp>\n\u003Ch2 id=\"settings-on-the-server\">Settings on the server\u003Ca class=\"heading-anchor\" href=\"#settings-on-the-server\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Variable\u003C\u002Fth>\n\u003Cth>Meaning\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>\u003Ccode>CUSTOM_DOMAIN_TARGET\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The host the CNAME must point at. Default: the host of \u003Ccode>APP_URL\u003C\u002Fcode>.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>CUSTOM_DOMAIN_IP\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>An address for bare-domain \u003Ccode>A\u003C\u002Fcode> records. Optional.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>CUSTOM_DOMAIN_RESERVED\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Comma-separated suffixes nobody may claim (\u003Ccode>helpbites.app,example.dev\u003C\u002Fcode>). \u003Ccode>APP_URL\u003C\u002Fcode>, \u003Ccode>ADMIN_URL\u003C\u002Fcode> and the target are always reserved.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Ch2 id=\"limits\">Limits\u003Ca class=\"heading-anchor\" href=\"#limits\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>5 domains per project; a host belongs to one project, anywhere on the server.\u003C\u002Fli>\n\u003Cli>30 hosts added per workspace per hour; 10 DNS checks a minute per host.\u003C\u002Fli>\n\u003Cli>A verified host is not re-checked: if you move the domain away, remove it here.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"api\">API\u003Ca class=\"heading-anchor\" href=\"#api\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>All calls need an operator session or an \u003Ccode>ak_\u003C\u002Fcode> admin key (\u003Ccode>Authorization: Bearer ak_…\u003C\u002Fcode>).\u003C\u002Fp>\n\u003Cdiv class=\"code-block\">\u003Cbutton type=\"button\" class=\"copy-btn\" data-copy aria-label=\"Copy to clipboard\">Copy\u003C\u002Fbutton>\u003Cpre class=\"shj-lang-bash\">\u003Ccode>\u003Cspan class=\"shj-syn-cmnt\"># Add feedback.lightbites.app, opening on the feedback board\u003C\u002Fspan>\n\u003Cspan class=\"shj-syn-func\">curl\u003C\u002Fspan>\u003Cspan class=\"shj-syn-kwd\"> -X\u003C\u002Fspan> POST https:\u002F\u002Fhelp.example.com\u002Fv1\u002Fadmin\u002Fprojects\u002FPROJECT_ID\u002Fdomains \\\n \u003Cspan class=\"shj-syn-kwd\"> -H\u003C\u002Fspan> \u003Cspan class=\"shj-syn-str\">\"Authorization: Bearer \u003C\u002Fspan>\u003Cspan class=\"shj-syn-var\">$HELPBITES_ADMIN_KEY\u003C\u002Fspan>\u003Cspan class=\"shj-syn-str\">\"\u003C\u002Fspan>\u003Cspan class=\"shj-syn-kwd\"> -H\u003C\u002Fspan> \u003Cspan class=\"shj-syn-str\">\"Content-Type: application\u002Fjson\"\u003C\u002Fspan> \\\n \u003Cspan class=\"shj-syn-kwd\"> -d\u003C\u002Fspan> \u003Cspan class=\"shj-syn-str\">'{\"host\":\"feedback.lightbites.app\",\"target\":\"feedback\"}'\u003C\u002Fspan>\n\u003Cspan class=\"shj-syn-cmnt\"># → { \"domain\": { \"id\": \"…\", \"host\": \"…\", \"state\": \"pending\", \"dnsRecords\": [ { \"type\": \"TXT\", … }, { \"type\": \"CNAME\", … } ] } }\u003C\u002Fspan>\n\n\u003Cspan class=\"shj-syn-cmnt\"># Check the DNS\u003C\u002Fspan>\n\u003Cspan class=\"shj-syn-func\">curl\u003C\u002Fspan>\u003Cspan class=\"shj-syn-kwd\"> -X\u003C\u002Fspan> POST https:\u002F\u002Fhelp.example.com\u002Fv1\u002Fadmin\u002Fprojects\u002FPROJECT_ID\u002Fdomains\u002FDOMAIN_ID\u002Fverify \\\n \u003Cspan class=\"shj-syn-kwd\"> -H\u003C\u002Fspan> \u003Cspan class=\"shj-syn-str\">\"Authorization: Bearer \u003C\u002Fspan>\u003Cspan class=\"shj-syn-var\">$HELPBITES_ADMIN_KEY\u003C\u002Fspan>\u003Cspan class=\"shj-syn-str\">\"\u003C\u002Fspan>\n\n\u003Cspan class=\"shj-syn-cmnt\"># List, change what \"\u002F\" shows, remove\u003C\u002Fspan>\n\u003Cspan class=\"shj-syn-func\">curl\u003C\u002Fspan> https:\u002F\u002Fhelp.example.com\u002Fv1\u002Fadmin\u002Fprojects\u002FPROJECT_ID\u002Fdomains\u003Cspan class=\"shj-syn-kwd\"> -H\u003C\u002Fspan> \u003Cspan class=\"shj-syn-str\">\"Authorization: Bearer \u003C\u002Fspan>\u003Cspan class=\"shj-syn-var\">$HELPBITES_ADMIN_KEY\u003C\u002Fspan>\u003Cspan class=\"shj-syn-str\">\"\u003C\u002Fspan>\n\u003Cspan class=\"shj-syn-func\">curl\u003C\u002Fspan>\u003Cspan class=\"shj-syn-kwd\"> -X\u003C\u002Fspan> PATCH …\u002Fdomains\u002FDOMAIN_ID\u003Cspan class=\"shj-syn-kwd\"> -H\u003C\u002Fspan> \u003Cspan class=\"shj-syn-str\">\"Authorization: Bearer \u003C\u002Fspan>\u003Cspan class=\"shj-syn-var\">$HELPBITES_ADMIN_KEY\u003C\u002Fspan>\u003Cspan class=\"shj-syn-str\">\"\u003C\u002Fspan>\u003Cspan class=\"shj-syn-kwd\"> -H\u003C\u002Fspan> \u003Cspan class=\"shj-syn-str\">\"Content-Type: application\u002Fjson\"\u003C\u002Fspan>\u003Cspan class=\"shj-syn-kwd\"> -d\u003C\u002Fspan> \u003Cspan class=\"shj-syn-str\">'{\"target\":\"changelog\"}'\u003C\u002Fspan>\n\u003Cspan class=\"shj-syn-func\">curl\u003C\u002Fspan>\u003Cspan class=\"shj-syn-kwd\"> -X\u003C\u002Fspan> DELETE …\u002Fdomains\u002FDOMAIN_ID\u003Cspan class=\"shj-syn-kwd\"> -H\u003C\u002Fspan> \u003Cspan class=\"shj-syn-str\">\"Authorization: Bearer \u003C\u002Fspan>\u003Cspan class=\"shj-syn-var\">$HELPBITES_ADMIN_KEY\u003C\u002Fspan>\u003Cspan class=\"shj-syn-str\">\"\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n\u003Cp>\u003Ccode>state\u003C\u002Fcode> is \u003Ccode>pending\u003C\u002Fcode> (never checked), \u003Ccode>verified\u003C\u002Fcode> or \u003Ccode>failed\u003C\u002Fcode>; each record in \u003Ccode>dnsRecords\u003C\u002Fcode> has \u003Ccode>valid\u003C\u002Fcode>:\n\u003Ccode>valid\u003C\u002Fcode>, \u003Ccode>invalid\u003C\u002Fcode> or \u003Ccode>unknown\u003C\u002Fcode>. Errors: \u003Ccode>400\u003C\u002Fcode> (not a domain, reserved, too many), \u003Ccode>402\u003C\u002Fcode> (the plan has no custom\ndomains), \u003Ccode>409\u003C\u002Fcode> (the host is taken).\u003C\u002Fp>\n\u003Ch2 id=\"in-a-web-page\">In a web page\u003Ca class=\"heading-anchor\" href=\"#in-a-web-page\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Nothing to build: the embeds take their address from the script tag (see above). A page of your own can call the\npublic API on the host (\u003Ccode>https:\u002F\u002Ffeedback.lightbites.app\u002Fv1\u002Ffeedback?pk=pk_…\u003C\u002Fcode>); CORS is open on \u003Ccode>\u002Fv1\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"in-a-swift-app\">In a Swift app\u003Ca class=\"heading-anchor\" href=\"#in-a-swift-app\" aria-label=\"Link to this section\">#\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Keep the host in one place and every public call follows it; the project key is still the only credential.\u003C\u002Fp>\n\u003Cdiv class=\"code-block\">\u003Cbutton type=\"button\" class=\"copy-btn\" data-copy aria-label=\"Copy to clipboard\">Copy\u003C\u002Fbutton>\u003Cpre class=\"shj-lang-plain\">\u003Ccode>import SwiftUI\n\nstruct Roadmap: View {\n    var host = URL(string: \u003Cspan class=\"shj-syn-str\">\"https:\u002F\u002Ffeedback.lightbites.app\"\u003C\u002Fspan>)!   \u002F\u002F or your HelpBites host\n    var publicKey = \u003Cspan class=\"shj-syn-str\">\"pk_…\"\u003C\u002Fspan>\n    var accent = Color.accentColor\n    var cornerRadius: CGFloat = 12\n    @State private var titles: [String] = []\n\n    var body: some View {\n        List(titles, id: \\.self) { Text($0) }\n            .tint(accent)\n            .task {\n                var parts = URLComponents(url: host.appending(path: \u003Cspan class=\"shj-syn-str\">\"v1\u002Ffeedback\"\u003C\u002Fspan>), resolvingAgainstBaseURL: false)!\n                parts.queryItems = [.init(name: \u003Cspan class=\"shj-syn-str\">\"pk\"\u003C\u002Fspan>, value: publicKey), .init(name: \u003Cspan class=\"shj-syn-str\">\"view\"\u003C\u002Fspan>, value: \u003Cspan class=\"shj-syn-str\">\"roadmap\"\u003C\u002Fspan>)]\n                struct Reply: Decodable { struct Post: Decodable { let title: String }; let posts: [Post] }\n                if let (data, _) = try? await URLSession.shared.data(from: parts.url!),\n                   let reply = try? JSONDecoder().decode(Reply.self, from: data) { titles = reply.posts.map(\\.title) }\n            }\n    }\n}\u003C\u002Fcode>\u003C\u002Fpre>\u003C\u002Fdiv>\n",[6,10,13,16,19,22,25,28],{"id":7,"text":8,"level":9},"how-it-works","How it works",2,{"id":11,"text":12,"level":9},"what-changes-on-the-page","What changes on the page",{"id":14,"text":15,"level":9},"certificates","Certificates",{"id":17,"text":18,"level":9},"settings-on-the-server","Settings on the server",{"id":20,"text":21,"level":9},"limits","Limits",{"id":23,"text":24,"level":9},"api","API",{"id":26,"text":27,"level":9},"in-a-web-page","In a web page",{"id":29,"text":30,"level":9},"in-a-swift-app","In a Swift app",1794596525501]