[{"data":1,"prerenderedAt":220},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fself-hosting\u002Fplatform-administration":3,"github-stars":217},{"id":4,"title":5,"body":6,"description":207,"extension":208,"meta":209,"navigation":210,"order":211,"path":212,"section":213,"seo":214,"stem":215,"__hash__":216},"docs\u002Fdocs\u002Fself-hosting\u002Fplatform-administration.md","Platform administration",{"type":7,"value":8,"toc":200},"minimark",[9,13,22,27,30,68,75,89,93,104,140,143,147,150,187,196],[10,11,5],"h1",{"id":12},"platform-administration",[14,15,16,17,21],"p",{},"A self-hosted instance has an operator layer that sits above the businesses on\nit. A ",[18,19,20],"strong",{},"platform admin"," is a cross-tenant role - separate from the owner \u002F\nmember roles inside any one business - for whoever runs the server. It exists\nonly on self-hosted instances; on Clerq Cloud this is our job, and none of the\nUI below appears.",[23,24,26],"h2",{"id":25},"make-yourself-a-platform-admin","Make yourself a platform admin",[14,28,29],{},"The System Administration area requires an existing platform admin, and the\nfirst person to sign up cannot be one - so you bootstrap the first admin from\nthe command line. Create your account in the app the normal way, then, from the\nhost running the stack:",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-bash shiki shiki-themes github-dark","docker compose exec app node grant-admin.mjs you@example.com\n","bash","",[38,39,40],"code",{"__ignoreMap":36},[41,42,45,49,53,56,59,62,65],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"svObZ","docker",[41,50,52],{"class":51},"sU2Wk"," compose",[41,54,55],{"class":51}," exec",[41,57,58],{"class":51}," app",[41,60,61],{"class":51}," node",[41,63,64],{"class":51}," grant-admin.mjs",[41,66,67],{"class":51}," you@example.com\n",[14,69,70,71,74],{},"The command is idempotent, so running it twice is harmless. Once you are in, you\ncan promote anyone else from ",[18,72,73],{},"System Administration -> Users"," without touching\nthe shell again.",[76,77,78],"blockquote",{},[14,79,80,81,84,85,88],{},"Running from a source checkout instead of the published image? Use\n",[38,82,83],{},"pnpm admin:grant you@example.com",". Either way the account must already exist\nand ",[38,86,87],{},"DATABASE_URL"," must be set.",[23,90,92],{"id":91},"the-system-administration-area","The System Administration area",[14,94,95,96,99,100,103],{},"Platform admins get a ",[18,97,98],{},"System Administration"," entry in the navigation, at\n",[38,101,102],{},"\u002Fsystem-admin",". It has three parts:",[105,106,107,114,128],"ul",{},[108,109,110,113],"li",{},[18,111,112],{},"Overview"," - instance-wide, non-identifying stats: how many users and\nbusinesses exist, invoiced and expensed totals aggregated by currency, and\ntotal tracked time. Enough to see the shape of the instance, not to read\nanyone's books.",[108,115,116,119,120,123,124,127],{},[18,117,118],{},"Users"," - a searchable, paginated list. Open a user to ",[18,121,122],{},"suspend"," or\n",[18,125,126],{},"reactivate"," them, or to grant\u002Frevoke platform-admin rights.",[108,129,130,133,134,136,137,139],{},[18,131,132],{},"Businesses"," - the same for businesses: search the list, open one, and\n",[18,135,122],{}," or ",[18,138,126],{}," it.",[14,141,142],{},"Suspension is enforced on every request, not just hidden in the UI. A suspended\nuser sees a notice instead of the app; suspending a business locks out everyone\nin it until you reactivate it.",[23,144,146],{"id":145},"update-notifications","Update notifications",[14,148,149],{},"A self-hosted instance can tell you when a newer Clerq release is available. It\nchecks the public container registry at most once every six hours, times out\nquietly if the host has no internet access, and shows a dismissible banner in the\napp header when the running version is behind.",[105,151,152,169,180],{},[108,153,154,155,158,159,162,163,168],{},"Checks are ",[18,156,157],{},"on by default"," and can be toggled under ",[18,160,161],{},"Settings -> System","\n(the \"Check for updates\" control), which is gated behind the\n",[18,164,165],{},[38,166,167],{},"settings.manageUpdates"," permission. The System tab, like this whole area,\nappears only on self-hosted instances.",[108,170,171,172,175,176,179],{},"The running version is baked into released images at build time via the\n",[38,173,174],{},"CLERQ_VERSION"," build argument, so official ",[38,177,178],{},"ghcr.io\u002Fpunterdigital\u002Fclerq","\nimages know which release they are. Local and development builds carry no\nversion and skip the check entirely.",[108,181,182,183,186],{},"The managed cloud host (",[38,184,185],{},"app.useclerq.net",") never checks or prompts - it is\nkept current for you.",[14,188,189,190,195],{},"When a check reports a newer version, upgrade with the steps in\n",[191,192,194],"a",{"href":193},"\u002Fdocs\u002Fself-hosting\u002Fbackups-and-upgrades#upgrade","Backups & upgrades",".",[197,198,199],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":36,"searchDepth":201,"depth":201,"links":202},3,[203,205,206],{"id":25,"depth":204,"text":26},2,{"id":91,"depth":204,"text":92},{"id":145,"depth":204,"text":146},"Operate a self-hosted instance - bootstrap a platform admin, moderate users and businesses, and control update checks.","md",{},true,6,"\u002Fdocs\u002Fself-hosting\u002Fplatform-administration","Self-hosting",{"title":5,"description":207},"docs\u002Fself-hosting\u002Fplatform-administration","XF5uKsCkNp-NiwJaCEdlHsfGLclqVc530tj-5ZsxWjY",{"stars":218,"repo":219},0,"PunterDigital\u002Fclerq",1784716910664]