[{"data":1,"prerenderedAt":4505},["ShallowReactive",2],{"navigation_docs":3,"-run-coolify":613,"-run-coolify-surround":4502},[4,39,101,378,540,562,584,606],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":38},"Start","i-lucide-rocket","\u002Fstart","1.start",[10,14,18,22,26,30,34],{"title":11,"path":12,"stem":13},"Our approach","\u002Fstart\u002Four-approach","1.start\u002F0.our-approach",{"title":15,"path":16,"stem":17},"Introduction","\u002Fstart\u002Fintroduction","1.start\u002F1.introduction",{"title":19,"path":20,"stem":21},"Concepts","\u002Fstart\u002Fconcepts","1.start\u002F2.concepts",{"title":23,"path":24,"stem":25},"Glossary","\u002Fstart\u002Fglossary","1.start\u002F3.glossary",{"title":27,"path":28,"stem":29},"Try it locally","\u002Fstart\u002Ftry-it-locally","1.start\u002F4.try-it-locally",{"title":31,"path":32,"stem":33},"Features","\u002Fstart\u002Ffeatures","1.start\u002F5.features",{"title":35,"path":36,"stem":37},"Questions","\u002Fstart\u002Ffaq","1.start\u002F6.faq",false,{"title":40,"icon":41,"path":42,"stem":43,"children":44,"page":38},"Run SHADE","i-lucide-server","\u002Frun","2.run",[45,49,53,57,61,65,69,73,77,81,85,89,93,97],{"title":46,"path":47,"stem":48},"Setting up an instance (Coolify)","\u002Frun\u002Fcoolify","2.run\u002F1.coolify",{"title":50,"path":51,"stem":52},"Console commands","\u002Frun\u002Fconsole","2.run\u002F10.console",{"title":54,"path":55,"stem":56},"Rotating APP_SECRET","\u002Frun\u002Frotating-app-secret","2.run\u002F11.rotating-app-secret",{"title":58,"path":59,"stem":60},"Checking an instance","\u002Frun\u002Fdoctor","2.run\u002F12.doctor",{"title":62,"path":63,"stem":64},"Self-hosting by hand","\u002Frun\u002Fown-server-by-hand","2.run\u002F13.own-server-by-hand",{"title":66,"path":67,"stem":68},"NixOS (experimental)","\u002Frun\u002Fnixos","2.run\u002F14.nixos",{"title":70,"path":71,"stem":72},"Self-hosting without Coolify","\u002Frun\u002Fown-server","2.run\u002F2.own-server",{"title":74,"path":75,"stem":76},"Hosting the site on a static host","\u002Frun\u002Fstatic-hosts","2.run\u002F3.static-hosts",{"title":78,"path":79,"stem":80},"Licence","\u002Frun\u002Flicence","2.run\u002F4.licence",{"title":82,"path":83,"stem":84},"Updating and backups","\u002Frun\u002Fupdating-and-backups","2.run\u002F5.updating-and-backups",{"title":86,"path":87,"stem":88},"Troubleshooting","\u002Frun\u002Ftroubleshooting","2.run\u002F6.troubleshooting",{"title":90,"path":91,"stem":92},"Logs, request ids, traces and metrics","\u002Frun\u002Flogs","2.run\u002F7.logs",{"title":94,"path":95,"stem":96},"Maintenance mode","\u002Frun\u002Fmaintenance-mode","2.run\u002F8.maintenance-mode",{"title":98,"path":99,"stem":100},"Usage limits","\u002Frun\u002Fusage-limits","2.run\u002F9.usage-limits",{"title":102,"icon":103,"path":104,"stem":105,"children":106},"Guide","i-lucide-book-open","\u002Fguide","3.guide",[107,109,147,192,210,280,310,364],{"title":102,"path":104,"stem":108},"3.guide\u002Findex",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":38},"Content","i-lucide-file-text","\u002Fguide\u002Fcontent","3.guide\u002F1.content",[115,119,123,127,131,135,139,143],{"title":116,"path":117,"stem":118},"Collections and entries","\u002Fguide\u002Fcontent\u002Fcollections","3.guide\u002F1.content\u002F1.collections",{"title":120,"path":121,"stem":122},"Field types","\u002Fguide\u002Fcontent\u002Ffields","3.guide\u002F1.content\u002F2.fields",{"title":124,"path":125,"stem":126},"Drafts, publishing and version history","\u002Fguide\u002Fcontent\u002Fversions","3.guide\u002F1.content\u002F3.versions",{"title":128,"path":129,"stem":130},"Languages","\u002Fguide\u002Fcontent\u002Flanguages","3.guide\u002F1.content\u002F4.languages",{"title":132,"path":133,"stem":134},"Data sources","\u002Fguide\u002Fcontent\u002Fdata-sources","3.guide\u002F1.content\u002F5.data-sources",{"title":136,"path":137,"stem":138},"Media","\u002Fguide\u002Fcontent\u002Fmedia","3.guide\u002F1.content\u002F6.media",{"title":140,"path":141,"stem":142},"Search","\u002Fguide\u002Fcontent\u002Fsearch","3.guide\u002F1.content\u002F7.search",{"title":144,"path":145,"stem":146},"Trash","\u002Fguide\u002Fcontent\u002Ftrash","3.guide\u002F1.content\u002F8.trash",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":38},"Website","i-lucide-globe","\u002Fguide\u002Fwebsite","3.guide\u002F2.website",[153,156,160,164,168,172,176,180,184,188],{"title":148,"path":154,"stem":155},"\u002Fguide\u002Fwebsite\u002Fwebsite","3.guide\u002F2.website\u002F1.website",{"title":157,"path":158,"stem":159},"Scroll scenes","\u002Fguide\u002Fwebsite\u002Fscroll-scenes","3.guide\u002F2.website\u002F10.scroll-scenes",{"title":161,"path":162,"stem":163},"Pages and posts","\u002Fguide\u002Fwebsite\u002Fpages","3.guide\u002F2.website\u002F2.pages",{"title":165,"path":166,"stem":167},"The visual editor","\u002Fguide\u002Fwebsite\u002Fvisual-editor","3.guide\u002F2.website\u002F3.visual-editor",{"title":169,"path":170,"stem":171},"Roles and locks","\u002Fguide\u002Fwebsite\u002Froles-and-locks","3.guide\u002F2.website\u002F4.roles-and-locks",{"title":173,"path":174,"stem":175},"Header and footer","\u002Fguide\u002Fwebsite\u002Fheader-and-footer","3.guide\u002F2.website\u002F5.header-and-footer",{"title":177,"path":178,"stem":179},"Theme","\u002Fguide\u002Fwebsite\u002Ftheme","3.guide\u002F2.website\u002F6.theme",{"title":181,"path":182,"stem":183},"Redirects","\u002Fguide\u002Fwebsite\u002Fredirects","3.guide\u002F2.website\u002F7.redirects",{"title":185,"path":186,"stem":187},"Site settings","\u002Fguide\u002Fwebsite\u002Fsite-settings","3.guide\u002F2.website\u002F8.site-settings",{"title":189,"path":190,"stem":191},"The site","\u002Fguide\u002Fwebsite\u002Fthe-site","3.guide\u002F2.website\u002F9.the-site",{"title":193,"icon":194,"path":195,"stem":196,"children":197,"page":38},"Publishing","i-lucide-send","\u002Fguide\u002Fpublishing","3.guide\u002F3.publishing",[198,202,206],{"title":199,"path":200,"stem":201},"Publishing and preview","\u002Fguide\u002Fpublishing\u002Fpublishing","3.guide\u002F3.publishing\u002F1.publishing",{"title":203,"path":204,"stem":205},"Builds","\u002Fguide\u002Fpublishing\u002Fbuilds","3.guide\u002F3.publishing\u002F2.builds",{"title":207,"path":208,"stem":209},"CDN caches","\u002Fguide\u002Fpublishing\u002Fcaches","3.guide\u002F3.publishing\u002F3.caches",{"title":211,"icon":212,"path":213,"stem":214,"children":215,"page":38},"People, security and privacy","i-lucide-shield","\u002Fguide\u002Fpeople-and-security","3.guide\u002F4.people-and-security",[216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276],{"title":217,"path":218,"stem":219},"People in SHADE","\u002Fguide\u002Fpeople-and-security\u002Fpeople-in-shade","3.guide\u002F4.people-and-security\u002F0.people-in-shade",{"title":221,"path":222,"stem":223},"Team and roles","\u002Fguide\u002Fpeople-and-security\u002Fteam","3.guide\u002F4.people-and-security\u002F1.team",{"title":225,"path":226,"stem":227},"Errors and security alerts","\u002Fguide\u002Fpeople-and-security\u002Ferrors","3.guide\u002F4.people-and-security\u002F10.errors",{"title":229,"path":230,"stem":231},"Exporting an instance","\u002Fguide\u002Fpeople-and-security\u002Fexporting","3.guide\u002F4.people-and-security\u002F11.exporting",{"title":233,"path":234,"stem":235},"Organisations","\u002Fguide\u002Fpeople-and-security\u002Forganisations","3.guide\u002F4.people-and-security\u002F12.organisations",{"title":237,"path":238,"stem":239},"Signing in through an identity provider (team)","\u002Fguide\u002Fpeople-and-security\u002Fidentity-providers","3.guide\u002F4.people-and-security\u002F13.identity-providers",{"title":241,"path":242,"stem":243},"System status","\u002Fguide\u002Fpeople-and-security\u002Fsystem-status","3.guide\u002F4.people-and-security\u002F14.system-status",{"title":245,"path":246,"stem":247},"Appearance","\u002Fguide\u002Fpeople-and-security\u002Fappearance","3.guide\u002F4.people-and-security\u002F15.appearance",{"title":249,"path":250,"stem":251},"Accounts and personal pages","\u002Fguide\u002Fpeople-and-security\u002Faccounts","3.guide\u002F4.people-and-security\u002F2.accounts",{"title":253,"path":254,"stem":255},"Signing in (team)","\u002Fguide\u002Fpeople-and-security\u002Fsign-in","3.guide\u002F4.people-and-security\u002F3.sign-in",{"title":257,"path":258,"stem":259},"API tokens","\u002Fguide\u002Fpeople-and-security\u002Fapi-tokens","3.guide\u002F4.people-and-security\u002F4.api-tokens",{"title":261,"path":262,"stem":263},"Audit log","\u002Fguide\u002Fpeople-and-security\u002Faudit","3.guide\u002F4.people-and-security\u002F5.audit",{"title":265,"path":266,"stem":267},"Request protection","\u002Fguide\u002Fpeople-and-security\u002Fprotection","3.guide\u002F4.people-and-security\u002F6.protection",{"title":269,"path":270,"stem":271},"Personal data per person","\u002Fguide\u002Fpeople-and-security\u002Fprivacy","3.guide\u002F4.people-and-security\u002F7.privacy",{"title":273,"path":274,"stem":275},"Data retention","\u002Fguide\u002Fpeople-and-security\u002Fretention","3.guide\u002F4.people-and-security\u002F8.retention",{"title":277,"path":278,"stem":279},"Consent banner","\u002Fguide\u002Fpeople-and-security\u002Fconsent","3.guide\u002F4.people-and-security\u002F9.consent",{"title":281,"icon":282,"path":283,"stem":284,"children":285,"page":38},"Services","i-lucide-plug","\u002Fguide\u002Fservices","3.guide\u002F5.services",[286,290,294,298,302,306],{"title":287,"path":288,"stem":289},"Email","\u002Fguide\u002Fservices\u002Femail","3.guide\u002F5.services\u002F1.email",{"title":291,"path":292,"stem":293},"Opening hours","\u002Fguide\u002Fservices\u002Fopening-hours","3.guide\u002F5.services\u002F4.opening-hours",{"title":295,"path":296,"stem":297},"Webhooks","\u002Fguide\u002Fservices\u002Fwebhooks","3.guide\u002F5.services\u002F5.webhooks",{"title":299,"path":300,"stem":301},"Locations","\u002Fguide\u002Fservices\u002Flocations","3.guide\u002F5.services\u002F6.locations",{"title":303,"path":304,"stem":305},"VAT rates","\u002Fguide\u002Fservices\u002Fvat-rates","3.guide\u002F5.services\u002F7.vat-rates",{"title":307,"path":308,"stem":309},"Channels","\u002Fguide\u002Fservices\u002Fchannels","3.guide\u002F5.services\u002F8.channels",{"title":311,"icon":312,"path":313,"stem":314,"children":315,"page":38},"InstalledModules","i-lucide-puzzle","\u002Fguide\u002Fmodules","3.guide\u002F6.modules",[316,320,324,328,332,336,340,344,348,352,356,360],{"title":317,"path":318,"stem":319},"Modules","\u002Fguide\u002Fmodules\u002Fmanaging","3.guide\u002F6.modules\u002F1.managing",{"title":321,"path":322,"stem":323},"Dutch services (module)","\u002Fguide\u002Fmodules\u002Fnl","3.guide\u002F6.modules\u002F10.nl",{"title":325,"path":326,"stem":327},"Editorial (module)","\u002Fguide\u002Fmodules\u002Feditorial","3.guide\u002F6.modules\u002F11.editorial",{"title":329,"path":330,"stem":331},"Appointments (module)","\u002Fguide\u002Fmodules\u002Fappointments","3.guide\u002F6.modules\u002F2.appointments",{"title":333,"path":334,"stem":335},"Shop (the commerce module)","\u002Fguide\u002Fmodules\u002Fshop","3.guide\u002F6.modules\u002F3.shop",{"title":337,"path":338,"stem":339},"Untrusted modules","\u002Fguide\u002Fmodules\u002Funtrusted","3.guide\u002F6.modules\u002F4.untrusted",{"title":341,"path":342,"stem":343},"Analytics (module)","\u002Fguide\u002Fmodules\u002Fanalytics","3.guide\u002F6.modules\u002F5.analytics",{"title":345,"path":346,"stem":347},"Error forwarding (module)","\u002Fguide\u002Fmodules\u002Ferror-forwarding","3.guide\u002F6.modules\u002F6.error-forwarding",{"title":349,"path":350,"stem":351},"Client programs","\u002Fguide\u002Fmodules\u002Fprograms","3.guide\u002F6.modules\u002F7.programs",{"title":353,"path":354,"stem":355},"Import and export (module)","\u002Fguide\u002Fmodules\u002Fimport","3.guide\u002F6.modules\u002F8.import",{"title":357,"path":358,"stem":359},"Payments (module)","\u002Fguide\u002Fmodules\u002Fpayments","3.guide\u002F6.modules\u002F8.payments",{"title":361,"path":362,"stem":363},"Forms (module)","\u002Fguide\u002Fmodules\u002Fforms","3.guide\u002F6.modules\u002F9.forms",{"title":365,"icon":366,"path":367,"stem":368,"children":369,"page":38},"AI assistants","i-lucide-bot","\u002Fguide\u002Fai","3.guide\u002F7.ai",[370,374],{"title":371,"path":372,"stem":373},"AI assistants (MCP)","\u002Fguide\u002Fai\u002Fassistants","3.guide\u002F7.ai\u002F1.assistants",{"title":375,"path":376,"stem":377},"Connecting an AI assistant","\u002Fguide\u002Fai\u002Fconnecting","3.guide\u002F7.ai\u002F2.connecting",{"title":379,"icon":380,"path":381,"stem":382,"children":383,"page":38},"Developers","i-lucide-code","\u002Fdevelopers","4.developers",[384,388,392,396,400,404,408,412,416,420,424,428,432,435,489,493,497,501,536],{"title":385,"path":386,"stem":387},"Architecture","\u002Fdevelopers\u002Farchitecture","4.developers\u002F1.architecture",{"title":389,"path":390,"stem":391},"Capabilities","\u002Fdevelopers\u002Fcapabilities","4.developers\u002F10.capabilities",{"title":393,"path":394,"stem":395},"Trust","\u002Fdevelopers\u002Ftrust","4.developers\u002F11.trust",{"title":397,"path":398,"stem":399},"Redis and the ports","\u002Fdevelopers\u002Fredis","4.developers\u002F12.redis",{"title":401,"path":402,"stem":403},"The worker container role","\u002Fdevelopers\u002Fworker","4.developers\u002F13.worker",{"title":405,"path":406,"stem":407},"kv: a module's own key-value storage","\u002Fdevelopers\u002Fkv","4.developers\u002F14.kv",{"title":409,"path":410,"stem":411},"Processes: long-running work on the worker","\u002Fdevelopers\u002Fprocesses","4.developers\u002F15.processes",{"title":413,"path":414,"stem":415},"Network: a module's outgoing calls","\u002Fdevelopers\u002Fnetwork","4.developers\u002F16.network",{"title":417,"path":418,"stem":419},"Realtime","\u002Fdevelopers\u002Frealtime","4.developers\u002F17.realtime",{"title":421,"path":422,"stem":423},"Private files","\u002Fdevelopers\u002Ffiles","4.developers\u002F18.files",{"title":425,"path":426,"stem":427},"Notify","\u002Fdevelopers\u002Fnotify","4.developers\u002F19.notify",{"title":429,"path":430,"stem":431},"Collections","\u002Fdevelopers\u002Fcollections","4.developers\u002F2.collections",{"title":337,"path":433,"stem":434},"\u002Fdevelopers\u002Funtrusted","4.developers\u002F20.untrusted",{"title":436,"icon":312,"path":437,"stem":438,"children":439},"Writing a plugin","\u002Fdevelopers\u002Fmodules","4.developers\u002F3.modules\u002Findex",[440,442,446,450,454,458,462,466,470,473,477,481,485],{"title":441,"path":437,"stem":438},"Writing a module",{"title":443,"path":444,"stem":445},"Module SDK and tooling","\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling","4.developers\u002F3.modules\u002F1.sdk-and-tooling",{"title":447,"path":448,"stem":449},"Connecting accounts with OAuth2","\u002Fdevelopers\u002Fmodules\u002Foauth","4.developers\u002F3.modules\u002F10.oauth",{"title":451,"path":452,"stem":453},"Calls between modules","\u002Fdevelopers\u002Fmodules\u002Fcalls-between-modules","4.developers\u002F3.modules\u002F11.calls-between-modules",{"title":455,"path":456,"stem":457},"Experimental parts","\u002Fdevelopers\u002Fmodules\u002Fexperimental-parts","4.developers\u002F3.modules\u002F12.experimental-parts",{"title":459,"path":460,"stem":461},"The manifest","\u002Fdevelopers\u002Fmodules\u002Fmanifest","4.developers\u002F3.modules\u002F2.manifest",{"title":463,"path":464,"stem":465},"Routes","\u002Fdevelopers\u002Fmodules\u002Froutes","4.developers\u002F3.modules\u002F3.routes",{"title":467,"path":468,"stem":469},"Admin screens and the site part","\u002Fdevelopers\u002Fmodules\u002Fadmin-and-site","4.developers\u002F3.modules\u002F4.admin-and-site",{"title":110,"path":471,"stem":472},"\u002Fdevelopers\u002Fmodules\u002Fcontent","4.developers\u002F3.modules\u002F5.content",{"title":474,"path":475,"stem":476},"Background work and services","\u002Fdevelopers\u002Fmodules\u002Fbackground-and-services","4.developers\u002F3.modules\u002F6.background-and-services",{"title":478,"path":479,"stem":480},"SDK reference","\u002Fdevelopers\u002Fmodules\u002Fsdk-reference","4.developers\u002F3.modules\u002F7.sdk-reference",{"title":482,"path":483,"stem":484},"The website module's SDK","\u002Fdevelopers\u002Fmodules\u002Fwebsite-sdk","4.developers\u002F3.modules\u002F8.website-sdk",{"title":486,"path":487,"stem":488},"Incoming webhooks","\u002Fdevelopers\u002Fmodules\u002Fincoming-webhooks","4.developers\u002F3.modules\u002F9.incoming-webhooks",{"title":490,"path":491,"stem":492},"Core and the website module","\u002Fdevelopers\u002Fcore-and-website-module","4.developers\u002F4.core-and-website-module",{"title":494,"path":495,"stem":496},"The API","\u002Fdevelopers\u002Fapi","4.developers\u002F6.api",{"title":498,"path":499,"stem":500},"API reference","\u002Fdevelopers\u002Fapi-reference","4.developers\u002F6.api-reference",{"title":502,"icon":503,"path":504,"stem":505,"children":506},"Sites in other frameworks","i-lucide-layout-template","\u002Fdevelopers\u002Fframeworks","4.developers\u002F7.frameworks\u002Findex",[507,508,512,516,520,524,528,532],{"title":502,"path":504,"stem":505},{"title":509,"path":510,"stem":511},"Accounts: sign-in and modules' routes","\u002Fdevelopers\u002Fframeworks\u002Faccounts","4.developers\u002F7.frameworks\u002F1.accounts",{"title":513,"path":514,"stem":515},"`@shadestack\u002Ftree`","\u002Fdevelopers\u002Fframeworks\u002Ftree","4.developers\u002F7.frameworks\u002F2.tree",{"title":517,"path":518,"stem":519},"Expressions and styles","\u002Fdevelopers\u002Fframeworks\u002Fexpressions-and-styles","4.developers\u002F7.frameworks\u002F3.expressions-and-styles",{"title":521,"path":522,"stem":523},"`@shadestack\u002Frender`","\u002Fdevelopers\u002Fframeworks\u002Frender","4.developers\u002F7.frameworks\u002F4.render",{"title":525,"path":526,"stem":527},"`@shadestack\u002Finteractions`","\u002Fdevelopers\u002Fframeworks\u002Finteractions","4.developers\u002F7.frameworks\u002F5.interactions",{"title":529,"path":530,"stem":531},"`@shadestack\u002Fa11y`","\u002Fdevelopers\u002Fframeworks\u002Fa11y","4.developers\u002F7.frameworks\u002F6.a11y",{"title":533,"path":534,"stem":535},"Your own page for SHADE's links","\u002Fdevelopers\u002Fframeworks\u002Flinks","4.developers\u002F7.frameworks\u002F7.links",{"title":537,"path":538,"stem":539},"Build a client module","\u002Fdevelopers\u002Fclient-module","4.developers\u002F9.client-module",{"title":541,"icon":542,"path":543,"stem":544,"children":545,"page":38},"Security","i-lucide-shield-check","\u002Fsecurity","5.security",[546,550,554,558],{"title":547,"path":548,"stem":549},"Reporting a vulnerability","\u002Fsecurity\u002Freporting","5.security\u002F0.reporting",{"title":551,"path":552,"stem":553},"Security testing","\u002Fsecurity\u002Ftesting","5.security\u002F1.testing",{"title":555,"path":556,"stem":557},"Hardening a production instance","\u002Fsecurity\u002Fhardening","5.security\u002F2.hardening",{"title":559,"path":560,"stem":561},"Manual testing with Kali Linux","\u002Fsecurity\u002Fmanual-testing","5.security\u002F3.manual-testing",{"title":563,"icon":564,"path":565,"stem":566,"children":567,"page":38},"Contributing","i-lucide-git-pull-request","\u002Fcontributing","6.contributing",[568,572,576,580],{"title":569,"path":570,"stem":571},"Reading the code","\u002Fcontributing\u002Freading-the-code","6.contributing\u002F1.reading-the-code",{"title":573,"path":574,"stem":575},"Docs site","\u002Fcontributing\u002Fdocs-site","6.contributing\u002F2.docs-site",{"title":577,"path":578,"stem":579},"Releases","\u002Fcontributing\u002Freleases","6.contributing\u002F3.releases",{"title":581,"path":582,"stem":583},"Load tests","\u002Fcontributing\u002Fload-tests","6.contributing\u002F4.load-tests",{"title":585,"icon":586,"path":587,"stem":588,"children":589,"page":38},"Project","i-lucide-map","\u002Fproject","7.project",[590,594,598,602],{"title":591,"path":592,"stem":593},"Roadmap","\u002Fproject\u002Froadmap","7.project\u002F1.roadmap",{"title":595,"path":596,"stem":597},"Known issues","\u002Fproject\u002Fknown-issues","7.project\u002F2.known-issues",{"title":599,"path":600,"stem":601},"Changelog","\u002Fproject\u002Fchangelog","7.project\u002F3.changelog",{"title":603,"path":604,"stem":605},"Decisions","\u002Fproject\u002Fdecisions","7.project\u002F4.decisions",{"title":607,"path":608,"stem":609,"children":610,"icon":612},"Community","\u002Fcommunity","8.community\u002Findex",[611],{"title":607,"path":608,"stem":609},"i-lucide-users",{"id":614,"title":46,"body":615,"description":636,"extension":4496,"links":4497,"meta":4498,"navigation":4499,"path":47,"seo":4500,"stem":48,"__hash__":4501},"docs\u002F2.run\u002F1.coolify.md",{"type":616,"value":617,"toc":4475},"minimark",[618,630,720,740,756,785,789,797,1126,1129,1147,1234,1263,1286,1302,1393,1402,1422,1431,1443,1496,1512,1527,1541,1570,1575,1586,1621,1624,1627,1709,1713,1716,1786,1804,1873,1883,1926,1931,1941,1945,1963,1967,1973,1976,2290,2296,2300,2303,2306,2455,2458,3432,3436,3439,3490,3494,3497,3861,3868,3872,3891,3894,3919,3929,3933,4050,4054,4072,4076,4082,4117,4122,4126,4471],[619,620,621,622,629],"p",{},"Each client gets their own server running ",[623,624,628],"a",{"href":625,"rel":626},"https:\u002F\u002Fcoolify.io",[627],"nofollow","Coolify",". On it SHADE's template starts one Postgres database, one Redis, SHADE's image in three containers (the admin, the account API and the worker) and a small router in front of them. The static site and the preview server come after, as applications of their own. Nothing is shared between clients.",[631,632,637],"pre",{"className":633,"code":634,"language":635,"meta":636,"style":636},"language-mermaid shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","flowchart LR\n  accTitle: One client's server on Coolify\n  accDescr: Everything runs on the client's server, in Coolify. One domain, admin.example.com, goes to the router, a small Caddy in the same resource. The router sends \u002Fapi\u002Fv1\u002Faccount\u002F* to shade-api in the public role (forms, checkout, webhooks) and everything else to shade-api in the admin role (the admin SPA, \u002Fapi, MCP, \u002Fuploads). shade-api in the worker role has no domain (schedules, \u002Fhealth only). www.example.com goes to shade-site with target static (Caddy, files only). preview.example.com goes to shade-site with target preview (Node, \u002Fpreview, the team). Postgres holds the records; Redis holds the work in flight and is required.\n  subgraph server[\"Client's server (Coolify)\"]\n    domain[\"admin.example.com\u003Cbr>(the one domain)\"] --> router[\"router\u003Cbr>Caddy, plain HTTP\"]\n    router -->|\"\u002Fapi\u002Fv1\u002Faccount\u002F*\"| public[\"shade-api (role public)\u003Cbr>forms, checkout, webhooks\"]\n    router -->|\"everything else\"| admin[\"shade-api (role admin)\u003Cbr>admin SPA, \u002Fapi, MCP, \u002Fuploads\"]\n    none[\"(no domain)\"] --> worker[\"shade-api (role worker)\u003Cbr>schedules, \u002Fhealth only\"]\n    www[\"www.example.com\"] --> static[\"shade-site (target static)\u003Cbr>Caddy, files only\"]\n    preview_domain[\"preview.example.com\"] --> preview[\"shade-site (target preview)\u003Cbr>Node, \u002Fpreview, the team\"]\n    pg[(\"Postgres\u003Cbr>records\")]\n    redis[(\"Redis\u003Cbr>work in flight, required\")]\n  end\n","mermaid","",[638,639,640,648,654,660,666,672,678,684,690,696,702,708,714],"code",{"__ignoreMap":636},[641,642,645],"span",{"class":643,"line":644},"line",1,[641,646,647],{},"flowchart LR\n",[641,649,651],{"class":643,"line":650},2,[641,652,653],{},"  accTitle: One client's server on Coolify\n",[641,655,657],{"class":643,"line":656},3,[641,658,659],{},"  accDescr: Everything runs on the client's server, in Coolify. One domain, admin.example.com, goes to the router, a small Caddy in the same resource. The router sends \u002Fapi\u002Fv1\u002Faccount\u002F* to shade-api in the public role (forms, checkout, webhooks) and everything else to shade-api in the admin role (the admin SPA, \u002Fapi, MCP, \u002Fuploads). shade-api in the worker role has no domain (schedules, \u002Fhealth only). www.example.com goes to shade-site with target static (Caddy, files only). preview.example.com goes to shade-site with target preview (Node, \u002Fpreview, the team). Postgres holds the records; Redis holds the work in flight and is required.\n",[641,661,663],{"class":643,"line":662},4,[641,664,665],{},"  subgraph server[\"Client's server (Coolify)\"]\n",[641,667,669],{"class":643,"line":668},5,[641,670,671],{},"    domain[\"admin.example.com\u003Cbr>(the one domain)\"] --> router[\"router\u003Cbr>Caddy, plain HTTP\"]\n",[641,673,675],{"class":643,"line":674},6,[641,676,677],{},"    router -->|\"\u002Fapi\u002Fv1\u002Faccount\u002F*\"| public[\"shade-api (role public)\u003Cbr>forms, checkout, webhooks\"]\n",[641,679,681],{"class":643,"line":680},7,[641,682,683],{},"    router -->|\"everything else\"| admin[\"shade-api (role admin)\u003Cbr>admin SPA, \u002Fapi, MCP, \u002Fuploads\"]\n",[641,685,687],{"class":643,"line":686},8,[641,688,689],{},"    none[\"(no domain)\"] --> worker[\"shade-api (role worker)\u003Cbr>schedules, \u002Fhealth only\"]\n",[641,691,693],{"class":643,"line":692},9,[641,694,695],{},"    www[\"www.example.com\"] --> static[\"shade-site (target static)\u003Cbr>Caddy, files only\"]\n",[641,697,699],{"class":643,"line":698},10,[641,700,701],{},"    preview_domain[\"preview.example.com\"] --> preview[\"shade-site (target preview)\u003Cbr>Node, \u002Fpreview, the team\"]\n",[641,703,705],{"class":643,"line":704},11,[641,706,707],{},"    pg[(\"Postgres\u003Cbr>records\")]\n",[641,709,711],{"class":643,"line":710},12,[641,712,713],{},"    redis[(\"Redis\u003Cbr>work in flight, required\")]\n",[641,715,717],{"class":643,"line":716},13,[641,718,719],{},"  end\n",[619,721,722,723,726,727,729,730,734,735,739],{},"The SHADE repository's ",[638,724,725],{},"deploy\u002Fcompose.yml"," is this setup as one Docker Compose resource, with the container settings every instance keeps: no published ports, a read-only filesystem for the API and Redis, every capability dropped, and limits (",[623,728,555],{"href":556},"). On Coolify you paste it in, name the image, give one domain to the router, deploy and open the owner link. ",[623,731,733],{"href":732},"#the-template-as-one-docker-compose-resource","The template as one Docker Compose resource"," goes through it step by step; ",[623,736,738],{"href":737},"#one-application-per-role","one application per role"," is the alternative for a rolling update.",[619,741,742,746,747,750,751,755],{},[743,744,745],"strong",{},"Every instance has a worker."," The ",[638,748,749],{},"worker"," role runs scheduled publishing, retention, email retries, clean-up of left-behind media files, security alerts and the modules' schedules. The other roles never run these, and there is no fallback: without a worker container, every admin screen shows ",[752,753,754],"em",{},"Background work is not running: no worker container answers",".",[619,757,758,759,762,763,766,767,769,770,773,774,778,779,782,783,755],{},"An instance runs ",[638,760,761],{},"admin",", ",[638,764,765],{},"public"," and ",[638,768,749],{},". A small one may run all three as one ",[638,771,772],{},"all"," container (",[623,775,777],{"href":776},"#the-small-profile","the small profile","); ",[638,780,781],{},"SHADE_API_ROLE=all"," is also the default when the variable is unset. Without Coolify, see ",[623,784,70],{"href":71},[786,787,733],"h2",{"id":788},"the-template-as-one-docker-compose-resource",[619,790,791,792,796],{},"Five steps get a running instance with its owner account. Nothing else is required for that; forms and account sign-in\ncome once the modules are on (",[623,793,795],{"href":794},"#configure-shade-for-the-site","Configure SHADE for the site",").",[798,799,800,822,930,1000,1086],"ol",{},[801,802,803,806,807,810,811,813,814,817,818,821],"li",{},[743,804,805],{},"Paste the template."," In Coolify: ",[743,808,809],{},"New resource → Docker Compose Empty",", and paste ",[638,812,725],{}," from the\nSHADE repository (the small profile: ",[638,815,816],{},"deploy\u002Fcompose.small.yml",", see ",[623,819,820],{"href":776},"below","). It needs Docker\nCompose 2.23.1 or newer.",[801,823,824,827,828,831,832,835,836,838,839,842,843,846,847,850,851,766,853,856,857,860,861,864,865,882,884,887,888,891,892,894,895,898,899,902,903,906,907,909,910,913,914,923,925,926,929],{},[743,825,826],{},"Name the image."," Coolify's Docker Compose resource has no repository to build from, so the template names the\nimage through ",[638,829,830],{},"${SHADE_IMAGE}",", and each of those services also has a ",[638,833,834],{},"build:"," block that Coolify cannot use. Delete\nthe ",[638,837,834],{}," block and keep the ",[638,840,841],{},"image: ${SHADE_IMAGE}"," line above it. There are two such places: the ",[638,844,845],{},"x-api"," block\nat the top and the ",[638,848,849],{},"secrets"," service. The small profile needs the same in its ",[638,852,849],{},[638,854,855],{},"shade"," services. Leave\nthe other ",[638,858,859],{},"image:"," lines (Postgres, Redis, the router) as they are.",[862,863],"br",{},"No SHADE image has been released yet, so build and push your own, from the root of the SHADE repository:",[631,866,870],{"className":867,"code":868,"language":869,"meta":636,"style":636},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","docker build --platform linux\u002Famd64 -f apps\u002Fapi\u002FDockerfile -t ghcr.io\u002F\u003Cowner>\u002Fshade:\u003Ctag> .\ndocker push ghcr.io\u002F\u003Cowner>\u002Fshade:\u003Ctag>\n","sh",[638,871,872,877],{"__ignoreMap":636},[641,873,874],{"class":643,"line":644},[641,875,876],{},"docker build --platform linux\u002Famd64 -f apps\u002Fapi\u002FDockerfile -t ghcr.io\u002F\u003Cowner>\u002Fshade:\u003Ctag> .\n",[641,878,879],{"class":643,"line":650},[641,880,881],{},"docker push ghcr.io\u002F\u003Cowner>\u002Fshade:\u003Ctag>\n",[862,883],{},[638,885,886],{},"--platform linux\u002Famd64"," matters when you build on an ARM machine for an amd64 server; leave it out when both match.\nPushing needs a Docker login on the build machine with a token that has the ",[638,889,890],{},"write:packages"," scope.",[862,893],{},"Then open the resource's ",[743,896,897],{},"Environment Variables"," and give ",[638,900,901],{},"SHADE_IMAGE"," that image and tag. It is the one variable\nyou must set: the containers don't start without it. Everything else has a default or is generated. The template has\nno ",[638,904,905],{},"${VAR:?message}",", since Coolify would store the message as the value.",[862,908],{},"A private registry needs a login on the server. Coolify pulls as the user it connects to the server as (root by\ndefault), with that user's Docker login. For GitHub's registry, make a classic personal access token with only the\n",[638,911,912],{},"read:packages"," scope (fine-grained tokens don't cover packages), then on that server, as that user:",[631,915,917],{"className":867,"code":916,"language":869,"meta":636,"style":636},"docker login ghcr.io -u \u003CGitHub user> --password-stdin\n",[638,918,919],{"__ignoreMap":636},[641,920,921],{"class":643,"line":644},[641,922,916],{},[862,924],{},"Paste the token, press Enter, then Ctrl+D. The login stays in that user's ",[638,927,928],{},"~\u002F.docker\u002Fconfig.json","; every later\ndeploy uses it.",[801,931,932,935,936,939,940,943,944,947,948,950,951,953,954,957,958,960,961,964,965,968,969,762,971,766,973,975,976,766,979,982,983,987,988,990,991,993,994,996,997,999],{},[743,933,934],{},"Give the domain to the router."," The template has a ",[638,937,938],{},"router"," service: Caddy, speaking plain HTTP behind Coolify's\nproxy, with the same routes ",[638,941,942],{},"shade install"," uses on a server of your own. It sends ",[638,945,946],{},"\u002Fapi\u002Fv1\u002Faccount\u002F*"," to ",[638,949,765],{},"\nand everything else to ",[638,952,761],{},", retries a read that arrives while a container restarts, and answers \"starting\"\ninstead of a bare 502 while none is up. In Coolify, under ",[743,955,956],{},"Domains",", give the domain to ",[638,959,938],{}," and write the port\nit listens on after it: ",[638,962,963],{},"https:\u002F\u002Fadmin.example.com:8080",". For a compose service, Coolify routes to the port written\non the domain; visitors still use the normal HTTPS port, 443. The template names the same port through\n",[638,966,967],{},"SERVICE_URL_ROUTER_8080",". ",[638,970,761],{},[638,972,765],{},[638,974,749],{}," get no domain, and there is no path or \"strip prefixes\"\nsetting to set anywhere. ",[638,977,978],{},"SHADE_API_URL",[638,980,981],{},"SHADE_ADMIN_URL"," default to that domain; set them only to use another\naddress, such as ",[623,984,986],{"href":985},"#the-admin-on-an-address-of-its-own","an admin on its own address",". The small profile has no router:\ngive its ",[638,989,855],{}," service the domain, and set ",[638,992,978],{}," yourself.",[862,995],{},"In production SHADE refuses to start when ",[638,998,978],{}," is empty, so a router without a domain stops the\ncontainers with a message that says so.",[801,1001,1002,1005,1006,1009,1010,1013,1014,1017,1018,1021,1022,762,1025,762,1028,1031,1032,1035,1036,1039,1040,1043,1044,1047,1048,1051,1052,1054,1055,1057,1058,1061,1062,1065,1066,1069,1070,1073,1074,1077,1078,1081,1082,1085],{},[743,1003,1004],{},"Deploy",", then check ",[638,1007,1008],{},"https:\u002F\u002Fadmin.example.com\u002Fhealth",":\n",[638,1011,1012],{},"{\"ok\":true,\"role\":\"admin\",\"checks\":{\"redis\":\"up\",\"database\":\"up\",\"started\":\"up\",\"migrations\":\"up\",\"running\":\"up\",\"maintenance\":\"off\"}}",".\n",[638,1015,1016],{},"\u002Fhealth"," is the readiness answer: 200 only when this container can do its work, else 503 with the failing check set\nto ",[638,1019,1020],{},"down"," (",[638,1023,1024],{},"redis",[638,1026,1027],{},"database",[638,1029,1030],{},"migrations"," while the image's migrations are not all applied, ",[638,1033,1034],{},"started"," while it\nstarts, ",[638,1037,1038],{},"running"," once it is stopping). ",[638,1041,1042],{},"maintenance"," says whether ",[623,1045,1046],{"href":95},"maintenance mode"," is on\nand never makes it 503. ",[638,1049,1050],{},"\u002Fhealth\u002Flive"," only says the process runs and never causes a restart over a database or\nRedis outage. The API refuses to start when Redis does not answer, and says so in its log. The one-shot ",[638,1053,849],{},"\nservice shows as exited once it has written the secrets: that is expected.",[862,1056],{},"Then, in the admin service's ",[743,1059,1060],{},"Terminal",", run ",[638,1063,1064],{},"node console\u002Fdoctor.mjs",". Its ",[638,1067,1068],{},"account-route"," check asks the\naccount API on the public address and says what is wrong when the route is not right (",[623,1071,1072],{"href":59},"The\ndoctor","). The template sets ",[638,1075,1076],{},"restart: unless-stopped","; keep it, since ",[743,1079,1080],{},"Restart now"," on the Modules\nscreen, after installing a server package, stops the API gracefully and relies on it starting again. Afterwards\nrequest a form's published address from outside the server (",[638,1083,1084],{},"\u002Fapi\u002Fv1\u002Faccount\u002Fforms\u002Fpublished\u002F\u003Cform>",") and expect\n200, not 404.",[801,1087,1088,1091,1092,1094,1095,1098,1099,1107,1109,1110,1113,1114,1117,1118,1121,1122,1125],{},[743,1089,1090],{},"Open the owner link."," While nobody has an account yet, the admin's log (in Coolify: the ",[638,1093,761],{}," service's\n",[743,1096,1097],{},"Logs",") shows a block with the address to open and a one-time code, between two marker lines. It prints at start\nand again every five minutes until the owner exists:",[631,1100,1105],{"className":1101,"code":1103,"language":1104},[1102],"language-text","=================== SHADE: CREATE THE OWNER ACCOUNT ===================\nNo team member yet. Open https:\u002F\u002Fadmin.example.com\u002Fcreate-owner and enter this code to create the owner account: 7KQM-4XZP-93RT\nThe code works once, until 14:32 UTC. This message repeats every 5 minutes until the owner exists.\n=================== SHADE: CREATE THE OWNER ACCOUNT ===================\n","text",[638,1106,1103],{"__ignoreMap":636},[862,1108],{},"Request logs can bury it, so search the log for ",[638,1111,1112],{},"No team member yet"," instead of scrolling (on the server,\n",[638,1115,1116],{},"docker logs \u003Cthe admin container> 2>&1 | grep \"No team member yet\"","). Open that address, enter the code, your name,\nyour email address and a password. You are signed in as the first admin, and the admin takes you to set up\ntwo-factor or a passkey: do that now. Once this account exists, the page is gone and the admin's address shows the\nsign-in page. Only someone who can read the server's logs gets the code, so nobody who happens on a fresh instance\nfirst can make themselves its owner. A nearly expired code is replaced in the block.\n",[638,1119,1120],{},"node console\u002Fcreate-admin.mjs"," in the container's terminal still makes an admin, for a script, or behind a proxy\nthat changes the ",[638,1123,1124],{},"Host"," header (the page answers only on the admin's own address).",[619,1127,1128],{},"What to do next, and what the template does for you:",[619,1130,1131,1134,1135,766,1137,1139,1140,1142,1143,1146],{},[743,1132,1133],{},"Set the backup target in the admin, not in Coolify."," Coolify gives every variable to every service. Its generated\ncompose file passes the whole environment of the resource to each container, so a variable you set for the admin\nreaches ",[638,1136,765],{},[638,1138,749],{}," too. So keep the backup settings out of Coolify's environment. Once the resource runs,\nopen the admin service's ",[743,1141,1060],{}," in Coolify and set the bucket and its keys there (",[638,1144,1145],{},"node console\u002Fbackup-target.mjs","\nis in the image, next to the other console commands):",[631,1148,1152],{"className":1149,"code":1150,"language":1151,"meta":636,"style":636},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","node console\u002Fbackup-target.mjs set --url s3:\u002F\u002F\u003Cbucket>\u002F\u003Cprefix> --access-key-id \u003Ckey id> --endpoint \u003Cthe service's address>\n","bash",[638,1153,1154],{"__ignoreMap":636},[641,1155,1156,1160,1164,1167,1170,1173,1177,1180,1184,1187,1190,1192,1195,1198,1200,1203,1206,1209,1212,1215,1217,1220,1222,1225,1228,1231],{"class":643,"line":644},[641,1157,1159],{"class":1158},"sBMFI","node",[641,1161,1163],{"class":1162},"sfazB"," console\u002Fbackup-target.mjs",[641,1165,1166],{"class":1162}," set",[641,1168,1169],{"class":1162}," --url",[641,1171,1172],{"class":1162}," s3:\u002F\u002F",[641,1174,1176],{"class":1175},"sMK4o","\u003C",[641,1178,1179],{"class":1162},"bucke",[641,1181,1183],{"class":1182},"sTEyZ","t",[641,1185,1186],{"class":1175},">",[641,1188,1189],{"class":1162},"\u002F",[641,1191,1176],{"class":1175},[641,1193,1194],{"class":1162},"prefi",[641,1196,1197],{"class":1182},"x",[641,1199,1186],{"class":1175},[641,1201,1202],{"class":1162}," --access-key-id",[641,1204,1205],{"class":1175}," \u003C",[641,1207,1208],{"class":1162},"key",[641,1210,1211],{"class":1162}," i",[641,1213,1214],{"class":1182},"d",[641,1216,1186],{"class":1175},[641,1218,1219],{"class":1162}," --endpoint",[641,1221,1205],{"class":1175},[641,1223,1224],{"class":1162},"the",[641,1226,1227],{"class":1162}," service",[641,1229,1230],{"class":1175},"'",[641,1232,1233],{"class":1162},"s address>\n",[619,1235,1236,1237,1240,1241,1245,1246,1249,1250,1252,1253,1255,1256,766,1259,1262],{},"It asks for the secret access key, checks that the bucket answers, and saves the settings in the ",[638,1238,1239],{},"secrets-backup","\nvolume, which only the admin, the worker and the rehearsal's Postgres mount (",[623,1242,1244],{"href":1243},"\u002Frun\u002Fupdating-and-backups#setting-the-target","Setting the\ntarget","). Then restart the resource. The public container never holds the\nbucket's keys or the backup key this way: it ignores every ",[638,1247,1248],{},"SHADE_BACKUP_*"," variable it is given. A target you do put in\nCoolify's environment still works (it reaches the admin and the worker, and wins over the file) and ",[638,1251,765],{}," starts all\nthe same, but then ",[638,1254,765],{}," holds the bucket's keys too. Leave ",[638,1257,1258],{},"SHADE_BACKUP_URL",[638,1260,1261],{},"SHADE_BACKUP_S3_*"," empty in\nCoolify when you use the command: a value set there wins over the command's file.",[619,1264,1265,1266,1269,1270,1273,1274,1277,1278,1281,1282,1285],{},"The bucket's endpoint is the service's address without the bucket. Cloudflare R2 shows a bucket's S3 address with the\nbucket on the end (",[638,1267,1268],{},"https:\u002F\u002F\u003Caccount id>.r2.cloudflarestorage.com\u002F\u003Cbucket>","): leave ",[638,1271,1272],{},"\u002F\u003Cbucket>"," off, or SHADE refuses to\nstart and says so. A bucket made with EU jurisdiction has an address of its own,\n",[638,1275,1276],{},"https:\u002F\u002F\u003Caccount id>.eu.r2.cloudflarestorage.com",", with ",[638,1279,1280],{},"--region auto","; the address without ",[638,1283,1284],{},".eu."," does not find it.",[619,1287,1288,1291,1292,1294,1295,762,1298,1301],{},[743,1289,1290],{},"The secrets are generated on the first start."," The template's ",[638,1293,849],{}," service runs once before the others. It\nwrites ",[638,1296,1297],{},"APP_SECRET",[638,1299,1300],{},"SHADE_BACKUP_KEY"," and the passwords of its Postgres roles, the rehearsal's Postgres and Redis, one\nfile each, into five volumes by who reads them:",[1303,1304,1305,1321],"table",{},[1306,1307,1308],"thead",{},[1309,1310,1311,1315,1318],"tr",{},[1312,1313,1314],"th",{},"Volume",[1312,1316,1317],{},"Holds",[1312,1319,1320],{},"Mounted by",[1322,1323,1324,1342,1355,1367,1380],"tbody",{},[1309,1325,1326,1331,1339],{},[1327,1328,1329],"td",{},[638,1330,849],{},[1327,1332,1333,762,1335,1338],{},[638,1334,1297],{},[638,1336,1337],{},"SHADE_DB_PASSWORD",", the Redis password",[1327,1340,1341],{},"every SHADE container, Postgres, Redis",[1309,1343,1344,1349,1352],{},[1327,1345,1346],{},[638,1347,1348],{},"secrets-owner",[1327,1350,1351],{},"the owner's password",[1327,1353,1354],{},"admin, Postgres",[1309,1356,1357,1361,1364],{},[1327,1358,1359],{},[638,1360,1239],{},[1327,1362,1363],{},"the backup key, the rehearsal's password",[1327,1365,1366],{},"admin, worker, the rehearsal's Postgres",[1309,1368,1369,1374,1377],{},[1327,1370,1371],{},[638,1372,1373],{},"secrets-backup-role",[1327,1375,1376],{},"the backup role's password",[1327,1378,1379],{},"worker, Postgres",[1309,1381,1382,1387,1390],{},[1327,1383,1384],{},[638,1385,1386],{},"secrets-database",[1327,1388,1389],{},"Postgres's superuser password",[1327,1391,1392],{},"Postgres alone",[619,1394,1395,1396,1398,1399,1401],{},"The public container never holds the backup key, the owner's or backup role's password, or the superuser's password.\nLeave the secrets unset in Coolify: a later start reuses the files, and a value you set wins. The doctor's ",[638,1397,849],{},"\ncheck says which were generated and which set. If the ",[638,1400,849],{}," service warns that it generated a password for a\ndatabase that already holds data (a Postgres volume older than the secrets' volumes), set that password to the old one.",[619,1403,1404,1410,1411,1413,1414,1417,1418,1421],{},[743,1405,1406,1407,1409],{},"Keep a copy of ",[638,1408,1297],{}," and the backup key apart from the server",", and confirm it once. The volumes go when the\nserver goes, and a backup restored on a new instance opens neither its files without the backup key nor its stored\nsecrets (email and payment keys, two-factor secrets) without the ",[638,1412,1297],{}," they were sealed with. A signed-in admin\nconfirms the copy with ",[638,1415,1416],{},"POST \u002Fapi\u002Fbackups\u002Fkept-copy",". Until then the doctor's ",[638,1419,1420],{},"kept-copy"," check warns; a new value of\neither secret needs confirming again. To read them once, on the server:",[631,1423,1425],{"className":867,"code":1424,"language":869,"meta":636,"style":636},"docker exec \u003Cthe admin container> cat \u002Fapp\u002Fsecrets\u002Fapp\u002FAPP_SECRET \u002Fapp\u002Fsecrets\u002Fbackup\u002FSHADE_BACKUP_KEY\n",[638,1426,1427],{"__ignoreMap":636},[641,1428,1429],{"class":643,"line":644},[641,1430,1424],{},[619,1432,1433,1436,1437,1439,1440,1442],{},[743,1434,1435],{},"Removing a set secret later brings back the generated one."," A value you set wins over its file, but the file stays,\nso unsetting it makes the next start read the generated value again. For ",[638,1438,1297],{}," that signs everyone out and leaves\nstored secrets sealed with the set one unreadable (see ",[623,1441,54],{"href":55},"). For the backup\nkey, backups made meanwhile no longer open. For a database or Redis password, the containers can no longer connect,\nsince the database keeps the password it was made with. Keep a set secret set, or rotate it.",[619,1444,1445,1448,1449,1452,1453,1456,1457,762,1460,766,1463,1466,1467,1452,1470,762,1473,766,1476,1452,1479,1482,1483,1486,1487,1490,1491,1495],{},[743,1446,1447],{},"Defaults stay defaults."," Coolify lists each variable the template names, empty when you give none. SHADE reads empty\nas unset, so the template's default applies (",[638,1450,1451],{},"SHADE_BACKUP_CRON"," ",[638,1454,1455],{},"0 3 * * *",", keep counts ",[638,1458,1459],{},"7",[638,1461,1462],{},"4",[638,1464,1465],{},"6",",\n",[638,1468,1469],{},"SHADE_BACKUP_BEFORE_MIGRATE",[638,1471,1472],{},"true",[638,1474,1475],{},"SHADE_PACKAGE_APPROVAL",[638,1477,1478],{},"SHADE_OIDC_REQUIRED",[638,1480,1481],{},"false","), and a value you set\nwins. Other settings, such as ",[638,1484,1485],{},"SHADE_TRUSTED_MODULE_KEYS",", the identity providers' ",[638,1488,1489],{},"SHADE_OIDC_*"," or the usage limits, go\ninto Coolify's environment as they are; the table under ",[623,1492,1494],{"href":1493},"#api-and-admin","API and admin"," lists them, with what each does.",[1497,1498,1499,1506],"ul",{},[801,1500,1501,1502,1505],{},"The rehearsal's database address is written out in the template (",[638,1503,1504],{},"postgres:\u002F\u002Frehearsal@postgres-rehearsal:5432\u002Frehearsal",",\nwith the generated password added). To use a scratch database of your own, edit that value in the compose file.",[801,1507,1508,1509,796],{},"The rest default to empty (",[638,1510,1511],{},"${VAR:-}",[619,1513,1514,1517,1518,1522,1523,1526],{},[743,1515,1516],{},"The database roles."," The template makes SHADE's three Postgres roles (",[623,1519,1521],{"href":1520},"\u002Frun\u002Fown-server#the-databases-roles","The database's\nroles",") with an init script of its ",[638,1524,1525],{},"postgres"," service. A Postgres resource you add\nyourself needs them made the same way.",[619,1528,1529,1532,1533,1536,1537,755],{},[743,1530,1531],{},"Redis"," is Valkey in the template (",[638,1534,1535],{},"valkey\u002Fvalkey:9.1-alpine",", BSD-licensed). It holds only work in flight, so it needs\nno backup and no volume; what a restart loses is listed under ",[623,1538,1540],{"href":1539},"#project-database-and-redis","Project, database and Redis",[619,1542,1543,1546,1547,1549,1550,766,1552,1554,1555,1558,1559,1561,1562,1565,1566,1569],{},[743,1544,1545],{},"Stop grace."," The template gives ",[638,1548,761],{}," 130 seconds and ",[638,1551,765],{},[638,1553,749],{}," 40 seconds (",[638,1556,1557],{},"stop_grace_period","). A\nstopping container turns ",[638,1560,1016],{}," to 503 and goes on serving for 3 seconds (",[638,1563,1564],{},"SHADE_DRAIN_DELAY_MS","). Then it finishes\nits requests and closes live streams, and a schedule's run in progress gets ",[638,1567,1568],{},"SHADE_STOP_GRACE_MS"," (30 seconds) less\nfive, counted from the signal, to end before it is aborted and rolled back. A container still busy at the deadline exits\nwith code 1 and logs what was running. An upload that takes longer than the admin's 120 seconds fails, and the admin\ntells the person to try again. A Coolify Docker Compose resource restarts in a few seconds on an update. The router is\nrecreated on a deploy too, so requests in those seconds can fail. The router keeps no admin cookie stickiness, which\nonly matters while two admin containers run; a Coolify resource runs one.",[1571,1572,1574],"h3",{"id":1573},"the-admin-on-an-address-of-its-own","The admin on an address of its own",[619,1576,1577,1578,1581,1582,1585],{},"The team can open the admin at its own subdomain, such as ",[638,1579,1580],{},"https:\u002F\u002Fadmin.example.com",", while frontends, payment\nproviders and MCP clients use ",[638,1583,1584],{},"https:\u002F\u002Fapi.example.com",":",[798,1587,1588,1600,1610],{},[801,1589,1590,1591,1593,1594,1009,1596,1599],{},"Give the ",[638,1592,938],{}," both domains in Coolify (",[743,1595,956],{},[638,1597,1598],{},"https:\u002F\u002Fadmin.example.com:8080,https:\u002F\u002Fapi.example.com:8080",", each with the router's port): it answers any host, and\nthe same containers answer both. Without the template, give the admin application both domains.",[801,1601,1602,1603,766,1606,1609],{},"Set ",[638,1604,1605],{},"SHADE_API_URL=https:\u002F\u002Fapi.example.com",[638,1607,1608],{},"SHADE_ADMIN_URL=https:\u002F\u002Fadmin.example.com"," in Coolify's environment\n(on the admin, public and worker applications, when you run one application per role).",[801,1611,1612,1613,1616,1617,1620],{},"Deploy. Opening ",[638,1614,1615],{},"https:\u002F\u002Fapi.example.com\u002F"," now leads to ",[638,1618,1619],{},"https:\u002F\u002Fadmin.example.com\u002F",". The team signs in there:\nits session, passkeys and the links in password and address emails belong to the admin's address. A passkey made\non the old address does not work on the new one; set it up again on the account page.",[619,1622,1623],{},"Use a subdomain of the same domain as the API. Hosting the admin's files somewhere else (a CDN) is not supported yet.",[786,1625,795],{"id":1626},"configure-shade-for-the-site",[798,1628,1629,1647,1667],{},[801,1630,1631,1632,1635,1636,1639,1640,1642,1643,1646],{},"Sign in. Under ",[743,1633,1634],{},"Team",", create ",[638,1637,1638],{},"Site build"," (role editor, no password). Under ",[743,1641,257],{},", make a ",[743,1644,1645],{},"build"," token for it. It reads published content like a read token, and the site runner reports each build with it (a read token cannot).",[801,1648,1649,1652,1653,1656,1657,1660,1661,1663,1666],{},[743,1650,1651],{},"Settings",": site name, language and the ",[743,1654,1655],{},"Site URL",", the site's address (",[638,1658,1659],{},"https:\u002F\u002Fwww.example.com","). It is set only here. Canonical links, the sitemap and the site's build use it, and visitor routes and account sign-in accept browsers only from there (and from the frontends listed below it). Set it before the first build.",[862,1662],{},[743,1664,1665],{},"Choose the default language now, before any module goes on."," Switching the website module on creates its default header and footer parts in the instance's language at that moment, and they count as content. The site seed then no longer sees an empty instance and refuses to set the language.",[801,1668,1669,1672,1673,1706,1708],{},[743,1670,1671],{},"Get the modules on."," A module installs only when signed with a key the instance trusts. For your own modules, and for now the official ones too:",[798,1674,1675,1682,1691],{},[801,1676,1677,1678,796],{},"Make two key pairs, a main and a backup (",[623,1679,1681],{"href":1680},"\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling#keeping-a-signing-key","Keeping a signing key",[801,1683,1684,1685,1021,1687,1690],{},"Put both public keys in ",[638,1686,1485],{},[638,1688,1689],{},"name=\u003Cpublic key>,name2=\u003Cpublic key>",") on the admin, public and worker applications and redeploy.",[801,1692,1693,1694,1696,1697,1701,1702,1705],{},"Build the module's package, sign it with the main key and install it on the ",[743,1695,317],{}," page (",[623,1698,1700],{"href":1699},"\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling#packaging-and-signing","Packaging and signing","). A catalogue baked into the image (",[638,1703,1704],{},"SHADE_MODULE_CATALOGUE",") does this for several at once.",[862,1707],{},"The website and forms modules are the usual first two, and the project module too if the site's pages read its data. Installed modules start after a restart and stay off until you switch them on, which you do after the language is set. Install every module the site's seed reads before running it.",[786,1710,1712],{"id":1711},"site-static-and-preview","Site (static) and preview",[619,1714,1715],{},"A site's pages, navigation, footer and theme belong to the website module: install it on the Modules page and switch it on first. Its settings there hold the Preview address and the build hook.",[798,1717,1718,1755,1783],{},[801,1719,1720,1723,1724,1727,1728,1731,1732,1738,1739,1742,1743,1745,1746,1021,1748,1750,1751,1754],{},[743,1721,1722],{},"Static site",": an application from the site's repository, ",[638,1725,1726],{},"shadehq-dev\u002Fshade-site",". Its image builds on SHADE's packages next to it, not on the pre-releases on npm, so build it from the SHADE workspace (with its submodules). Dockerfile ",[638,1729,1730],{},"site\u002FDockerfile",", build context the repository root, ",[743,1733,1734,1735],{},"build target ",[638,1736,1737],{},"static",", port ",[638,1740,1741],{},"8080",", domain ",[638,1744,1659],{},". Build variables: ",[638,1747,978],{},[638,1749,1580],{},") and ",[638,1752,1753],{},"SHADE_API_TOKEN"," (the build token; prefer a build secret).",[801,1756,1757,1760,1761,1738,1766,1742,1769,1772,1773,766,1775,1777,1778,947,1781,755],{},[743,1758,1759],{},"Preview",": same Dockerfile, ",[743,1762,1734,1763],{},[638,1764,1765],{},"preview",[638,1767,1768],{},"4321",[638,1770,1771],{},"https:\u002F\u002Fpreview.example.com",". Runtime variables ",[638,1774,978],{},[638,1776,1753],{},". Only the team uses it, inside the admin: set the website module's ",[743,1779,1780],{},"Preview address",[638,1782,1771],{},[801,1784,1785],{},"Publish at least the home page (the page with an empty address; a new instance has no pages), then rebuild the static site once.",[619,1787,1788,1791,1792,1795,1796,1799,1800,1803],{},[743,1789,1790],{},"Or: one site container that builds itself"," (Dockerfile target ",[638,1793,1794],{},"runner","). The same image serves every client. On start, and on every publish, it builds the site from the client's SHADE instance into a fresh folder and switches to it in one step. Caddy serves it on ",[638,1797,1798],{},":8080"," and the site's Node server (islands, ",[638,1801,1802],{},"\u002Fpreview",") runs beside it, so this one container replaces both the static site and the preview.",[1497,1805,1806,1833,1845,1863,1870],{},[801,1807,1808,1809,762,1811,1813,1814,1021,1817,1819,1820,762,1823,1826,1827,1021,1830,796],{},"Runtime variables: ",[638,1810,978],{},[638,1812,1753],{}," (the build token), ",[638,1815,1816],{},"SHADE_ACCOUNT_URL",[638,1818,1659],{},"), ",[638,1821,1822],{},"ACCOUNT_API_URL",[638,1824,1825],{},"ASTRO_KEY",", and ",[638,1828,1829],{},"SITE_REBUILD_TOKEN",[638,1831,1832],{},"openssl rand -hex 24",[801,1834,1835,1836,1838,1839,1841,1842,1844],{},"The website module's ",[743,1837,1780],{},": the site's own address (",[638,1840,1659],{},"), where this container serves ",[638,1843,1802],{}," too.",[801,1846,1835,1847,1850,1851,1854,1855,1858,1859,1862],{},[743,1848,1849],{},"Build hook URL",": ",[638,1852,1853],{},"http:\u002F\u002F\u003Csite container>:8081\u002Frebuild?token=\u003CSITE_REBUILD_TOKEN>",". Port 8081 stays internal; ",[638,1856,1857],{},"GET :8081\u002Fhealth"," reports the last build. SHADE calls an internal address only for the path ",[638,1860,1861],{},"\u002Frebuild","; any other build hook must be public.",[801,1864,1865,1866,1869],{},"A volume on ",[638,1867,1868],{},"\u002Fapp\u002Fsite\u002Fbuilds"," keeps the current build and the one before across restarts, so the site is served at once while the next build runs. Use a named volume (Coolify's default), which takes the folder's owner from the image. A bind mount must be writable by uid 1000.",[801,1871,1872],{},"Builds run one at a time. Publishes during a build give one more build after it. A failed build keeps the previous site online.",[619,1874,1875,1878,1879,1882],{},[743,1876,1877],{},"Visitors' personal parts and routes."," The static site's Caddy sends two paths on, so visitors only talk to ",[638,1880,1881],{},"www.example.com",". That matters for accounts: their cookie must belong to the site.",[1497,1884,1885,1899,1917],{},[801,1886,1887,1890,1891,1894,1895,1898],{},[638,1888,1889],{},"\u002F_server-islands\u002F*"," goes to the site's Node server (",[638,1892,1893],{},"SITE_SERVER_URL",", default ",[638,1896,1897],{},"http:\u002F\u002Fshade-preview:4321","). It renders the parts of pages made per visitor, such as the Account greeting. Without it they keep their empty placeholder.",[801,1900,1901,1903,1904,1894,1906,1909,1910,1912,1913,1916],{},[638,1902,946],{}," goes to the API's public role (",[638,1905,1822],{},[638,1907,1908],{},"http:\u002F\u002Fshade-api:4000","; with the template, the router's domain, which sends the account route on to ",[638,1911,765],{},"). Build the site with ",[638,1914,1915],{},"SHADE_ACCOUNT_URL=https:\u002F\u002Fwww.example.com",", so forms and the account page post to the site's own domain.",[801,1918,1919,1920,1021,1922,1925],{},"Set the same ",[638,1921,1825],{},[638,1923,1924],{},"npx astro create-key",") as a build variable of both the static site and the Node server. It encrypts what those parts receive. The static site is rebuilt on every publish while the server keeps running, so a key that changed per build would break them.",[619,1927,1928,1929,755],{},"The static site contains every image its pages use, so it never calls SHADE. A static host can serve it instead of the static image: ",[623,1930,74],{"href":75},[619,1932,1933,1934,1937,1938,755],{},"Both site images send ",[638,1935,1936],{},"Strict-Transport-Security: max-age=31536000; includeSubDomains",". After a first visit, browsers use only HTTPS for the domain and all its subdomains for a year, so serve every subdomain (also ones outside SHADE) over HTTPS before going live. The other security headers are in ",[623,1939,265],{"href":1940},"\u002Fguide\u002Fpeople-and-security\u002Fprotection#security-headers",[786,1942,1944],{"id":1943},"publishing-rebuild","Publishing → rebuild",[798,1946,1947,1954,1960],{},[801,1948,1949,1950,1953],{},"Static site application → ",[743,1951,1952],{},"Webhooks → Deploy webhook"," (Coolify's name for the site's build hook). Copy the URL: it contains a token, so it is a secret.",[801,1955,1956,1957,1959],{},"Paste it into the website module's ",[743,1958,1849],{}," (Modules page, its Settings) and save.",[801,1961,1962],{},"Publishing triggers one rebuild after a 30-second quiet period, however many pages were published.",[786,1964,1966],{"id":1965},"client-programs-optional-shade-programs","Client programs (optional: shade-programs)",[619,1968,1969,1970,1972],{},"Only when the client runs programs of their own beside SHADE (",[623,1971,349],{"href":350},"). Without a host the instance still runs: client programs can be approved, but not run or called.",[619,1974,1975],{},"One host serves one instance. It holds the server's Docker socket, which is as good as root on that server, so it gets no domain and no published port. Only the instance reaches it, on the instance's network.",[798,1977,1978,1998,2020,2029,2266],{},[801,1979,1980,1983,1984,1850,1987,1990,1991,1994,1995,755],{},[743,1981,1982],{},"The image."," Until the first shade-programs release, build it from ",[638,1985,1986],{},"shadehq-dev\u002Fshade-programs",[743,1988,1989],{},"New resource → Application",", build pack ",[743,1992,1993],{},"Dockerfile",". After the release, use ",[638,1996,1997],{},"ghcr.io\u002Fshadehq-dev\u002Fshade-programs:\u003Cversion>",[801,1999,2000,2003,2004,2007,2008,2011,2012,2015,2016,2019],{},[743,2001,2002],{},"gVisor."," Install ",[638,2005,2006],{},"runsc"," on the server and register it with Docker (",[638,2009,2010],{},"runsc install",", then restart Docker), so untrusted client programs run under it. Without it, leave ",[638,2013,2014],{},"SHADE_PROGRAMS_GVISOR"," on: approved client programs are trusted and run either way, and an untrusted one refuses to start until gVisor is installed. ",[638,2017,2018],{},"off"," runs untrusted programs in plain containers, for development only.",[801,2021,2022,1850,2025,2028],{},[743,2023,2024],{},"A shared token",[638,2026,2027],{},"openssl rand -hex 32",", kept only in Coolify's environment settings.",[801,2030,2031,2034,2035,2038,2039,2249,2251,2252,2255,2256,2259,2260,766,2263,755],{},[743,2032,2033],{},"The host"," as a Docker Compose resource on the same server, on the instance's network (find it with ",[638,2036,2037],{},"docker inspect --format '{{json .NetworkSettings.Networks}}' \u003Cshade-api admin container>","):",[631,2040,2044],{"className":2041,"code":2042,"language":2043,"meta":636,"style":636},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","services:\n  shade-programs:\n    image: shade-programs\n    restart: unless-stopped\n    # The Docker socket and its group (stat -c %g \u002Fvar\u002Frun\u002Fdocker.sock): the one container that holds it.\n    group_add: ['\u003Csocket group id>']\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n      - shade-programs-data:\u002Fdata\n    environment:\n      SHADE_PROGRAMS_TOKEN: ${SHADE_PROGRAMS_TOKEN}\n      # The API as the client programs reach it: the admin container, which serves the content and data APIs.\n      SHADE_API_URL: http:\u002F\u002F\u003Cshade-api admin container>:4000\n      # This container's own name, so the host joins each client program's network for the egress proxy.\n      SHADE_PROGRAMS_CONTAINER: ${SHADE_PROGRAMS_CONTAINER}\n    networks:\n      - shade\nnetworks:\n  shade:\n    external: true\n    name: \u003Cthe instance's network>\nvolumes:\n  shade-programs-data:\n","yaml",[638,2045,2046,2054,2061,2071,2081,2087,2107,2114,2122,2129,2136,2146,2151,2161,2167,2178,2186,2194,2202,2210,2222,2233,2241],{"__ignoreMap":636},[641,2047,2048,2052],{"class":643,"line":644},[641,2049,2051],{"class":2050},"swJcz","services",[641,2053,1009],{"class":1175},[641,2055,2056,2059],{"class":643,"line":650},[641,2057,2058],{"class":2050},"  shade-programs",[641,2060,1009],{"class":1175},[641,2062,2063,2066,2068],{"class":643,"line":656},[641,2064,2065],{"class":2050},"    image",[641,2067,1585],{"class":1175},[641,2069,2070],{"class":1162}," shade-programs\n",[641,2072,2073,2076,2078],{"class":643,"line":662},[641,2074,2075],{"class":2050},"    restart",[641,2077,1585],{"class":1175},[641,2079,2080],{"class":1162}," unless-stopped\n",[641,2082,2083],{"class":643,"line":668},[641,2084,2086],{"class":2085},"sHwdD","    # The Docker socket and its group (stat -c %g \u002Fvar\u002Frun\u002Fdocker.sock): the one container that holds it.\n",[641,2088,2089,2092,2094,2097,2099,2102,2104],{"class":643,"line":674},[641,2090,2091],{"class":2050},"    group_add",[641,2093,1585],{"class":1175},[641,2095,2096],{"class":1175}," [",[641,2098,1230],{"class":1175},[641,2100,2101],{"class":1162},"\u003Csocket group id>",[641,2103,1230],{"class":1175},[641,2105,2106],{"class":1175},"]\n",[641,2108,2109,2112],{"class":643,"line":680},[641,2110,2111],{"class":2050},"    volumes",[641,2113,1009],{"class":1175},[641,2115,2116,2119],{"class":643,"line":686},[641,2117,2118],{"class":1175},"      -",[641,2120,2121],{"class":1162}," \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n",[641,2123,2124,2126],{"class":643,"line":692},[641,2125,2118],{"class":1175},[641,2127,2128],{"class":1162}," shade-programs-data:\u002Fdata\n",[641,2130,2131,2134],{"class":643,"line":698},[641,2132,2133],{"class":2050},"    environment",[641,2135,1009],{"class":1175},[641,2137,2138,2141,2143],{"class":643,"line":704},[641,2139,2140],{"class":2050},"      SHADE_PROGRAMS_TOKEN",[641,2142,1585],{"class":1175},[641,2144,2145],{"class":1162}," ${SHADE_PROGRAMS_TOKEN}\n",[641,2147,2148],{"class":643,"line":710},[641,2149,2150],{"class":2085},"      # The API as the client programs reach it: the admin container, which serves the content and data APIs.\n",[641,2152,2153,2156,2158],{"class":643,"line":716},[641,2154,2155],{"class":2050},"      SHADE_API_URL",[641,2157,1585],{"class":1175},[641,2159,2160],{"class":1162}," http:\u002F\u002F\u003Cshade-api admin container>:4000\n",[641,2162,2164],{"class":643,"line":2163},14,[641,2165,2166],{"class":2085},"      # This container's own name, so the host joins each client program's network for the egress proxy.\n",[641,2168,2170,2173,2175],{"class":643,"line":2169},15,[641,2171,2172],{"class":2050},"      SHADE_PROGRAMS_CONTAINER",[641,2174,1585],{"class":1175},[641,2176,2177],{"class":1162}," ${SHADE_PROGRAMS_CONTAINER}\n",[641,2179,2181,2184],{"class":643,"line":2180},16,[641,2182,2183],{"class":2050},"    networks",[641,2185,1009],{"class":1175},[641,2187,2189,2191],{"class":643,"line":2188},17,[641,2190,2118],{"class":1175},[641,2192,2193],{"class":1162}," shade\n",[641,2195,2197,2200],{"class":643,"line":2196},18,[641,2198,2199],{"class":2050},"networks",[641,2201,1009],{"class":1175},[641,2203,2205,2208],{"class":643,"line":2204},19,[641,2206,2207],{"class":2050},"  shade",[641,2209,1009],{"class":1175},[641,2211,2213,2216,2218],{"class":643,"line":2212},20,[641,2214,2215],{"class":2050},"    external",[641,2217,1585],{"class":1175},[641,2219,2221],{"class":2220},"sfNiH"," true\n",[641,2223,2225,2228,2230],{"class":643,"line":2224},21,[641,2226,2227],{"class":2050},"    name",[641,2229,1585],{"class":1175},[641,2231,2232],{"class":1162}," \u003Cthe instance's network>\n",[641,2234,2236,2239],{"class":643,"line":2235},22,[641,2237,2238],{"class":2050},"volumes",[641,2240,1009],{"class":1175},[641,2242,2244,2247],{"class":643,"line":2243},23,[641,2245,2246],{"class":2050},"  shade-programs-data",[641,2248,1009],{"class":1175},[862,2250],{},"Deploy it once, read the container's name (",[638,2253,2254],{},"docker ps --format '{{.Names}}' | grep shade-programs","), set ",[638,2257,2258],{},"SHADE_PROGRAMS_CONTAINER"," to it and deploy again. The host logs ",[638,2261,2262],{},"listening on 8090",[638,2264,2265],{},"egress proxy on 3128",[801,2267,2268,2271,2272,762,2274,766,2276,2278,2279,766,2282,2285,2286,2289],{},[743,2269,2270],{},"The instance",": in the environment of the ",[638,2273,761],{},[638,2275,765],{},[638,2277,749],{}," applications, set ",[638,2280,2281],{},"SHADE_PROGRAMS_URL=http:\u002F\u002F\u003Cshade-programs container>:8090",[638,2283,2284],{},"SHADE_PROGRAMS_TOKEN"," (the same token). Set both or neither: with one alone SHADE refuses to start. Redeploy and open ",[743,2287,2288],{},"Programs"," in the admin. No notice about the host means it answers.",[619,2291,2292,2293,2295],{},"Every setting of the host is in shade-programs' README. Adding, approving and starting a client program are on the ",[623,2294,349],{"href":350}," page.",[786,2297,2299],{"id":2298},"one-application-per-role","One application per role",[619,2301,2302],{},"The template is one resource, which restarts in a few seconds on an update. A rolling update, with no gap, needs a resource of its own for each container role. This section is that setup. The template's steps above do not apply to it: here Coolify's proxy sends the traffic to the applications itself, so each application gets its port and domain, and the account route needs a path on the admin's domain. The sections on the site, the modules and client programs hold as they are; where they name the router's domain, use the admin application's domain.",[1571,2304,1540],{"id":2305},"project-database-and-redis",[798,2307,2308,2314,2344,2347],{},[801,2309,2310,2313],{},[743,2311,2312],{},"Projects → New",", named after the client.",[801,2315,2316,2319,2320,2323,2324,2327,2328,2331,2332,2335,2336,2339,2340,2343],{},[743,2317,2318],{},"New resource → Database → PostgreSQL",", image ",[638,2321,2322],{},"postgres:18-alpine",". Postgres 18 keeps its data in ",[638,2325,2326],{},"\u002Fvar\u002Flib\u002Fpostgresql\u002F18\u002Fdocker",", so mount its persistent storage at ",[638,2329,2330],{},"\u002Fvar\u002Flib\u002Fpostgresql",", not ",[638,2333,2334],{},"\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata",". Make SHADE's three roles in it (",[623,2337,2338],{"href":1520},"The database's roles","; SQL under ",[623,2341,62],{"href":2342},"\u002Frun\u002Fown-server-by-hand#2-docker-compose","). Keep the internal address, which each role's address is built from.",[801,2345,2346],{},"Enable scheduled backups, to storage the client owns.",[801,2348,2349,2352,2353,1021,2356,2358,2359,2362,2363,2365,2366,2425,2427,2428,2431,2432,2435,2436,2439,2440,2443,2444,2447,2448,2450,2451,2454],{},[743,2350,2351],{},"Redis."," Every instance has one; the API does not start without it. Any server that speaks the Redis protocol works. The template ships ",[743,2354,2355],{},"Valkey",[638,2357,1535],{},"), which is BSD-licensed (Redis 8 is AGPLv3, RSALv2 or SSPL). Add it as ",[743,2360,2361],{},"New resource → Docker Image"," with no domain and no published port, the start command below, and a password of letters and digits (",[638,2364,2027],{},"; it goes into the address as it is).",[631,2367,2369],{"className":2041,"code":2368,"language":2043,"meta":636,"style":636},"environment:\n  VALKEYCLI_AUTH: ${REDIS_PASSWORD}\ncommand: ['sh', '-c', 'exec valkey-server --requirepass \"$$VALKEYCLI_AUTH\" --maxmemory 64mb --maxmemory-policy noeviction --appendonly no --save \"\"']\n",[638,2370,2371,2378,2388],{"__ignoreMap":636},[641,2372,2373,2376],{"class":643,"line":644},[641,2374,2375],{"class":2050},"environment",[641,2377,1009],{"class":1175},[641,2379,2380,2383,2385],{"class":643,"line":650},[641,2381,2382],{"class":2050},"  VALKEYCLI_AUTH",[641,2384,1585],{"class":1175},[641,2386,2387],{"class":1162}," ${REDIS_PASSWORD}\n",[641,2389,2390,2393,2395,2397,2399,2401,2403,2406,2409,2412,2414,2416,2418,2421,2423],{"class":643,"line":656},[641,2391,2392],{"class":2050},"command",[641,2394,1585],{"class":1175},[641,2396,2096],{"class":1175},[641,2398,1230],{"class":1175},[641,2400,869],{"class":1162},[641,2402,1230],{"class":1175},[641,2404,2405],{"class":1175},",",[641,2407,2408],{"class":1175}," '",[641,2410,2411],{"class":1162},"-c",[641,2413,1230],{"class":1175},[641,2415,2405],{"class":1175},[641,2417,2408],{"class":1175},[641,2419,2420],{"class":1162},"exec valkey-server --requirepass \"$$VALKEYCLI_AUTH\" --maxmemory 64mb --maxmemory-policy noeviction --appendonly no --save \"\"",[641,2422,1230],{"class":1175},[641,2424,2106],{"class":1175},[862,2426],{},"The password comes from ",[638,2429,2430],{},"REDIS_PASSWORD",", never written into the command; the health check ",[638,2433,2434],{},"valkey-cli"," reads the same variable. Coolify's own ",[743,2437,2438],{},"Database → Redis"," resource works too: set the same in its ",[743,2441,2442],{},"Custom Redis Configuration",", without ",[638,2445,2446],{},"requirepass",", which Coolify sets.",[862,2449],{},"Redis holds only work in flight (leases, the queue, messages between containers, rate-limit counters, the cache), so it needs no backup and no volume. A restart loses for good only the health history of modules and features, up to five minutes of request counts, and the tickets of a module approval or take-data export in progress (start those again). Queued jobs under way are sent again from Postgres within seconds. ",[638,2452,2453],{},"noeviction"," matters: a full Redis then refuses writes loudly, instead of quietly dropping a lease, which would let a schedule run twice.",[1571,2456,1494],{"id":2457},"api-and-admin",[798,2459,2460,2474,2483,2493,3194,3393,3418],{},[801,2461,2462,2464,2465,2467,2468,2471,2472,755],{},[743,2463,1989],{}," from this repository. Build pack ",[743,2466,1993],{},", location ",[638,2469,2470],{},"apps\u002Fapi\u002FDockerfile",", base directory ",[638,2473,1189],{},[801,2475,2476,2477,2480,2481,755],{},"Port ",[638,2478,2479],{},"4000",". Domain ",[638,2482,1580],{},[801,2484,2485,2488,2489,2492],{},[743,2486,2487],{},"Storage",": a persistent volume at ",[638,2490,2491],{},"\u002Fapp\u002Fdata"," (uploaded media).",[801,2494,2495,1021,2498,2501,2502,3170,3172,3173,3175,3176,3178,3179,3181,3182,3184,3185,1750,3187,3189,3190,3193],{},[743,2496,2497],{},"Environment variables",[638,2499,2500],{},".env.example"," lists all). The API reads an empty variable as unset and takes its default; only the required ones need a value. The site's build reads an empty variable as empty, so leave out there the ones it doesn't need.",[1303,2503,2504,2514],{},[1306,2505,2506],{},[1309,2507,2508,2511],{},[1312,2509,2510],{},"Variable",[1312,2512,2513],{},"Value",[1322,2515,2516,2527,2540,2557,2570,2586,2600,2611,2626,2637,2647,2673,2686,2705,2723,2741,2759,2786,2803,2824,2836,2862,2881,2910,2928,2942,2954,2976,2991,3009,3023,3036,3068,3084,3105,3122,3157],{},[1309,2517,2518,2523],{},[1327,2519,2520],{},[638,2521,2522],{},"SHADE_API_ROLE",[1327,2524,2525],{},[638,2526,761],{},[1309,2528,2529,2534],{},[1327,2530,2531],{},[638,2532,2533],{},"DATABASE_URL",[1327,2535,2536,2537],{},"internal Postgres URL, as the running role ",[638,2538,2539],{},"shade_app",[1309,2541,2542,2547],{},[1327,2543,2544],{},[638,2545,2546],{},"DATABASE_OWNER_URL",[1327,2548,2549,2550,2552,2553,2556],{},"the same address as the owner ",[638,2551,855],{},", on the admin only: it applies migrations (required with ",[638,2554,2555],{},"MIGRATE_ON_START",")",[1309,2558,2559,2564],{},[1327,2560,2561],{},[638,2562,2563],{},"REDIS_URL",[1327,2565,2566,2569],{},[638,2567,2568],{},"redis:\u002F\u002F:\u003Cpassword>@\u003Credis host>:6379"," (required)",[1309,2571,2572,2576],{},[1327,2573,2574],{},[638,2575,1297],{},[1327,2577,2578,2581,2582,2585],{},[638,2579,2580],{},"openssl rand -base64 48",". Keep it stable (sessions, preview links) and the same on every application. The ",[623,2583,2584],{"href":732},"template"," generates it",[1309,2587,2588,2593],{},[1327,2589,2590],{},[638,2591,2592],{},"APP_SECRET_PREVIOUS",[1327,2594,2595,2596,1021,2598,2556],{},"empty; only while you replace ",[638,2597,1297],{},[623,2599,54],{"href":55},[1309,2601,2602,2606],{},[1327,2603,2604],{},[638,2605,978],{},[1327,2607,2608,2610],{},[638,2609,1580],{},": where the API answers, and the team opens the admin",[1309,2612,2613,2617],{},[1327,2614,2615],{},[638,2616,981],{},[1327,2618,2619,2620,2623,2624],{},"optional: the admin's own address (",[623,2621,2622],{"href":985},"see above","). Empty: ",[638,2625,978],{},[1309,2627,2628,2632],{},[1327,2629,2630],{},[638,2631,1816],{},[1327,2633,2634,2636],{},[638,2635,1659],{},", the same as the site's (visitor email links point here)",[1309,2638,2639,2643],{},[1327,2640,2641],{},[638,2642,2555],{},[1327,2644,2645],{},[638,2646,1472],{},[1309,2648,2649,2654],{},[1327,2650,2651],{},[638,2652,2653],{},"STORAGE_DRIVER",[1327,2655,2656,2659,2660,2663,2664,766,2667,2670,2671,2556],{},[638,2657,2658],{},"local",", or ",[638,2661,2662],{},"s3"," with ",[638,2665,2666],{},"STORAGE_S3_*",[638,2668,2669],{},"STORAGE_PUBLIC_BASE_URL"," (examples per provider in ",[638,2672,2500],{},[1309,2674,2675,2679],{},[1327,2676,2677],{},[638,2678,1485],{},[1327,2680,2681,2682,2685],{},"optional: ",[638,2683,2684],{},"name=\u003Cpublic key>"," pairs for keys that signed modules may carry (the official modules' key, or your own). Server packages need one to install as trusted modules",[1309,2687,2688,2692],{},[1327,2689,2690],{},[638,2691,1475],{},[1327,2693,2694,2695,1850,2697,2699,2700,2704],{},"optional, ",[638,2696,1481],{},[638,2698,1472],{}," lets an admin approve a server package no trusted key signed, after signing in again with two-factor or a passkey (",[623,2701,2703],{"href":2702},"\u002Fguide\u002Fmodules\u002Fmanaging#approving-a-server-package","Approving a server package","). Environment only. Switched off again, approved packages stop running at the next start. Same value everywhere",[1309,2706,2707,2711],{},[1327,2708,2709],{},[638,2710,1704],{},[1327,2712,2713,2714,2717,2718,2722],{},"optional: a folder in the image with signed module packages and ",[638,2715,2716],{},"purposes.json",". While no module is installed, the admin's first step asks what the site is for and preselects modules (",[623,2719,2721],{"href":2720},"\u002Fguide\u002Fmodules\u002Fmanaging#setting-up-a-new-instance","Setting up a new instance","). Admin only",[1309,2724,2725,2730],{},[1327,2726,2727],{},[638,2728,2729],{},"SHADE_UPDATE_FEED_URL",[1327,2731,2732,2733,2736,2737,2722],{},"optional: https address of an update feed you choose; ",[743,2734,2735],{},"Settings → Updates"," then says when it lists a newer SHADE. Nothing is downloaded (",[623,2738,2740],{"href":2739},"\u002Frun\u002Fupdating-and-backups#knowing-when-there-is-a-new-version","Knowing when there is a new version",[1309,2742,2743,2747],{},[1327,2744,2745],{},[638,2746,1489],{},[1327,2748,2749,2750,766,2753,1021,2755,2556],{},"optional: the team's identity providers, with ",[638,2751,2752],{},"SHADE_OIDC_DOMAINS",[638,2754,1478],{},[623,2756,2758],{"href":2757},"\u002Fguide\u002Fpeople-and-security\u002Fidentity-providers#setting-it-up","Identity providers",[1309,2760,2761,2766],{},[1327,2762,2763],{},[638,2764,2765],{},"SHADE_SECURITY_CONTACT",[1327,2767,2768,2769,1021,2772,762,2775,2778,2779,2782,2783,2556],{},"optional: where security reports go, served at ",[638,2770,2771],{},"\u002F.well-known\u002Fsecurity.txt",[638,2773,2774],{},"mailto:",[638,2776,2777],{},"https:"," or ",[638,2780,2781],{},"tel:",", comma-separated). Set your own address: empty sends reports to the SHADE project (",[638,2784,2785],{},"mailto:security@shadehq.dev",[1309,2787,2788,2793],{},[1327,2789,2790],{},[638,2791,2792],{},"SHADE_SMTP_ALLOW_INTERNAL",[1327,2794,2694,2795,1850,2797,2799,2800,2802],{},[638,2796,1481],{},[638,2798,1472],{}," lets the email settings' SMTP server be inside the server's own network. Off, such a server is refused (",[623,2801,287],{"href":288},"). Environment only; same value everywhere",[1309,2804,2805,2810],{},[1327,2806,2807],{},[638,2808,2809],{},"SHADE_PROVIDER_URLS",[1327,2811,2681,2812,2815,2816,2819,2820,2823],{},[638,2813,2814],{},"\u003Cplugin>.\u003Cprovider>=\u003Curl>"," pairs, such as ",[638,2817,2818],{},"payments.mollie=http:\u002F\u002Flocalhost:4343\u002Fv2",", sending a module's outside provider to another address. Only for a local stand-in in tests or a proxy of your own; that module alone may then call it over ",[638,2821,2822],{},"http",". Environment only; empty in production",[1309,2825,2826,2831],{},[1327,2827,2828],{},[638,2829,2830],{},"SHADE_PROXY_SECRET",[1327,2832,2833,2834,2556],{},"optional, public role: for a site on a static host that forwards the account API (Cloudflare with forwarding, or Netlify). The same secret as the Worker's or Netlify site's, at least 32 characters (",[623,2835,74],{"href":75},[1309,2837,2838,2843],{},[1327,2839,2840],{},[638,2841,2842],{},"SHADE_ACCOUNT_COOKIE_DOMAIN",[1327,2844,2845,2846,2848,2849,2852,2853,2856,2857,2859,2860,2556],{},"optional: the domain of the account sign-in cookie, so subdomains of ",[638,2847,1816],{},"'s host get it too (",[638,2850,2851],{},"api.example.com",", for a static-host site whose personal parts render at ",[638,2854,2855],{},"islands.api.example.com","). Must be ",[638,2858,1816],{},"'s domain or a parent of it, never the site's own (SHADE warns). Same value everywhere (",[623,2861,74],{"href":75},[1309,2863,2864,2869],{},[1327,2865,2866],{},[638,2867,2868],{},"SHADE_LOG_FORMAT",[1327,2870,2694,2871,2874,2875,2877,2878,2556],{},[638,2872,2873],{},"json",": one JSON object per line. ",[638,2876,1104],{}," for development (",[623,2879,2880],{"href":91},"Logs, request ids and traces",[1309,2882,2883,2888],{},[1327,2884,2885],{},[638,2886,2887],{},"SHADE_TRUST_PROXY_IDS",[1327,2889,2694,2890,1850,2892,2894,2895,2898,2899,762,2902,2905,2906,2909],{},[638,2891,1481],{},[638,2893,1472],{}," keeps an incoming ",[638,2896,2897],{},"X-Request-Id"," (up to 64 letters, digits, ",[638,2900,2901],{},"-",[638,2903,2904],{},"_",") and continues a valid ",[638,2907,2908],{},"traceparent"," from a proxy of yours. Otherwise each request gets a new id and trace",[1309,2911,2912,2917],{},[1327,2913,2914],{},[638,2915,2916],{},"OTEL_EXPORTER_OTLP_ENDPOINT",[1327,2918,2919,2920,2923,2924,2556],{},"optional: your OpenTelemetry collector (",[638,2921,2922],{},"http:\u002F\u002Fotel-collector:4318","). Set, SHADE sends traces and logs over OTLP\u002FHTTP; the host must be yours or in the EU (",[623,2925,2927],{"href":2926},"\u002Frun\u002Flogs#traces-over-opentelemetry","Traces",[1309,2929,2930,2935],{},[1327,2931,2932],{},[638,2933,2934],{},"OTEL_EXPORTER_OTLP_HEADERS",[1327,2936,2937,2938,2941],{},"optional: headers for every export, ",[638,2939,2940],{},"name=value"," pairs, comma-separated",[1309,2943,2944,2949],{},[1327,2945,2946],{},[638,2947,2948],{},"OTEL_SERVICE_NAME",[1327,2950,2694,2951,2953],{},[638,2952,855],{},": the service name on spans and log records",[1309,2955,2956,2961],{},[1327,2957,2958],{},[638,2959,2960],{},"SHADE_METRICS_PORT",[1327,2962,2963,2964,2967,2968,2971,2972,2556],{},"optional: a port (",[638,2965,2966],{},"9464",") for ",[638,2969,2970],{},"GET \u002Fmetrics"," (Prometheus) on its own server. Keep it inside the network: no published port, no domain (",[623,2973,2975],{"href":2974},"\u002Frun\u002Flogs#metrics-for-prometheus","Metrics",[1309,2977,2978,2983],{},[1327,2979,2980],{},[638,2981,2982],{},"SHADE_METRICS_TOKEN",[1327,2984,2985,2986,2988,2989,2556],{},"required with ",[638,2987,2960],{},": Prometheus's bearer token, at least 32 characters (",[638,2990,2027],{},[1309,2992,2993,2998],{},[1327,2994,2995],{},[638,2996,2997],{},"SHADE_ERROR_REPORTING_DSN",[1327,2999,3000,3001,3004,3005,2556],{},"optional: DSN of a GlitchTip or Sentry project (",[638,3002,3003],{},"https:\u002F\u002F\u003Ckey>@\u003Chost>\u002F\u003Cproject>",") that each stored error is also sent to, scrubbed. The host must be yours or in the EU, and the client must know of it (",[623,3006,3008],{"href":3007},"\u002Frun\u002Flogs#error-reporting","Error reporting",[1309,3010,3011,3016],{},[1327,3012,3013],{},[638,3014,3015],{},"SHADE_ERROR_REPORTING_SITE",[1327,3017,2694,3018,1850,3020,3022],{},[638,3019,1481],{},[638,3021,1472],{}," also sends errors browsers wrote (sites, modules' admin parts)",[1309,3024,3025,3030],{},[1327,3026,3027],{},[638,3028,3029],{},"SHADE_ERROR_REPORTING_ENVIRONMENT",[1327,3031,3032,3033,2556],{},"optional: environment name on each report (",[638,3034,3035],{},"production",[1309,3037,3038,3042],{},[1327,3039,3040],{},[638,3041,1568],{},[1327,3043,3044,3045,3048,3049,3051,3052,3048,3055,766,3057,1021,3059,3061,3062,3064,3065,3067],{},"optional: how long a stopping container waits for requests and background work before exiting with code 1. Default ",[638,3046,3047],{},"120000"," on ",[638,3050,761],{}," (uploads can be long), ",[638,3053,3054],{},"30000",[638,3056,765],{},[638,3058,749],{},[638,3060,3054],{}," everywhere in development). Keep the container's ",[638,3063,1557],{}," (130 s on ",[638,3066,761],{},", 40 s elsewhere in the template) above it plus the drain delay",[1309,3069,3070,3074],{},[1327,3071,3072],{},[638,3073,1564],{},[1327,3075,2694,3076,3079,3080,3083],{},[638,3077,3078],{},"3000",": how long a stopping container keeps serving before it stops listening, so a proxy that hasn't noticed yet doesn't find its connection cut. ",[638,3081,3082],{},"0"," skips it",[1309,3085,3086,3091],{},[1327,3087,3088],{},[638,3089,3090],{},"SHADE_MIGRATION_WAIT_MS",[1327,3092,2694,3093,3096,3097,766,3099,3101,3102,3104],{},[638,3094,3095],{},"300000"," (5 minutes): how long ",[638,3098,765],{},[638,3100,749],{}," wait for the admin to apply migrations before stopping with an error. While waiting, ",[638,3103,1016],{}," answers 503",[1309,3106,3107,3112],{},[1327,3108,3109],{},[638,3110,3111],{},"SHADE_MAINTENANCE",[1327,3113,2694,3114,1850,3116,3118,3119,3121],{},[638,3115,1481],{},[638,3117,1472],{}," keeps this container in ",[623,3120,1046],{"href":95}," without a database or Redis, for a restore. Remove it afterwards",[1309,3123,3124,3150],{},[1327,3125,3126,762,3129,762,3132,762,3135,762,3138,762,3141,762,3144,762,3147],{},[638,3127,3128],{},"SHADE_LIMIT_STORAGE_MB",[638,3130,3131],{},"SHADE_LIMIT_DATABASE_MB",[638,3133,3134],{},"SHADE_LIMIT_ENTRIES",[638,3136,3137],{},"SHADE_LIMIT_TEAM_MEMBERS",[638,3139,3140],{},"SHADE_LIMIT_ACCOUNTS",[638,3142,3143],{},"SHADE_LIMIT_EMAILS_PER_DAY",[638,3145,3146],{},"SHADE_LIMIT_QUEUED_JOBS",[638,3148,3149],{},"SHADE_LIMIT_API_REQUESTS_PER_MONTH",[1327,3151,3152,3153,3156],{},"optional, empty (no limit): ",[623,3154,3155],{"href":99},"usage limits",", each a whole number from 1. Environment only; same values everywhere",[1309,3158,3159,3164],{},[1327,3160,3161],{},[638,3162,3163],{},"KEEP_ALIVE_TIMEOUT_MS",[1327,3165,2694,3166,3169],{},[638,3167,3168],{},"125000",": how long the API keeps an idle connection. It must exceed the proxy's idle timeout so the proxy closes first (Coolify's Traefik: 90 s)",[862,3171],{},"Several variables name addresses. ",[638,3174,978],{}," is where the API answers, ",[638,3177,981],{}," is where the team opens the admin, and ",[638,3180,1816],{}," is where visitors' browsers reach the account API. On the site, ",[638,3183,978],{}," is where its build reaches the API (on Coolify's network it may be ",[638,3186,1908],{},[638,3188,1822],{}," is where its Caddy forwards visitors (the API's public role). The site's own address is the Site URL setting (",[623,3191,3192],{"href":794},"Configure SHADE","), not a variable.",[801,3195,3196,3197,1585,3199,3347,3349,3351,3352,1021,3354,762,3356,762,3358,3360,3361,3363,3364,3366,3367,3369,3370,3372,3373,3376,3377,3379,3380,3382,3383,3385,3386,968,3389,3392],{},"Deploy, then check ",[638,3198,1008],{},[631,3200,3203],{"className":3201,"code":3202,"language":2873,"meta":636,"style":636},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\"ok\":true,\"role\":\"admin\",\"checks\":{\"redis\":\"up\",\"database\":\"up\",\"started\":\"up\",\"migrations\":\"up\",\"running\":\"up\",\"maintenance\":\"off\"}}\n",[638,3204,3205],{"__ignoreMap":636},[641,3206,3207,3210,3213,3217,3219,3222,3224,3227,3229,3231,3233,3235,3237,3239,3241,3244,3246,3249,3251,3253,3255,3257,3259,3262,3264,3266,3268,3270,3272,3274,3276,3278,3280,3282,3284,3286,3288,3290,3292,3294,3296,3298,3300,3302,3304,3306,3308,3310,3312,3314,3316,3318,3320,3322,3324,3326,3328,3330,3332,3334,3336,3338,3340,3342,3344],{"class":643,"line":644},[641,3208,3209],{"class":1175},"{",[641,3211,3212],{"class":1175},"\"",[641,3214,3216],{"class":3215},"spNyl","ok",[641,3218,3212],{"class":1175},[641,3220,3221],{"class":1175},":true,",[641,3223,3212],{"class":1175},[641,3225,3226],{"class":3215},"role",[641,3228,3212],{"class":1175},[641,3230,1585],{"class":1175},[641,3232,3212],{"class":1175},[641,3234,761],{"class":1162},[641,3236,3212],{"class":1175},[641,3238,2405],{"class":1175},[641,3240,3212],{"class":1175},[641,3242,3243],{"class":3215},"checks",[641,3245,3212],{"class":1175},[641,3247,3248],{"class":1175},":{",[641,3250,3212],{"class":1175},[641,3252,1024],{"class":1158},[641,3254,3212],{"class":1175},[641,3256,1585],{"class":1175},[641,3258,3212],{"class":1175},[641,3260,3261],{"class":1162},"up",[641,3263,3212],{"class":1175},[641,3265,2405],{"class":1175},[641,3267,3212],{"class":1175},[641,3269,1027],{"class":1158},[641,3271,3212],{"class":1175},[641,3273,1585],{"class":1175},[641,3275,3212],{"class":1175},[641,3277,3261],{"class":1162},[641,3279,3212],{"class":1175},[641,3281,2405],{"class":1175},[641,3283,3212],{"class":1175},[641,3285,1034],{"class":1158},[641,3287,3212],{"class":1175},[641,3289,1585],{"class":1175},[641,3291,3212],{"class":1175},[641,3293,3261],{"class":1162},[641,3295,3212],{"class":1175},[641,3297,2405],{"class":1175},[641,3299,3212],{"class":1175},[641,3301,1030],{"class":1158},[641,3303,3212],{"class":1175},[641,3305,1585],{"class":1175},[641,3307,3212],{"class":1175},[641,3309,3261],{"class":1162},[641,3311,3212],{"class":1175},[641,3313,2405],{"class":1175},[641,3315,3212],{"class":1175},[641,3317,1038],{"class":1158},[641,3319,3212],{"class":1175},[641,3321,1585],{"class":1175},[641,3323,3212],{"class":1175},[641,3325,3261],{"class":1162},[641,3327,3212],{"class":1175},[641,3329,2405],{"class":1175},[641,3331,3212],{"class":1175},[641,3333,1042],{"class":1158},[641,3335,3212],{"class":1175},[641,3337,1585],{"class":1175},[641,3339,3212],{"class":1175},[641,3341,2018],{"class":1162},[641,3343,3212],{"class":1175},[641,3345,3346],{"class":1175},"}}\n",[862,3348],{},[638,3350,1016],{}," is the readiness answer: 200 only when the container can do its work, else 503 with the failing check set to ",[638,3353,1020],{},[638,3355,1024],{},[638,3357,1027],{},[638,3359,1030],{}," while migrations are unapplied, ",[638,3362,1034],{}," while starting, ",[638,3365,1038],{}," once stopping). ",[638,3368,1042],{}," shows whether ",[623,3371,1046],{"href":95}," is on and never causes a 503. Coolify and the image's ",[638,3374,3375],{},"HEALTHCHECK"," call it. ",[638,3378,1050],{}," only says the process runs and never causes a restart over a database or Redis outage.",[862,3381],{},"The API refuses to start when ",[638,3384,2563],{}," is missing, has no password or Redis does not answer, and logs ",[638,3387,3388],{},"Cannot reach Redis at redis:\u002F\u002F:***@…",[638,3390,3391],{},"\"redis\":\"down\""," later means it lost Redis while running; it is out of service until Redis is back.",[801,3394,3395,3396,3398,3399,3404,3406,3407,3409,3410,3412,3413,3415,3416,1125],{},"Create the owner's account in the browser. While nobody has an account, the admin application's log (in Coolify: ",[743,3397,1097],{},") shows this block and repeats it every five minutes until the owner exists:",[631,3400,3402],{"className":3401,"code":1103,"language":1104},[1102],[638,3403,1103],{"__ignoreMap":636},[862,3405],{},"Search the log for ",[638,3408,1112],{}," (on the server: ",[638,3411,1116],{},"). Open the address, enter the code, your name, email address and a password. You are signed in as the first admin; set up two-factor or a passkey now. Afterwards the page is gone. Only someone who can read the server's logs gets the code, so nobody who finds a fresh instance first can own it. A nearly expired code is replaced in the block. ",[638,3414,1120],{}," in the container's terminal still makes an admin, for a script or behind a proxy that changes the ",[638,3417,1124],{},[801,3419,3420,3421,3424,3425,3427,3428,3431],{},"Keep Coolify's restart policy on ",[752,3422,3423],{},"unless stopped"," (the default). ",[743,3426,1080],{}," on the Modules screen, after installing a server package, stops the API gracefully and relies on Coolify starting it again. Packages are unpacked into ",[638,3429,3430],{},"\u002Fapp\u002Fdata\u002Fmodule-packages"," at every start.",[1571,3433,3435],{"id":3434},"public-role-visitor-facing-routes","Public role (visitor-facing routes)",[619,3437,3438],{},"Needed only when modules expose public routes (forms, appointments, commerce) and you want visitor traffic isolated from the team.",[798,3440,3441,3444,3477,3487],{},[801,3442,3443],{},"Add a second application from the same repository and Dockerfile.",[801,3445,1602,3446,766,3449,3452,3453,3455,3456,3458,3459,762,3461,762,3463,762,3465,762,3467,762,3469,762,3471,3473,3474,3476],{},[638,3447,3448],{},"SHADE_API_ROLE=public",[638,3450,3451],{},"MIGRATE_ON_START=false",". Copy ",[638,3454,2533],{}," (as ",[638,3457,2539],{},", never the owner's address), ",[638,3460,2563],{},[638,3462,1297],{},[638,3464,978],{},[638,3466,981],{},[638,3468,1816],{},[638,3470,1485],{},[638,3472,1475],{}," and any ",[638,3475,1489],{},". No volume: it never touches uploads. It loads the same server packages and restarts with the admin when asked.",[801,3478,3479,3480,3483,3484,3486],{},"Route ",[638,3481,3482],{},"https:\u002F\u002Fadmin.example.com\u002Fapi\u002Fv1\u002Faccount\u002F*"," (account sign-in included) to it with path-based routing in Coolify, or give it its own domain (such as ",[638,3485,1584],{},") and point the site's forms there.",[801,3488,3489],{},"Scale with replicas if a campaign or sale needs it.",[1571,3491,3493],{"id":3492},"worker-background-work","Worker (background work)",[619,3495,3496],{},"Required: without it nothing scheduled runs.",[798,3498,3499,3508,3516,3811,3839],{},[801,3500,3501,3502,3505,3506,755],{},"Add a third application from the same repository and Dockerfile, with ",[743,3503,3504],{},"no domain"," and no published port. It serves only ",[638,3507,1016],{},[801,3509,1602,3510,766,3513,3515],{},[638,3511,3512],{},"SHADE_API_ROLE=worker",[638,3514,3451],{}," (the admin migrates; start the worker after it). Copy the same variables as for the public role.",[801,3517,3518,3521,3522,3525,3526,3528,3529,3532,3533,3536,3537,3539,3542,3543,3546,3547,3549,3550,3552,3553,3637,3639,3640,3642,3643,3645,3646,1277,3648,755,3651,3653,3654,3657,3658,3661,3662,3712,3714,3717,3718,3720,3721,3723,3724,3727,3728,3795,3797,3798,762,3800,766,3803,3806,3807,3810],{},[743,3519,3520],{},"Storage."," With ",[638,3523,3524],{},"STORAGE_DRIVER=local",", mount the admin's volume at ",[638,3527,2491],{},": the worker removes left-behind media files and applies retention to them. Set ",[638,3530,3531],{},"MODULE_PACKAGES_DIR=\u002Fapp\u002Fpackages\u002Fmodule-packages"," (inside a writable ",[638,3534,3535],{},"\u002Fapp\u002Fpackages","), so it unpacks server packages into its own folder instead of emptying the admin's at every start.",[862,3538],{},[743,3540,3541],{},"Backups"," (optional). The worker takes an encrypted backup every night (",[623,3544,82],{"href":3545},"\u002Frun\u002Fupdating-and-backups#built-in-backups",") once it has the target and the key. Add these on the worker and the admin both, then deploy: ",[638,3548,1258],{}," without ",[638,3551,1300],{}," stops the API.",[1303,3554,3555,3563],{},[1306,3556,3557],{},[1309,3558,3559,3561],{},[1312,3560,2510],{},[1312,3562,2513],{},[1322,3564,3565,3579,3594,3607,3621],{},[1309,3566,3567,3571],{},[1327,3568,3569],{},[638,3570,1258],{},[1327,3572,3573,2778,3576],{},[638,3574,3575],{},"s3:\u002F\u002F\u003Cbucket>",[638,3577,3578],{},"s3:\u002F\u002F\u003Cbucket>\u002F\u003Cprefix>",[1309,3580,3581,3585],{},[1327,3582,3583],{},[638,3584,1300],{},[1327,3586,3587,3590,3591,3593],{},[638,3588,3589],{},"openssl rand -base64 32",", the same on both. Keep a copy with ",[638,3592,1297],{},", never in the bucket (the template generates it; keep the copy anyway)",[1309,3595,3596,3604],{},[1327,3597,3598,762,3601],{},[638,3599,3600],{},"SHADE_BACKUP_S3_ACCESS_KEY_ID",[638,3602,3603],{},"SHADE_BACKUP_S3_SECRET_ACCESS_KEY",[1327,3605,3606],{},"the bucket's keys, apart from the media's",[1309,3608,3609,3614],{},[1327,3610,3611],{},[638,3612,3613],{},"DATABASE_BACKUP_URL",[1327,3615,3616,3617,3620],{},"worker only: the address as the backup role ",[638,3618,3619],{},"shade_backup",", which runs the dump",[1309,3622,3623,3631],{},[1327,3624,3625,762,3628],{},[638,3626,3627],{},"SHADE_BACKUP_S3_ENDPOINT",[638,3629,3630],{},"SHADE_BACKUP_S3_REGION",[1327,3632,3633,3634,3636],{},"the service's address and region, as in ",[638,3635,2500],{}," (AWS needs only the region)",[862,3638],{},"The endpoint is the service's address without the bucket. Cloudflare R2 shows ",[638,3641,1268],{},": leave ",[638,3644,1272],{}," off, or SHADE refuses to start. A bucket with EU jurisdiction has its own address, ",[638,3647,1276],{},[638,3649,3650],{},"SHADE_BACKUP_S3_REGION=auto",[862,3652],{},"With ",[623,3655,3656],{"href":732},"the template as one resource",", set the target with ",[638,3659,3660],{},"node console\u002Fbackup-target.mjs set"," in the admin container instead, so the public container never holds the keys.",[1497,3663,3664,3671,3681,3692,3699,3709],{},[801,3665,3666,3667,3670],{},"The admin takes a backup before it applies migrations (",[638,3668,3669],{},"SHADE_BACKUP_BEFORE_MIGRATE=false"," skips it).",[801,3672,3673,3674,3676,3677,3680],{},"After both have deployed, the doctor (",[638,3675,1064],{},") passes its ",[638,3678,3679],{},"backup-key"," check.",[801,3682,3683,3684,3687,3688,3691],{},"The weekly restore rehearsal needs a scratch database: the template's ",[638,3685,3686],{},"postgres-rehearsal"," service, which the worker reaches through ",[638,3689,3690],{},"SHADE_BACKUP_REHEARSAL_DATABASE_URL",". Without the template, add a second small Postgres and set that address.",[801,3693,3694,3695,3698],{},"The admin card's ",[743,3696,3697],{},"Back up now"," queues a job the worker runs; it needs no setting.",[801,3700,3701,3702,3705,3706,3708],{},"A client who leaves gets the latest backup with ",[638,3703,3704],{},"node console\u002Frestore.mjs handover \u003Cfolder>",". The key and ",[638,3707,1297],{}," go to them apart from the folder.",[801,3710,3711],{},"Client programs keep their data in volumes of their own. Cover those with Coolify's volume backups: the built-in backup holds only the database and media.",[862,3713],{},[743,3715,3716],{},"The database's roles."," The template uses three Postgres roles (",[623,3719,2338],{"href":1520},"), made once on an empty volume by an init script of its ",[638,3722,1525],{}," service (",[638,3725,3726],{},"POSTGRES_PASSWORD"," is the bootstrap superuser's).",[1303,3729,3730,3745],{},[1306,3731,3732],{},[1309,3733,3734,3737,3740,3742],{},[1312,3735,3736],{},"Role",[1312,3738,3739],{},"Does",[1312,3741,2510],{},[1312,3743,3744],{},"Where",[1322,3746,3747,3763,3779],{},[1309,3748,3749,3753,3756,3760],{},[1327,3750,3751],{},[638,3752,2539],{},[1327,3754,3755],{},"runs every request and job",[1327,3757,3758],{},[638,3759,2533],{},[1327,3761,3762],{},"every container",[1309,3764,3765,3769,3772,3776],{},[1327,3766,3767],{},[638,3768,855],{},[1327,3770,3771],{},"owns the database, applies migrations",[1327,3773,3774],{},[638,3775,2546],{},[1327,3777,3778],{},"admin only",[1309,3780,3781,3785,3788,3792],{},[1327,3782,3783],{},[638,3784,3619],{},[1327,3786,3787],{},"reads everything for the dump",[1327,3789,3790],{},[638,3791,3613],{},[1327,3793,3794],{},"worker only",[862,3796],{},"Their passwords are ",[638,3799,1337],{},[638,3801,3802],{},"SHADE_DB_OWNER_PASSWORD",[638,3804,3805],{},"SHADE_DB_BACKUP_PASSWORD",", each generated on the first start when not set. The script needs Docker Compose 2.23.1 or newer (",[638,3808,3809],{},"configs: content","). A Postgres resource you add yourself needs the roles made the same way. A database made before the three roles needs a fresh one: nothing is converted.",[801,3812,3813,3816,3817,3819,3820,766,3822,1021,3824,3826,3827,3829,3830,3832,3833,3835,3836,3838],{},[743,3814,3815],{},"Stop grace",": 130 seconds on ",[638,3818,761],{},", 40 on ",[638,3821,765],{},[638,3823,749],{},[638,3825,1557],{}," in ",[638,3828,725],{},"). A stopping container turns ",[638,3831,1016],{}," to 503 and keeps serving for 3 seconds (",[638,3834,1564],{},"), then finishes its requests and closes live streams. A schedule's run in progress gets ",[638,3837,1568],{}," (30 seconds) less five, counted from the signal, before it is aborted and rolled back; schedules stop at once. A container still busy at the deadline exits with code 1 and logs what was running. An upload longer than the admin's 120 seconds fails, and the admin asks the person to try again.",[801,3840,3841,3842,3851,3853,3854,3857,3858,3860],{},"Deploy, then check from its terminal:",[631,3843,3845],{"className":867,"code":3844,"language":869,"meta":636,"style":636},"node -e \"fetch('http:\u002F\u002F127.0.0.1:4000\u002Fhealth').then(r => r.text()).then(console.log)\"\n",[638,3846,3847],{"__ignoreMap":636},[641,3848,3849],{"class":643,"line":644},[641,3850,3844],{},[862,3852],{},"Expect ",[638,3855,3856],{},"{\"ok\":true,\"role\":\"worker\",\"checks\":{…}}"," with every check ",[638,3859,3261],{},". Within ten seconds the worker writes its first heartbeat and the admin's background-work error goes away.",[619,3862,3863,3864,796],{},"Untrusted modules run in its sandbox too, so a schedule that publishes delivers the same events as the admin would. Several worker copies may run; a schedule's due time runs on one of them (see ",[623,3865,3867],{"href":3866},"#scaling-and-small-servers","Scaling",[786,3869,3871],{"id":3870},"the-small-profile","The small profile",[619,3873,3874,3875,3877,3878,3880,3881,3883,3884,3886,3887,3890],{},"An instance whose traffic one process carries (a brochure site, a small shop) may run SHADE as one container. ",[638,3876,816],{}," has Postgres, Redis and one ",[638,3879,855],{}," container with ",[638,3882,781],{},", which serves the admin, the content API and the visitor routes and runs the background work itself. It is supported and tested like the full template (same hardening, template test and release smoke test) and needs less memory: one API process instead of three, and no second Postgres. Give the ",[638,3885,855],{}," service the admin's domain; ",[638,3888,3889],{},"\u002Fapi\u002Fv1\u002Faccount"," is on it too.",[619,3892,3893],{},"What it gives up:",[1497,3895,3896,3902,3911],{},[801,3897,3898,3901],{},[743,3899,3900],{},"Visitors and the team share one process."," A spike on the account API or on a server-rendered frontend's content reads slows the admin, and the reverse.",[801,3903,3904,3907,3908,3910],{},[743,3905,3906],{},"One restart takes everything down at once",": admin, visitor routes and background work. There is no update without a gap, and ",[638,3909,765],{}," cannot be scaled alone.",[801,3912,3913,3916,3917,796],{},[743,3914,3915],{},"No weekly restore rehearsal."," There is no scratch database. Backups still run and are checked but never restored on their own, so restore one by hand now and then (",[623,3918,82],{"href":83},[619,3920,3921,3922,3925,3926,3928],{},"The admin never shows ",[752,3923,3924],{},"Background work is not running",". Moving to the full template later keeps the same database, Redis and data volume: deploy ",[638,3927,725],{}," with the same variables and volumes.",[786,3930,3932],{"id":3931},"scaling-and-small-servers","Scaling and small servers",[1497,3934,3935,4020,4026,4035,4044],{},[801,3936,3937,3940,3941,3944,3945],{},[743,3938,3939],{},"Memory",": a small server (1–2 vCPU, 2 GB RAM) is enough. The images set ",[638,3942,3943],{},"NODE_OPTIONS=--max-old-space-size"," (192 MB for the API, 128 MB for preview); adjust per server. Roughly:",[1303,3946,3947,3957],{},[1306,3948,3949],{},[1309,3950,3951,3954],{},[1312,3952,3953],{},"Process",[1312,3955,3956],{},"Approx. memory",[1322,3958,3959,3967,3975,3987,4001,4012],{},[1309,3960,3961,3964],{},[1327,3962,3963],{},"Coolify (app, proxy, Postgres, Redis)",[1327,3965,3966],{},"0.5–1 GB",[1309,3968,3969,3972],{},[1327,3970,3971],{},"Postgres for the client",[1327,3973,3974],{},"100–250 MB",[1309,3976,3977,3980],{},[1327,3978,3979],{},"Redis for the client",[1327,3981,3982,3983,3986],{},"capped at 64 MB (",[638,3984,3985],{},"maxmemory","); the container at 128 MB",[1309,3988,3989,3998],{},[1327,3990,3991,3992,762,3994,766,3996],{},"API ",[638,3993,761],{},[638,3995,765],{},[638,3997,749],{},[1327,3999,4000],{},"~85 MB each (the worker more while a schedule runs)",[1309,4002,4003,4009],{},[1327,4004,4005,4006,4008],{},"Site ",[638,4007,1737],{}," (Caddy)",[1327,4010,4011],{},"~20 MB",[1309,4013,4014,4017],{},[1327,4015,4016],{},"Site build on publish",[1327,4018,4019],{},"300–800 MB for a minute",[801,4021,4022,4025],{},[743,4023,4024],{},"Site builds"," are the largest spike. On a very small server, build the site in CI (GitHub Actions) and deploy only the static image.",[801,4027,4028,4031,4032,4034],{},[743,4029,4030],{},"Heavy traffic",": the site is static files. Put a CDN in the client's own account in front of ",[638,4033,1881],{}," if needed, or move the site to its own server.",[801,4036,4037,4040,4041,4043],{},[743,4038,4039],{},"Visitor-facing load"," (forms, checkout, and the content reads of a server-rendered frontend) goes to the ",[638,4042,765],{}," role: add replicas.",[801,4045,4046,4049],{},[743,4047,4048],{},"Background work"," can run on several workers. Each due time of a schedule runs on one of them, which holds a Redis lease meanwhile, so more workers never run a schedule twice. One is enough for most instances; a second keeps schedules running while the first restarts. Once an instance runs containers on more than one server, media go to S3: a local volume is seen by one server only.",[786,4051,4053],{"id":4052},"updating-and-handover","Updating and handover",[1497,4055,4056,4063,4066],{},[801,4057,4058,4059,4062],{},"Push to the tracked branch or ",[743,4060,4061],{},"Redeploy",". The API applies new migrations on start.",[801,4064,4065],{},"Redeploy the site after an update that changes how pages render.",[801,4067,4068,4069,4071],{},"A developer taking over needs repository access, the Coolify server, ",[638,4070,1297],{}," and the database backups. Redis needs nothing: everything in it is rebuilt after a restart.",[1571,4073,4075],{"id":4074},"before-each-release","Before each release",[619,4077,4078,4079,2038],{},"Each SHADE release is first checked by its release gates (",[638,4080,4081],{},"pnpm release:gates",[1497,4083,4084,4091,4102,4108,4114],{},[801,4085,4086,4087,4090],{},"Better Auth's security advisories against the pinned version (",[638,4088,4089],{},"pnpm advisories:better-auth",");",[801,4092,4093,4094,4097,4098,4101],{},"the dependencies (",[638,4095,4096],{},"pnpm security:audit",") and the image (",[638,4099,4100],{},"pnpm security:scan image \u003Cimage>",") scanned;",[801,4103,4104,4105,4090],{},"the image started with the deployment template's settings (",[638,4106,4107],{},"pnpm deploy:smoke --image \u003Cimage>",[801,4109,4110,4111,4090],{},"every package packed and checked (",[638,4112,4113],{},"pnpm release:packages --dry-run",[801,4115,4116],{},"the tests green.",[619,4118,4119,4120,755],{},"The security checks around a release, and the server's hardening, are in ",[623,4121,541],{"href":552},[786,4123,4125],{"id":4124},"details","Details",[1497,4127,4128,4146,4159,4171,4254,4291,4396,4457],{},[801,4129,4130,4133,4134,4137,4138,4141,4142,4145],{},[743,4131,4132],{},"Sandbox caps"," for untrusted modules, per instance: ",[638,4135,4136],{},"SANDBOX_MEMORY_MB"," (default 128, the heap cap of each module's workerd process) and ",[638,4139,4140],{},"SANDBOX_CPU_PERCENT"," (default 50, of one core, averaged over a minute). CPU watching works on Linux only (it reads ",[638,4143,4144],{},"\u002Fproc","); elsewhere only the memory cap applies.",[801,4147,4148,4151,4152,4154,4155,4158],{},[743,4149,4150],{},"Payments module",": needs ",[638,4153,978],{},". Without it checkouts are refused, because Mollie needs the webhook address ",[638,4156,4157],{},"\u003CSHADE_API_URL>\u002Fapi\u002Fv1\u002Faccount\u002Fpayments\u002Fwebhook"," (served only where the instance runs the public role).",[801,4160,4161,4166,4167,4170],{},[743,4162,4163],{},[638,4164,4165],{},"BODY_LIMIT_BYTES"," (optional, default 1 MiB, at least 1024) caps every request under ",[638,4168,4169],{},"\u002Fapi",", user API and webhooks included. Over it the answer is 413.",[801,4172,4173,4176,4177,4245,4247,4248,4250,4251,4253],{},[743,4174,4175],{},"Container roles"," and what each serves:",[1497,4178,4179,4208,4229,4237],{},[801,4180,4181,4183,4184,4187,4188,4191,4192,4195,4196,4199,4200,762,4203,762,4206,755],{},[638,4182,761],{},": admin screens, admin API ",[638,4185,4186],{},"\u002Fapi\u002F*"," (session cookie), content API ",[638,4189,4190],{},"\u002Fapi\u002Fv1\u002Fcontent\u002F*"," (read or build token), data API ",[638,4193,4194],{},"\u002Fapi\u002Fv1\u002Fdata\u002F*"," (data token), MCP ",[638,4197,4198],{},"\u002Fapi\u002Fmcp"," (MCP token), module routes ",[638,4201,4202],{},"\u002Fapi\u002Fpackages\u002F*",[638,4204,4205],{},"\u002Fuploads",[638,4207,1016],{},[801,4209,4210,1850,4212,4214,4215,766,4217,4220,4221,4223,4224,4226,4227,755],{},[638,4211,765],{},[638,4213,946],{}," (forms, user accounts, payment webhook, modules' ",[638,4216,765],{},[638,4218,4219],{},"user"," routes), the content API ",[638,4222,4190],{}," with its search (read token only) and ",[638,4225,1016],{},". Everything else is 404: a build token, the data API and MCP stay on ",[638,4228,761],{},[801,4230,4231,4233,4234,4236],{},[638,4232,749],{},": only ",[638,4235,1016],{},". Runs scheduled publish, retention and the modules' schedules; needs no address.",[801,4238,4239,4241,4242,755],{},[638,4240,772],{}," (default): development and the ",[623,4243,4244],{"href":776},"small profile",[862,4246],{},"An admin route on a ",[638,4249,765],{}," process, or an account API route on an ",[638,4252,761],{}," process, answers 404. So visitor traffic and floods hit processes that cannot reach editor routes or uploads, and the public role scales on its own.",[801,4255,4256,4259,4260,4262,4263,4266,4267,4269,4270,4272,4273,4276,4277,4279,4280,4283,4284,4286,4287,4290],{},[743,4257,4258],{},"A server-rendered frontend"," reads the content API from the ",[638,4261,765],{}," container with a read token, so its traffic never loads the admin: on Coolify's network at ",[638,4264,4265],{},"http:\u002F\u002F\u003Cpublic service>:4000",", or at a domain of the ",[638,4268,765],{}," application's own. Its ",[638,4271,1016],{}," is the readiness answer, so a proxy stops sending reads while it cannot reach Postgres. Builds keep the admin's address: a build token and ",[638,4274,4275],{},"\u002Fapi\u002Fv1\u002Fcontent\u002Fmodule-sites"," are refused on ",[638,4278,765],{},", so never route ",[638,4281,4282],{},"\u002Fapi\u002Fv1\u002Fcontent"," on the admin's domain to it. Module routes are served only under the prefix matching their auth mode: a ",[638,4285,765],{}," route is never reachable under ",[638,4288,4289],{},"\u002Fapi\u002Fpackages",", and vice versa.",[801,4292,4293,1585,4296,4370,4372,4373,4375,4376,4379,4380,4382,4383,2778,4386,4388,4389,766,4392,4395],{},[743,4294,4295],{},"Site Docker targets",[1497,4297,4298,4327,4336],{},[801,4299,4300,4302,4303,4306,4307,4310,4311,1819,4314,4317,4318,4320,4321,766,4323,947,4325,755],{},[638,4301,1737],{},": Caddy on :8080 (",[638,4304,4305],{},"Caddyfile","). Assets and ",[638,4308,4309],{},"\u002Fmedia\u002F*"," cached for a year, HTML must revalidate (",[638,4312,4313],{},"Cache-Control: max-age=0, must-revalidate",[638,4315,4316],{},"\u002Fpreview*"," answers 404, ",[638,4319,1889],{}," goes to ",[638,4322,1893],{},[638,4324,946],{},[638,4326,1822],{},[801,4328,4329,4331,4332,4335],{},[638,4330,1765],{},": the Node server (",[638,4333,4334],{},"dist\u002Fserver\u002Fentry.mjs",") on :4321.",[801,4337,4338,1850,4340,4343,4344,4347,4348,4351,4352,4355,4356,4358,4359,4362,4363,4366,4367,4369],{},[638,4339,1794],{},[638,4341,4342],{},"runner\u002Frunner.mjs"," builds into a new ",[638,4345,4346],{},"builds\u002Fbuild-\u003Ctime>"," folder, switches the ",[638,4349,4350],{},"current"," link in one step, restarts the Node server and keeps the newest two builds (",[638,4353,4354],{},"SITE_KEEP_BUILDS","). After a restart the previous build's Node server starts at once, so ",[638,4357,1802],{}," and islands work while the new build runs. Caddy (",[638,4360,4361],{},"Caddyfile.runner",") serves ",[638,4364,4365],{},"current\u002Fclient"," and proxies ",[638,4368,4316],{}," and islands to the Node server in the same container.",[862,4371],{},"The read token is a BuildKit secret in the ",[638,4374,1737],{}," build, so it is not stored in an image layer. Changing the Site URL reaches forms and sign-in at once (within a minute if Redis was away). The build takes Astro's ",[638,4377,4378],{},"site"," from the Site URL setting. It fails on an API error other than 404 for pages, site data, data sources, forms, the styles or the header and footer, on a missing media file, or on a Pagefind error (",[638,4381,1802],{}," and the canvas show what they can instead). Building uses a ",[638,4384,4385],{},"read",[638,4387,1645],{}," token whose services check ",[638,4390,4391],{},"content.read",[638,4393,4394],{},"media.read",". Preview links are signed for 10 minutes.",[801,4397,4398,4401,4402,4404,4405,4408,4409],{},[743,4399,4400],{},"Runner rebuild endpoint",": SHADE posts to ",[638,4403,1853],{}," without headers, so the token goes in the query (",[638,4406,4407],{},"Authorization: Bearer"," also works).",[1497,4410,4411,4424,4427,4432,4450],{},[801,4412,4413,4414,4417,4418,4420,4421,755],{},"A wrong or missing token answers ",[638,4415,4416],{},"401",". Without ",[638,4419,1829],{}," set, every rebuild is refused. Accepted: ",[638,4422,4423],{},"202 {\"queued\":true}",[801,4425,4426],{},"A server that stops on its own is started again (up to five times in a row, waiting longer each time). A failed build leaves no folder.",[801,4428,4429,4430,755],{},"The build and the server never see ",[638,4431,1829],{},[801,4433,4434,4436,4437,968,4440,4442,4443,4445,4446,4449],{},[638,4435,1857],{}," answers ",[638,4438,4439],{},"{ ok, busy, builds, failures, lastError, lastBuiltAt, server }",[638,4441,3216],{}," is false until a first build succeeded and after a failed one. The status is 503 (Docker's ",[638,4444,3375],{}," marks the container unhealthy) only while no build is served: a failed build after a good one keeps the previous site online and the container healthy, with the failure in ",[638,4447,4448],{},"lastError",", the log and the report to SHADE.",[801,4451,4452,4453,766,4455,755],{},"After each build the runner reports the outcome to SHADE with ",[638,4454,978],{},[638,4456,1753],{},[801,4458,4459,4462,4463,4466,4467,4470],{},[743,4460,4461],{},"Rebuild timing",": the quiet period is ",[638,4464,4465],{},"REBUILD_DEBOUNCE_MS"," (default 30 seconds) and the capped wait ",[638,4468,4469],{},"REBUILD_MAX_WAIT_MS"," (default 2 minutes, never less than the debounce).",[4472,4473,4474],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"title":636,"searchDepth":650,"depth":650,"links":4476},[4477,4480,4481,4482,4483,4484,4490,4491,4492,4495],{"id":788,"depth":650,"text":733,"children":4478},[4479],{"id":1573,"depth":656,"text":1574},{"id":1626,"depth":650,"text":795},{"id":1711,"depth":650,"text":1712},{"id":1943,"depth":650,"text":1944},{"id":1965,"depth":650,"text":1966},{"id":2298,"depth":650,"text":2299,"children":4485},[4486,4487,4488,4489],{"id":2305,"depth":656,"text":1540},{"id":2457,"depth":656,"text":1494},{"id":3434,"depth":656,"text":3435},{"id":3492,"depth":656,"text":3493},{"id":3870,"depth":650,"text":3871},{"id":3931,"depth":650,"text":3932},{"id":4052,"depth":650,"text":4053,"children":4493},[4494],{"id":4074,"depth":656,"text":4075},{"id":4124,"depth":650,"text":4125},"md",null,{},true,{"title":46,"description":636},"KjYrDD_1fe-hep-4kQT8ScbQjw2R5_42-FuhALSAcEA",[4503,4504],{"title":35,"path":36,"stem":37,"description":636,"children":-1},{"title":50,"path":51,"stem":52,"description":636,"children":-1},1796500150683]