[{"data":1,"prerenderedAt":3154},["ShallowReactive",2],{"navigation_docs":3,"-run-own-server-by-hand":613,"-run-own-server-by-hand-surround":3151},[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":62,"body":615,"description":855,"extension":3146,"links":3147,"meta":3148,"navigation":1304,"path":63,"seo":3149,"stem":64,"__hash__":3150},"docs\u002F2.run\u002F13.own-server-by-hand.md",{"type":616,"value":617,"toc":3136},"minimark",[618,635,654,659,662,701,708,774,825,842,846,849,935,971,1001,1007,1028,1043,1055,1059,1075,1087,1139,1144,2027,2065,2167,2184,2192,2195,2221,2254,2264,2329,2339,2361,2367,2371,2430,2452,2482,2488,2492,2502,2529,2548,2563,2691,2706,2712,2730,2734,2751,2827,2858,2888,2892,2985,2989,3132],[619,620,621,622,625,626,630,631,634],"p",{},"The reference behind ",[623,624,70],"a",{"href":71},", where ",[627,628,629],"code",{},"shade install"," and ",[627,632,633],{},"shade update"," do all of\nthis for you. Read on when you run SHADE with a proxy of your own, without Docker, or want to know what each part does.",[619,636,637,638,641,642,645,646,649,650,653],{},"SHADE runs on any Linux server with Docker, or with plain Node.js. This page sets one up without Coolify: Postgres,\nRedis, SHADE's image in its three container roles (",[627,639,640],{},"admin",", which also serves the admin screens; ",[627,643,644],{},"public",", the visitor\nroutes and the content reads of server-rendered frontends; ",[627,647,648],{},"worker",", the background work) and the site, behind a reverse proxy for HTTPS. Every instance has a worker:\nwithout one, scheduled publish, retention and the modules' schedules do not run, and the admin says so on every\nscreen. ",[623,651,652],{"href":47},"Setting up an instance\n(Coolify)"," explains the parts in more detail; everything there about SHADE's settings applies here\ntoo.",[655,656,658],"h2",{"id":657},"where-the-secrets-go","Where the secrets go",[619,660,661],{},"SHADE has two kinds of secrets:",[663,664,665,692],"ul",{},[666,667,668,672,673,676,677,630,680,683,684,687,688,691],"li",{},[669,670,671],"strong",{},"The server's own",", which it needs before it can start: ",[627,674,675],{},"DATABASE_URL"," (and the owner's and backup role's addresses,\n",[627,678,679],{},"DATABASE_OWNER_URL",[627,681,682],{},"DATABASE_BACKUP_URL",", in files of their own below), ",[627,685,686],{},"REDIS_URL"," (with Redis's password) and\n",[627,689,690],{},"APP_SECRET"," (it signs sessions and encrypts the secrets stored in the database), and the storage keys when media\nare on S3. They live in an env\nfile on the server.",[666,693,694,697,698,700],{},[669,695,696],{},"Everything else"," is entered in the admin, never in a file: mail and payment keys (Settings), and modules'\nAPI keys (Modules). SHADE stores them encrypted with ",[627,699,690],{}," and never shows them again. A module cannot read\nenvironment variables: its package is refused when it tries.",[619,702,703,704,707],{},"The env file is the equivalent of WordPress's ",[627,705,706],{},"wp-config.php",", kept safer:",[709,710,711,724],"table",{},[712,713,714],"thead",{},[715,716,717,721],"tr",{},[718,719,720],"th",{},"WordPress",[718,722,723],{},"SHADE",[725,726,727,741,753,766],"tbody",{},[715,728,729,735],{},[730,731,732,734],"td",{},[627,733,706],{},", inside the web folder, safe as long as PHP runs it instead of serving it",[730,736,737,740],{},[627,738,739],{},"\u002Fetc\u002Fshade\u002Fshade.env",", outside the app; SHADE never serves its app folder anyway",[715,742,743,750],{},[730,744,745,746,749],{},"moving it one folder up and ",[627,747,748],{},"chmod 400"," are recommendations",[730,751,752],{},"SHADE refuses to start when other users of the server can read or change the file, or when it sits in a folder SHADE serves",[715,754,755,758],{},[730,756,757],{},"keys and salts generated at install",[730,759,760,763,764],{},[627,761,762],{},"env-file"," writes a new file with a generated ",[627,765,690],{},[715,767,768,771],{},[730,769,770],{},"modules' API keys stored readable in the database",[730,772,773],{},"stored encrypted, filled in on the Modules screen",[619,775,776,779,780,783,784,787,788,791,792,795,796,799,800,799,803,799,806,799,809,799,812,799,815,799,818,799,821,824],{},[627,777,778],{},"SHADE_ENV_FILE"," names the file; it may name several, separated by commas (the admin reads ",[627,781,782],{},"shade.env"," and\n",[627,785,786],{},"shade-owner.env",", step 2). SHADE reads them at start, also in production, and ",[627,789,790],{},"create-admin"," reads it too.\nVariables set in the environment itself win over the file (the Docker image sets its paths that way: ",[627,793,794],{},"NODE_ENV",",\n",[627,797,798],{},"HOST",", ",[627,801,802],{},"PORT",[627,804,805],{},"ADMIN_DIST",[627,807,808],{},"MIGRATIONS_DIR",[627,810,811],{},"OPERATOR_STEPS_FILE",[627,813,814],{},"LOCALES_DIR",[627,816,817],{},"MODULE_PACKAGES_DIR",[627,819,820],{},"STORAGE_LOCAL_ROOT",[627,822,823],{},"NODE_OPTIONS","; leave them\nout of the file). The permission check works on Linux and macOS; on Windows, protect the file with its access rules.",[619,826,827,834,835,837,838,841],{},[669,828,829,830,833],{},"Why a mounted file rather than Docker Compose's ",[627,831,832],{},"env_file",":"," ",[627,836,832],{}," copies the values into the container's\nconfiguration, where anyone allowed to run ",[627,839,840],{},"docker inspect"," reads them. A file mounted read-only keeps its\npermissions, and SHADE checks them.",[655,843,845],{"id":844},"_1-the-env-file","1. The env file",[619,847,848],{},"On the server, with SHADE's image built (step 2) or pulled:",[850,851,856],"pre",{"className":852,"code":853,"language":854,"meta":855,"style":855},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","sudo mkdir -p \u002Fetc\u002Fshade\nsudo docker run --rm --user root -v \u002Fetc\u002Fshade:\u002Fetc\u002Fshade shade node console\u002Fnew-env-file.mjs \u002Fetc\u002Fshade\u002Fshade.env --url https:\u002F\u002Fadmin.example.com\nsudo chown 1000:1000 \u002Fetc\u002Fshade\u002Fshade.env\n","bash","",[627,857,858,877,921],{"__ignoreMap":855},[859,860,863,867,871,874],"span",{"class":861,"line":862},"line",1,[859,864,866],{"class":865},"sBMFI","sudo",[859,868,870],{"class":869},"sfazB"," mkdir",[859,872,873],{"class":869}," -p",[859,875,876],{"class":869}," \u002Fetc\u002Fshade\n",[859,878,880,882,885,888,891,894,897,900,903,906,909,912,915,918],{"class":861,"line":879},2,[859,881,866],{"class":865},[859,883,884],{"class":869}," docker",[859,886,887],{"class":869}," run",[859,889,890],{"class":869}," --rm",[859,892,893],{"class":869}," --user",[859,895,896],{"class":869}," root",[859,898,899],{"class":869}," -v",[859,901,902],{"class":869}," \u002Fetc\u002Fshade:\u002Fetc\u002Fshade",[859,904,905],{"class":869}," shade",[859,907,908],{"class":869}," node",[859,910,911],{"class":869}," console\u002Fnew-env-file.mjs",[859,913,914],{"class":869}," \u002Fetc\u002Fshade\u002Fshade.env",[859,916,917],{"class":869}," --url",[859,919,920],{"class":869}," https:\u002F\u002Fadmin.example.com\n",[859,922,924,926,929,932],{"class":861,"line":923},3,[859,925,866],{"class":865},[859,927,928],{"class":869}," chown",[859,930,931],{"class":869}," 1000:1000",[859,933,934],{"class":869}," \u002Fetc\u002Fshade\u002Fshade.env\n",[619,936,937,938,940,941,944,945,948,949,952,953,955,956,959,960,962,963,966,967,970],{},"It writes the variables to fill in, with a new ",[627,939,690],{},", readable by its owner only (",[627,942,943],{},"chmod 600","), and never\noverwrites a file. The container runs as user 1000 (",[627,946,947],{},"node","), hence the ",[627,950,951],{},"chown",". Fill in ",[627,954,675],{}," (in the\nCompose file below: ",[627,957,958],{},"postgres:\u002F\u002Fshade_app:\u003Cpassword>@postgres:5432\u002Fshade",", the running role) and ",[627,961,686],{},"\n(",[627,964,965],{},"redis:\u002F\u002F:\u003Credis password>@redis:6379","), and check ",[627,968,969],{},"SHADE_API_URL",".",[619,972,973,974,976,977,980,981,984,985,988,989,991,992,996,997,1000],{},"Two more files, each with one line, mode 600 and owned by user 1000 like the first: ",[627,975,786],{}," with\n",[627,978,979],{},"DATABASE_OWNER_URL=postgres:\u002F\u002Fshade:\u003Cowner password>@postgres:5432\u002Fshade",", which only the admin container mounts, and\n",[627,982,983],{},"shade-backup.env"," with ",[627,986,987],{},"DATABASE_BACKUP_URL=postgres:\u002F\u002Fshade_backup:\u003Cbackup password>@postgres:5432\u002Fshade",", which only\nthe worker mounts. Both name the same host, port and database as ",[627,990,675],{},". The three roles are explained in\n",[623,993,995],{"href":994},"\u002Frun\u002Fown-server#the-databases-roles","The database's roles",". From a SHADE checkout,\n",[627,998,999],{},"pnpm env:new \u002Fetc\u002Fshade\u002Fshade.env --url https:\u002F\u002Fadmin.example.com"," does the same.",[619,1002,1003,1004,1006],{},"Keep the file in your backups, with the database: without its ",[627,1005,690],{}," the encrypted secrets cannot be read and\neveryone has to sign in again.",[619,1008,1009,1010,1013,1014,1018,1019,1022,1023,1027],{},"Two lines decide which modules may be trusted. ",[627,1011,1012],{},"SHADE_TRUSTED_MODULE_KEYS"," lists the keys\nwhose signed server packages install. You can trust more than one key per signer: ask your module supplier for\ntheir backup key too (",[623,1015,1017],{"href":1016},"\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling#keeping-a-signing-key","Keeping a signing key",").\n",[627,1020,1021],{},"SHADE_PACKAGE_APPROVAL=true"," also lets an admin approve a server package nobody signed, after signing in again with\ntheir password and two-factor or a passkey (",[623,1024,1026],{"href":1025},"\u002Fguide\u002Fmodules\u002Fmanaging#approving-a-server-package","Approving a server package","). It is off when left\nout, and it lives only here: nobody can switch it on from the admin, not even with an admin's session. Switch it on\nonly for an instance whose admins you trust to review code; switched off again, approved packages stop running at the\nnext start.",[619,1029,1030,1033,1034,1037,1038,1042],{},[627,1031,1032],{},"SHADE_MODULE_CATALOGUE"," may point at a folder of signed module packages with a ",[627,1035,1036],{},"purposes.json",". A new instance\nthen asks its first admin what the site is for and preselects modules from it\n(",[623,1039,1041],{"href":1040},"\u002Fguide\u002Fmodules\u002Fmanaging#setting-up-a-new-instance","Setting up a new instance","). Every package still\ninstalls through the admin's checks and consent.",[619,1044,1045,1046,1049,1050,1054],{},"The team can sign in with the client's Microsoft Entra ID, Google Workspace or Keycloak: set the ",[627,1047,1048],{},"SHADE_OIDC_*"," lines\nfor it (",[623,1051,1053],{"href":1052},"\u002Fguide\u002Fpeople-and-security\u002Fidentity-providers#setting-it-up","Identity providers","). Like the\napproval switch, they live only here.",[655,1056,1058],{"id":1057},"_2-docker-compose","2. Docker Compose",[619,1060,1061,1062,1065,1066,1069,1070,1074],{},"The setup below runs the three container roles apart. A small instance may run them as one ",[627,1063,1064],{},"all"," container instead:\nthe SHADE repository's ",[627,1067,1068],{},"deploy\u002Fcompose.small.yml",", with what that gives up (",[623,1071,1073],{"href":1072},"\u002Frun\u002Fcoolify#the-small-profile","the small\nprofile",").",[619,1076,1077,1078,1082,1083,1086],{},"Build the images from the ",[623,1079,1081],{"href":1080},"\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling#the-shade-workspace","SHADE workspace"," (",[627,1084,1085],{},"git clone --recurse-submodules","; the site builds on SHADE's packages next to it). The workspace is for SHADE's maintainers\nfor now, and a tested route for everyone else comes later:",[850,1088,1090],{"className":852,"code":1089,"language":854,"meta":855,"style":855},"docker build -f shade\u002Fapps\u002Fapi\u002FDockerfile -t shade shade\ndocker build -f site\u002FDockerfile --target runner -t shade-site .\n",[627,1091,1092,1114],{"__ignoreMap":855},[859,1093,1094,1097,1100,1103,1106,1109,1111],{"class":861,"line":862},[859,1095,1096],{"class":865},"docker",[859,1098,1099],{"class":869}," build",[859,1101,1102],{"class":869}," -f",[859,1104,1105],{"class":869}," shade\u002Fapps\u002Fapi\u002FDockerfile",[859,1107,1108],{"class":869}," -t",[859,1110,905],{"class":869},[859,1112,1113],{"class":869}," shade\n",[859,1115,1116,1118,1120,1122,1125,1128,1131,1133,1136],{"class":861,"line":879},[859,1117,1096],{"class":865},[859,1119,1099],{"class":869},[859,1121,1102],{"class":869},[859,1123,1124],{"class":869}," site\u002FDockerfile",[859,1126,1127],{"class":869}," --target",[859,1129,1130],{"class":869}," runner",[859,1132,1108],{"class":869},[859,1134,1135],{"class":869}," shade-site",[859,1137,1138],{"class":869}," .\n",[619,1140,1141,833],{},[627,1142,1143],{},"\u002Fsrv\u002Fshade\u002Fdocker-compose.yml",[850,1145,1149],{"className":1146,"code":1147,"language":1148,"meta":855,"style":855},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","services:\n  postgres:\n    image: postgres:18-alpine\n    restart: unless-stopped\n    environment:\n      POSTGRES_USER: postgres\n      POSTGRES_DB: postgres\n      POSTGRES_PASSWORD_FILE: \u002Frun\u002Fsecrets\u002Fpostgres-password\n    volumes:\n      # Postgres 18 keeps its data in \u002Fvar\u002Flib\u002Fpostgresql\u002F18\u002Fdocker, inside this volume.\n      - postgres-data:\u002Fvar\u002Flib\u002Fpostgresql\n      - \u002Fetc\u002Fshade\u002Fpostgres-password:\u002Frun\u002Fsecrets\u002Fpostgres-password:ro\n      - \u002Fetc\u002Fshade\u002Fshade-db-owner-password:\u002Frun\u002Fsecrets\u002Fshade-db-owner-password:ro\n      - \u002Fetc\u002Fshade\u002Fshade-db-password:\u002Frun\u002Fsecrets\u002Fshade-db-password:ro\n      - \u002Fetc\u002Fshade\u002Fshade-db-backup-password:\u002Frun\u002Fsecrets\u002Fshade-db-backup-password:ro\n      # Makes SHADE's three roles and its database on the first start (decision 0007 point 9): none a superuser.\n      - \u002Fetc\u002Fshade\u002Fpostgres-init.sh:\u002Fdocker-entrypoint-initdb.d\u002F10-shade-roles.sh:ro\n\n  # Work in flight only: a password, refusing writes when full instead of evicting, nothing on disk.\n  # Valkey, BSD-licensed; any server that speaks the Redis protocol works.\n  redis:\n    image: valkey\u002Fvalkey:9.1-alpine\n    restart: unless-stopped\n    user: valkey\n    read_only: true\n    tmpfs:\n      - \u002Fdata\n    volumes:\n      - \u002Fetc\u002Fshade\u002Fredis.conf:\u002Fetc\u002Fredis.conf:ro\n    command: valkey-server \u002Fetc\u002Fredis.conf\n\n  # The team, the admin screens, the content API, MCP and uploads; it migrates the database, as the owner.\n  shade:\n    image: shade\n    restart: unless-stopped\n    depends_on: [postgres, redis]\n    environment:\n      SHADE_ENV_FILE: \u002Frun\u002Fshade\u002Fshade.env,\u002Frun\u002Fshade\u002Fshade-owner.env\n      SHADE_API_ROLE: admin\n      MIGRATE_ON_START: 'true'\n    volumes:\n      - \u002Fetc\u002Fshade\u002Fshade.env:\u002Frun\u002Fshade\u002Fshade.env:ro\n      - \u002Fetc\u002Fshade\u002Fshade-owner.env:\u002Frun\u002Fshade\u002Fshade-owner.env:ro\n      - shade-data:\u002Fapp\u002Fdata\n    ports:\n      - '127.0.0.1:4000:4000'\n\n  # The account API (forms, accounts, checkout, plugins' public routes).\n  public:\n    image: shade\n    restart: unless-stopped\n    depends_on: [shade]\n    environment:\n      SHADE_ENV_FILE: \u002Frun\u002Fshade\u002Fshade.env\n      SHADE_API_ROLE: public\n      MIGRATE_ON_START: 'false'\n      MODULE_PACKAGES_DIR: \u002Ftmp\u002Fmodule-packages\n    volumes:\n      - \u002Fetc\u002Fshade\u002Fshade.env:\u002Frun\u002Fshade\u002Fshade.env:ro\n    ports:\n      - '127.0.0.1:4001:4000'\n\n  # The background work: core's and the plugins' schedules. No port: it serves only \u002Fhealth.\n  worker:\n    image: shade\n    restart: unless-stopped\n    depends_on: [shade]\n    stop_grace_period: 40s\n    environment:\n      SHADE_ENV_FILE: \u002Frun\u002Fshade\u002Fshade.env,\u002Frun\u002Fshade\u002Fshade-backup.env\n      SHADE_API_ROLE: worker\n      MIGRATE_ON_START: 'false'\n      # Its own copy of the server packages: never the admin's, which it would empty at every start.\n      MODULE_PACKAGES_DIR: \u002Ftmp\u002Fmodule-packages\n    volumes:\n      - \u002Fetc\u002Fshade\u002Fshade.env:\u002Frun\u002Fshade\u002Fshade.env:ro\n      # The backup role's address: only the worker takes the dump.\n      - \u002Fetc\u002Fshade\u002Fshade-backup.env:\u002Frun\u002Fshade\u002Fshade-backup.env:ro\n      # The media it cleans up (left-behind files, retention).\n      - shade-data:\u002Fapp\u002Fdata\n\n  site:\n    image: shade-site\n    restart: unless-stopped\n    depends_on: [shade, public]\n    # The site's build token reads published content only; its file is the site's own.\n    env_file: \u002Fetc\u002Fshade\u002Fsite.env\n    environment:\n      SHADE_API_URL: http:\u002F\u002Fshade:4000\n      ACCOUNT_API_URL: http:\u002F\u002Fpublic:4000\n    volumes:\n      - site-builds:\u002Fapp\u002Fsite\u002Fbuilds\n    ports:\n      - '127.0.0.1:8080:8080'\n\nvolumes:\n  postgres-data:\n  shade-data:\n  site-builds:\n","yaml",[627,1150,1151,1161,1168,1178,1189,1197,1208,1218,1229,1237,1244,1253,1261,1269,1277,1285,1291,1299,1306,1312,1318,1326,1336,1345,1356,1368,1376,1384,1391,1399,1410,1415,1421,1429,1438,1447,1470,1477,1488,1499,1516,1523,1531,1539,1547,1555,1567,1572,1578,1586,1595,1604,1618,1625,1635,1645,1659,1670,1677,1684,1691,1703,1708,1714,1722,1731,1740,1753,1764,1771,1781,1791,1804,1810,1819,1826,1833,1839,1847,1853,1860,1865,1873,1883,1892,1910,1916,1927,1934,1945,1956,1963,1971,1978,1990,1995,2003,2011,2019],{"__ignoreMap":855},[859,1152,1153,1157],{"class":861,"line":862},[859,1154,1156],{"class":1155},"swJcz","services",[859,1158,1160],{"class":1159},"sMK4o",":\n",[859,1162,1163,1166],{"class":861,"line":879},[859,1164,1165],{"class":1155},"  postgres",[859,1167,1160],{"class":1159},[859,1169,1170,1173,1175],{"class":861,"line":923},[859,1171,1172],{"class":1155},"    image",[859,1174,833],{"class":1159},[859,1176,1177],{"class":869}," postgres:18-alpine\n",[859,1179,1181,1184,1186],{"class":861,"line":1180},4,[859,1182,1183],{"class":1155},"    restart",[859,1185,833],{"class":1159},[859,1187,1188],{"class":869}," unless-stopped\n",[859,1190,1192,1195],{"class":861,"line":1191},5,[859,1193,1194],{"class":1155},"    environment",[859,1196,1160],{"class":1159},[859,1198,1200,1203,1205],{"class":861,"line":1199},6,[859,1201,1202],{"class":1155},"      POSTGRES_USER",[859,1204,833],{"class":1159},[859,1206,1207],{"class":869}," postgres\n",[859,1209,1211,1214,1216],{"class":861,"line":1210},7,[859,1212,1213],{"class":1155},"      POSTGRES_DB",[859,1215,833],{"class":1159},[859,1217,1207],{"class":869},[859,1219,1221,1224,1226],{"class":861,"line":1220},8,[859,1222,1223],{"class":1155},"      POSTGRES_PASSWORD_FILE",[859,1225,833],{"class":1159},[859,1227,1228],{"class":869}," \u002Frun\u002Fsecrets\u002Fpostgres-password\n",[859,1230,1232,1235],{"class":861,"line":1231},9,[859,1233,1234],{"class":1155},"    volumes",[859,1236,1160],{"class":1159},[859,1238,1240],{"class":861,"line":1239},10,[859,1241,1243],{"class":1242},"sHwdD","      # Postgres 18 keeps its data in \u002Fvar\u002Flib\u002Fpostgresql\u002F18\u002Fdocker, inside this volume.\n",[859,1245,1247,1250],{"class":861,"line":1246},11,[859,1248,1249],{"class":1159},"      -",[859,1251,1252],{"class":869}," postgres-data:\u002Fvar\u002Flib\u002Fpostgresql\n",[859,1254,1256,1258],{"class":861,"line":1255},12,[859,1257,1249],{"class":1159},[859,1259,1260],{"class":869}," \u002Fetc\u002Fshade\u002Fpostgres-password:\u002Frun\u002Fsecrets\u002Fpostgres-password:ro\n",[859,1262,1264,1266],{"class":861,"line":1263},13,[859,1265,1249],{"class":1159},[859,1267,1268],{"class":869}," \u002Fetc\u002Fshade\u002Fshade-db-owner-password:\u002Frun\u002Fsecrets\u002Fshade-db-owner-password:ro\n",[859,1270,1272,1274],{"class":861,"line":1271},14,[859,1273,1249],{"class":1159},[859,1275,1276],{"class":869}," \u002Fetc\u002Fshade\u002Fshade-db-password:\u002Frun\u002Fsecrets\u002Fshade-db-password:ro\n",[859,1278,1280,1282],{"class":861,"line":1279},15,[859,1281,1249],{"class":1159},[859,1283,1284],{"class":869}," \u002Fetc\u002Fshade\u002Fshade-db-backup-password:\u002Frun\u002Fsecrets\u002Fshade-db-backup-password:ro\n",[859,1286,1288],{"class":861,"line":1287},16,[859,1289,1290],{"class":1242},"      # Makes SHADE's three roles and its database on the first start (decision 0007 point 9): none a superuser.\n",[859,1292,1294,1296],{"class":861,"line":1293},17,[859,1295,1249],{"class":1159},[859,1297,1298],{"class":869}," \u002Fetc\u002Fshade\u002Fpostgres-init.sh:\u002Fdocker-entrypoint-initdb.d\u002F10-shade-roles.sh:ro\n",[859,1300,1302],{"class":861,"line":1301},18,[859,1303,1305],{"emptyLinePlaceholder":1304},true,"\n",[859,1307,1309],{"class":861,"line":1308},19,[859,1310,1311],{"class":1242},"  # Work in flight only: a password, refusing writes when full instead of evicting, nothing on disk.\n",[859,1313,1315],{"class":861,"line":1314},20,[859,1316,1317],{"class":1242},"  # Valkey, BSD-licensed; any server that speaks the Redis protocol works.\n",[859,1319,1321,1324],{"class":861,"line":1320},21,[859,1322,1323],{"class":1155},"  redis",[859,1325,1160],{"class":1159},[859,1327,1329,1331,1333],{"class":861,"line":1328},22,[859,1330,1172],{"class":1155},[859,1332,833],{"class":1159},[859,1334,1335],{"class":869}," valkey\u002Fvalkey:9.1-alpine\n",[859,1337,1339,1341,1343],{"class":861,"line":1338},23,[859,1340,1183],{"class":1155},[859,1342,833],{"class":1159},[859,1344,1188],{"class":869},[859,1346,1348,1351,1353],{"class":861,"line":1347},24,[859,1349,1350],{"class":1155},"    user",[859,1352,833],{"class":1159},[859,1354,1355],{"class":869}," valkey\n",[859,1357,1359,1362,1364],{"class":861,"line":1358},25,[859,1360,1361],{"class":1155},"    read_only",[859,1363,833],{"class":1159},[859,1365,1367],{"class":1366},"sfNiH"," true\n",[859,1369,1371,1374],{"class":861,"line":1370},26,[859,1372,1373],{"class":1155},"    tmpfs",[859,1375,1160],{"class":1159},[859,1377,1379,1381],{"class":861,"line":1378},27,[859,1380,1249],{"class":1159},[859,1382,1383],{"class":869}," \u002Fdata\n",[859,1385,1387,1389],{"class":861,"line":1386},28,[859,1388,1234],{"class":1155},[859,1390,1160],{"class":1159},[859,1392,1394,1396],{"class":861,"line":1393},29,[859,1395,1249],{"class":1159},[859,1397,1398],{"class":869}," \u002Fetc\u002Fshade\u002Fredis.conf:\u002Fetc\u002Fredis.conf:ro\n",[859,1400,1402,1405,1407],{"class":861,"line":1401},30,[859,1403,1404],{"class":1155},"    command",[859,1406,833],{"class":1159},[859,1408,1409],{"class":869}," valkey-server \u002Fetc\u002Fredis.conf\n",[859,1411,1413],{"class":861,"line":1412},31,[859,1414,1305],{"emptyLinePlaceholder":1304},[859,1416,1418],{"class":861,"line":1417},32,[859,1419,1420],{"class":1242},"  # The team, the admin screens, the content API, MCP and uploads; it migrates the database, as the owner.\n",[859,1422,1424,1427],{"class":861,"line":1423},33,[859,1425,1426],{"class":1155},"  shade",[859,1428,1160],{"class":1159},[859,1430,1432,1434,1436],{"class":861,"line":1431},34,[859,1433,1172],{"class":1155},[859,1435,833],{"class":1159},[859,1437,1113],{"class":869},[859,1439,1441,1443,1445],{"class":861,"line":1440},35,[859,1442,1183],{"class":1155},[859,1444,833],{"class":1159},[859,1446,1188],{"class":869},[859,1448,1450,1453,1455,1458,1461,1464,1467],{"class":861,"line":1449},36,[859,1451,1452],{"class":1155},"    depends_on",[859,1454,833],{"class":1159},[859,1456,1457],{"class":1159}," [",[859,1459,1460],{"class":869},"postgres",[859,1462,1463],{"class":1159},",",[859,1465,1466],{"class":869}," redis",[859,1468,1469],{"class":1159},"]\n",[859,1471,1473,1475],{"class":861,"line":1472},37,[859,1474,1194],{"class":1155},[859,1476,1160],{"class":1159},[859,1478,1480,1483,1485],{"class":861,"line":1479},38,[859,1481,1482],{"class":1155},"      SHADE_ENV_FILE",[859,1484,833],{"class":1159},[859,1486,1487],{"class":869}," \u002Frun\u002Fshade\u002Fshade.env,\u002Frun\u002Fshade\u002Fshade-owner.env\n",[859,1489,1491,1494,1496],{"class":861,"line":1490},39,[859,1492,1493],{"class":1155},"      SHADE_API_ROLE",[859,1495,833],{"class":1159},[859,1497,1498],{"class":869}," admin\n",[859,1500,1502,1505,1507,1510,1513],{"class":861,"line":1501},40,[859,1503,1504],{"class":1155},"      MIGRATE_ON_START",[859,1506,833],{"class":1159},[859,1508,1509],{"class":1159}," '",[859,1511,1512],{"class":869},"true",[859,1514,1515],{"class":1159},"'\n",[859,1517,1519,1521],{"class":861,"line":1518},41,[859,1520,1234],{"class":1155},[859,1522,1160],{"class":1159},[859,1524,1526,1528],{"class":861,"line":1525},42,[859,1527,1249],{"class":1159},[859,1529,1530],{"class":869}," \u002Fetc\u002Fshade\u002Fshade.env:\u002Frun\u002Fshade\u002Fshade.env:ro\n",[859,1532,1534,1536],{"class":861,"line":1533},43,[859,1535,1249],{"class":1159},[859,1537,1538],{"class":869}," \u002Fetc\u002Fshade\u002Fshade-owner.env:\u002Frun\u002Fshade\u002Fshade-owner.env:ro\n",[859,1540,1542,1544],{"class":861,"line":1541},44,[859,1543,1249],{"class":1159},[859,1545,1546],{"class":869}," shade-data:\u002Fapp\u002Fdata\n",[859,1548,1550,1553],{"class":861,"line":1549},45,[859,1551,1552],{"class":1155},"    ports",[859,1554,1160],{"class":1159},[859,1556,1558,1560,1562,1565],{"class":861,"line":1557},46,[859,1559,1249],{"class":1159},[859,1561,1509],{"class":1159},[859,1563,1564],{"class":869},"127.0.0.1:4000:4000",[859,1566,1515],{"class":1159},[859,1568,1570],{"class":861,"line":1569},47,[859,1571,1305],{"emptyLinePlaceholder":1304},[859,1573,1575],{"class":861,"line":1574},48,[859,1576,1577],{"class":1242},"  # The account API (forms, accounts, checkout, plugins' public routes).\n",[859,1579,1581,1584],{"class":861,"line":1580},49,[859,1582,1583],{"class":1155},"  public",[859,1585,1160],{"class":1159},[859,1587,1589,1591,1593],{"class":861,"line":1588},50,[859,1590,1172],{"class":1155},[859,1592,833],{"class":1159},[859,1594,1113],{"class":869},[859,1596,1598,1600,1602],{"class":861,"line":1597},51,[859,1599,1183],{"class":1155},[859,1601,833],{"class":1159},[859,1603,1188],{"class":869},[859,1605,1607,1609,1611,1613,1616],{"class":861,"line":1606},52,[859,1608,1452],{"class":1155},[859,1610,833],{"class":1159},[859,1612,1457],{"class":1159},[859,1614,1615],{"class":869},"shade",[859,1617,1469],{"class":1159},[859,1619,1621,1623],{"class":861,"line":1620},53,[859,1622,1194],{"class":1155},[859,1624,1160],{"class":1159},[859,1626,1628,1630,1632],{"class":861,"line":1627},54,[859,1629,1482],{"class":1155},[859,1631,833],{"class":1159},[859,1633,1634],{"class":869}," \u002Frun\u002Fshade\u002Fshade.env\n",[859,1636,1638,1640,1642],{"class":861,"line":1637},55,[859,1639,1493],{"class":1155},[859,1641,833],{"class":1159},[859,1643,1644],{"class":869}," public\n",[859,1646,1648,1650,1652,1654,1657],{"class":861,"line":1647},56,[859,1649,1504],{"class":1155},[859,1651,833],{"class":1159},[859,1653,1509],{"class":1159},[859,1655,1656],{"class":869},"false",[859,1658,1515],{"class":1159},[859,1660,1662,1665,1667],{"class":861,"line":1661},57,[859,1663,1664],{"class":1155},"      MODULE_PACKAGES_DIR",[859,1666,833],{"class":1159},[859,1668,1669],{"class":869}," \u002Ftmp\u002Fmodule-packages\n",[859,1671,1673,1675],{"class":861,"line":1672},58,[859,1674,1234],{"class":1155},[859,1676,1160],{"class":1159},[859,1678,1680,1682],{"class":861,"line":1679},59,[859,1681,1249],{"class":1159},[859,1683,1530],{"class":869},[859,1685,1687,1689],{"class":861,"line":1686},60,[859,1688,1552],{"class":1155},[859,1690,1160],{"class":1159},[859,1692,1694,1696,1698,1701],{"class":861,"line":1693},61,[859,1695,1249],{"class":1159},[859,1697,1509],{"class":1159},[859,1699,1700],{"class":869},"127.0.0.1:4001:4000",[859,1702,1515],{"class":1159},[859,1704,1706],{"class":861,"line":1705},62,[859,1707,1305],{"emptyLinePlaceholder":1304},[859,1709,1711],{"class":861,"line":1710},63,[859,1712,1713],{"class":1242},"  # The background work: core's and the plugins' schedules. No port: it serves only \u002Fhealth.\n",[859,1715,1717,1720],{"class":861,"line":1716},64,[859,1718,1719],{"class":1155},"  worker",[859,1721,1160],{"class":1159},[859,1723,1725,1727,1729],{"class":861,"line":1724},65,[859,1726,1172],{"class":1155},[859,1728,833],{"class":1159},[859,1730,1113],{"class":869},[859,1732,1734,1736,1738],{"class":861,"line":1733},66,[859,1735,1183],{"class":1155},[859,1737,833],{"class":1159},[859,1739,1188],{"class":869},[859,1741,1743,1745,1747,1749,1751],{"class":861,"line":1742},67,[859,1744,1452],{"class":1155},[859,1746,833],{"class":1159},[859,1748,1457],{"class":1159},[859,1750,1615],{"class":869},[859,1752,1469],{"class":1159},[859,1754,1756,1759,1761],{"class":861,"line":1755},68,[859,1757,1758],{"class":1155},"    stop_grace_period",[859,1760,833],{"class":1159},[859,1762,1763],{"class":869}," 40s\n",[859,1765,1767,1769],{"class":861,"line":1766},69,[859,1768,1194],{"class":1155},[859,1770,1160],{"class":1159},[859,1772,1774,1776,1778],{"class":861,"line":1773},70,[859,1775,1482],{"class":1155},[859,1777,833],{"class":1159},[859,1779,1780],{"class":869}," \u002Frun\u002Fshade\u002Fshade.env,\u002Frun\u002Fshade\u002Fshade-backup.env\n",[859,1782,1784,1786,1788],{"class":861,"line":1783},71,[859,1785,1493],{"class":1155},[859,1787,833],{"class":1159},[859,1789,1790],{"class":869}," worker\n",[859,1792,1794,1796,1798,1800,1802],{"class":861,"line":1793},72,[859,1795,1504],{"class":1155},[859,1797,833],{"class":1159},[859,1799,1509],{"class":1159},[859,1801,1656],{"class":869},[859,1803,1515],{"class":1159},[859,1805,1807],{"class":861,"line":1806},73,[859,1808,1809],{"class":1242},"      # Its own copy of the server packages: never the admin's, which it would empty at every start.\n",[859,1811,1813,1815,1817],{"class":861,"line":1812},74,[859,1814,1664],{"class":1155},[859,1816,833],{"class":1159},[859,1818,1669],{"class":869},[859,1820,1822,1824],{"class":861,"line":1821},75,[859,1823,1234],{"class":1155},[859,1825,1160],{"class":1159},[859,1827,1829,1831],{"class":861,"line":1828},76,[859,1830,1249],{"class":1159},[859,1832,1530],{"class":869},[859,1834,1836],{"class":861,"line":1835},77,[859,1837,1838],{"class":1242},"      # The backup role's address: only the worker takes the dump.\n",[859,1840,1842,1844],{"class":861,"line":1841},78,[859,1843,1249],{"class":1159},[859,1845,1846],{"class":869}," \u002Fetc\u002Fshade\u002Fshade-backup.env:\u002Frun\u002Fshade\u002Fshade-backup.env:ro\n",[859,1848,1850],{"class":861,"line":1849},79,[859,1851,1852],{"class":1242},"      # The media it cleans up (left-behind files, retention).\n",[859,1854,1856,1858],{"class":861,"line":1855},80,[859,1857,1249],{"class":1159},[859,1859,1546],{"class":869},[859,1861,1863],{"class":861,"line":1862},81,[859,1864,1305],{"emptyLinePlaceholder":1304},[859,1866,1868,1871],{"class":861,"line":1867},82,[859,1869,1870],{"class":1155},"  site",[859,1872,1160],{"class":1159},[859,1874,1876,1878,1880],{"class":861,"line":1875},83,[859,1877,1172],{"class":1155},[859,1879,833],{"class":1159},[859,1881,1882],{"class":869}," shade-site\n",[859,1884,1886,1888,1890],{"class":861,"line":1885},84,[859,1887,1183],{"class":1155},[859,1889,833],{"class":1159},[859,1891,1188],{"class":869},[859,1893,1895,1897,1899,1901,1903,1905,1908],{"class":861,"line":1894},85,[859,1896,1452],{"class":1155},[859,1898,833],{"class":1159},[859,1900,1457],{"class":1159},[859,1902,1615],{"class":869},[859,1904,1463],{"class":1159},[859,1906,1907],{"class":869}," public",[859,1909,1469],{"class":1159},[859,1911,1913],{"class":861,"line":1912},86,[859,1914,1915],{"class":1242},"    # The site's build token reads published content only; its file is the site's own.\n",[859,1917,1919,1922,1924],{"class":861,"line":1918},87,[859,1920,1921],{"class":1155},"    env_file",[859,1923,833],{"class":1159},[859,1925,1926],{"class":869}," \u002Fetc\u002Fshade\u002Fsite.env\n",[859,1928,1930,1932],{"class":861,"line":1929},88,[859,1931,1194],{"class":1155},[859,1933,1160],{"class":1159},[859,1935,1937,1940,1942],{"class":861,"line":1936},89,[859,1938,1939],{"class":1155},"      SHADE_API_URL",[859,1941,833],{"class":1159},[859,1943,1944],{"class":869}," http:\u002F\u002Fshade:4000\n",[859,1946,1948,1951,1953],{"class":861,"line":1947},90,[859,1949,1950],{"class":1155},"      ACCOUNT_API_URL",[859,1952,833],{"class":1159},[859,1954,1955],{"class":869}," http:\u002F\u002Fpublic:4000\n",[859,1957,1959,1961],{"class":861,"line":1958},91,[859,1960,1234],{"class":1155},[859,1962,1160],{"class":1159},[859,1964,1966,1968],{"class":861,"line":1965},92,[859,1967,1249],{"class":1159},[859,1969,1970],{"class":869}," site-builds:\u002Fapp\u002Fsite\u002Fbuilds\n",[859,1972,1974,1976],{"class":861,"line":1973},93,[859,1975,1552],{"class":1155},[859,1977,1160],{"class":1159},[859,1979,1981,1983,1985,1988],{"class":861,"line":1980},94,[859,1982,1249],{"class":1159},[859,1984,1509],{"class":1159},[859,1986,1987],{"class":869},"127.0.0.1:8080:8080",[859,1989,1515],{"class":1159},[859,1991,1993],{"class":861,"line":1992},95,[859,1994,1305],{"emptyLinePlaceholder":1304},[859,1996,1998,2001],{"class":861,"line":1997},96,[859,1999,2000],{"class":1155},"volumes",[859,2002,1160],{"class":1159},[859,2004,2006,2009],{"class":861,"line":2005},97,[859,2007,2008],{"class":1155},"  postgres-data",[859,2010,1160],{"class":1159},[859,2012,2014,2017],{"class":861,"line":2013},98,[859,2015,2016],{"class":1155},"  shade-data",[859,2018,1160],{"class":1159},[859,2020,2022,2025],{"class":861,"line":2021},99,[859,2023,2024],{"class":1155},"  site-builds",[859,2026,1160],{"class":1159},[619,2028,2029,2032,2033,799,2036,2039,2040,2043,2044,2046,2047,2050,2051,2054,2055,2057,2058,2061,2062,2064],{},[627,2030,2031],{},"\u002Fetc\u002Fshade\u002Fpostgres-password"," holds the bootstrap superuser's password, and ",[627,2034,2035],{},"shade-db-owner-password",[627,2037,2038],{},"shade-db-password","\nand ",[627,2041,2042],{},"shade-db-backup-password"," the passwords of the owner ",[627,2045,1615],{},", the running role ",[627,2048,2049],{},"shade_app"," and the backup role\n",[627,2052,2053],{},"shade_backup"," (the same as in their addresses), each ",[627,2056,943],{}," and readable by Postgres (uid 70).\n",[627,2059,2060],{},"\u002Fetc\u002Fshade\u002Fpostgres-init.sh"," makes the three roles and the database. None is a superuser and none may create databases\nor roles, so a leaked ",[627,2063,675],{}," reaches SHADE's rows only, never the schema. Postgres runs it once, when its volume\nis new:",[850,2066,2070],{"className":2067,"code":2068,"language":2069,"meta":855,"style":855},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","#!\u002Fbin\u002Fsh\nset -e\npsql -v ON_ERROR_STOP=1 \\\n  -v owner_password=\"$(cat \u002Frun\u002Fsecrets\u002Fshade-db-owner-password)\" \\\n  -v app_password=\"$(cat \u002Frun\u002Fsecrets\u002Fshade-db-password)\" \\\n  -v backup_password=\"$(cat \u002Frun\u002Fsecrets\u002Fshade-db-backup-password)\" \\\n  --username postgres --dbname postgres \u003C\u003C'SQL'\nCREATE ROLE shade LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS PASSWORD :'owner_password';\nCREATE ROLE shade_app LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS PASSWORD :'app_password';\nCREATE ROLE shade_backup LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION BYPASSRLS PASSWORD :'backup_password';\nALTER ROLE shade_backup SET default_transaction_read_only = on;\nCREATE DATABASE shade OWNER shade;\n\\connect shade\nALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT USAGE ON SCHEMAS TO shade_app, shade_backup;\nALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO shade_app;\nALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT USAGE, SELECT ON SEQUENCES TO shade_app;\nALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT SELECT ON TABLES TO shade_backup;\nALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT SELECT ON SEQUENCES TO shade_backup;\nSQL\n","sh",[627,2071,2072,2077,2082,2087,2092,2097,2102,2107,2112,2117,2122,2127,2132,2137,2142,2147,2152,2157,2162],{"__ignoreMap":855},[859,2073,2074],{"class":861,"line":862},[859,2075,2076],{},"#!\u002Fbin\u002Fsh\n",[859,2078,2079],{"class":861,"line":879},[859,2080,2081],{},"set -e\n",[859,2083,2084],{"class":861,"line":923},[859,2085,2086],{},"psql -v ON_ERROR_STOP=1 \\\n",[859,2088,2089],{"class":861,"line":1180},[859,2090,2091],{},"  -v owner_password=\"$(cat \u002Frun\u002Fsecrets\u002Fshade-db-owner-password)\" \\\n",[859,2093,2094],{"class":861,"line":1191},[859,2095,2096],{},"  -v app_password=\"$(cat \u002Frun\u002Fsecrets\u002Fshade-db-password)\" \\\n",[859,2098,2099],{"class":861,"line":1199},[859,2100,2101],{},"  -v backup_password=\"$(cat \u002Frun\u002Fsecrets\u002Fshade-db-backup-password)\" \\\n",[859,2103,2104],{"class":861,"line":1210},[859,2105,2106],{},"  --username postgres --dbname postgres \u003C\u003C'SQL'\n",[859,2108,2109],{"class":861,"line":1220},[859,2110,2111],{},"CREATE ROLE shade LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS PASSWORD :'owner_password';\n",[859,2113,2114],{"class":861,"line":1231},[859,2115,2116],{},"CREATE ROLE shade_app LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION NOBYPASSRLS PASSWORD :'app_password';\n",[859,2118,2119],{"class":861,"line":1239},[859,2120,2121],{},"CREATE ROLE shade_backup LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE NOREPLICATION BYPASSRLS PASSWORD :'backup_password';\n",[859,2123,2124],{"class":861,"line":1246},[859,2125,2126],{},"ALTER ROLE shade_backup SET default_transaction_read_only = on;\n",[859,2128,2129],{"class":861,"line":1255},[859,2130,2131],{},"CREATE DATABASE shade OWNER shade;\n",[859,2133,2134],{"class":861,"line":1263},[859,2135,2136],{},"\\connect shade\n",[859,2138,2139],{"class":861,"line":1271},[859,2140,2141],{},"ALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT USAGE ON SCHEMAS TO shade_app, shade_backup;\n",[859,2143,2144],{"class":861,"line":1279},[859,2145,2146],{},"ALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO shade_app;\n",[859,2148,2149],{"class":861,"line":1287},[859,2150,2151],{},"ALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT USAGE, SELECT ON SEQUENCES TO shade_app;\n",[859,2153,2154],{"class":861,"line":1293},[859,2155,2156],{},"ALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT SELECT ON TABLES TO shade_backup;\n",[859,2158,2159],{"class":861,"line":1301},[859,2160,2161],{},"ALTER DEFAULT PRIVILEGES FOR ROLE shade GRANT SELECT ON SEQUENCES TO shade_backup;\n",[859,2163,2164],{"class":861,"line":1308},[859,2165,2166],{},"SQL\n",[619,2168,2169,2172,2173,2176,2177,2179,2180,2183],{},[627,2170,2171],{},"\u002Fetc\u002Fshade\u002Fredis.conf"," holds Redis's settings, readable by the container's ",[627,2174,2175],{},"valkey"," user (uid 999) only, with the\npassword of ",[627,2178,686],{}," (letters and digits, ",[627,2181,2182],{},"openssl rand -hex 32","):",[850,2185,2190],{"className":2186,"code":2188,"language":2189},[2187],"language-text","requirepass \u003Credis password>\nmaxmemory 64mb\nmaxmemory-policy noeviction\nappendonly no\nsave \"\"\n","text",[627,2191,2188],{"__ignoreMap":855},[619,2193,2194],{},"Without persistence a Redis restart loses for good only the health history of modules and features (with their\nunhealthy streaks), up to five minutes of request counts, and the tickets of a module approval or a take-data export\nin progress, which then has to be started again. Queued jobs under way are sent again from Postgres within seconds,\nand everything else is rebuilt.",[619,2196,2197,2200,2201,2204,2205,1082,2208,2211,2212,630,2215,962,2218,1074],{},[627,2198,2199],{},"\u002Fetc\u002Fshade\u002Fsite.env"," holds the site's settings, filled in after step 3: ",[627,2202,2203],{},"SHADE_API_TOKEN"," (a build token),\n",[627,2206,2207],{},"SITE_REBUILD_TOKEN",[627,2209,2210],{},"openssl rand -hex 24","), ",[627,2213,2214],{},"SHADE_ACCOUNT_URL=https:\u002F\u002Fwww.example.com",[627,2216,2217],{},"ASTRO_KEY",[627,2219,2220],{},"npx astro create-key",[619,2222,2223,2224,2227,2228,2232,2233,2236,2237,2239,2240,2243,2244,1082,2246,2249,2250,2253],{},"The variables set under ",[627,2225,2226],{},"environment"," win over the env file, so the three containers share one file and differ only\nin their container role. A reverse proxy in front gives HTTPS. Route as SHADE's own routes do, shown as the\nCaddyfile in ",[623,2229,2231],{"href":2230},"\u002Frun\u002Fown-server#what-it-sets-up","What it sets up",": the account API (",[627,2234,2235],{},"\u002Fapi\u002Fv1\u002Faccount\u002F*",") to the ",[627,2238,644],{},"\ncontainer (",[627,2241,2242],{},"127.0.0.1:4001"," here), everything else on the admin's address to ",[627,2245,1615],{},[627,2247,2248],{},"127.0.0.1:4000","), the site's\ndomain to the site (",[627,2251,2252],{},"127.0.0.1:8080","), and no address at all for the worker.",[619,2255,2256,2257,2259,2260,2263],{},"A server-rendered frontend on the same server reads the content API from the ",[627,2258,644],{}," container\n(",[627,2261,2262],{},"http:\u002F\u002F127.0.0.1:4001",") with a read token, so its traffic never loads the admin; the site's build keeps the admin's\naddress, since a build token is refused there.",[619,2265,2266,2267,2270,2271,2274,2275,783,2277,2280,2281,2284,2285,2287,2288,2291,2292,2294,2295,2298,2299,630,2301,2303,2304,2307,2308,2311,2312,630,2314,2316,2317,630,2319,2321,2322,2325,2326,2328],{},"Point the proxy's health check at ",[627,2268,2269],{},"\u002Fhealth",", the readiness answer: it is 503 while the container starts, waits for\nmigrations, has lost Postgres or Redis, or is stopping, so no request is sent to it then. A proxy that looks containers\nup by name and has no health check, as the template's Caddy does, needs a different way to keep requests away from a\ncontainer that is not ready. Set ",[627,2272,2273],{},"SHADE_HEALTH_PORT"," (the template uses 4001) on the container: ",[627,2276,2269],{},[627,2278,2279],{},"\u002Fhealth\u002Flive"," answer on that port from the start, and the API's own port opens only once the container is ready. Until\nthen a connection to it is refused, and the proxy tries another container. Don't publish or route the health port.\nWithout the variable there is one port, which listens at once and answers 503 ",[627,2282,2283],{},"starting"," until the container is ready.\n",[627,2286,2279],{}," only says the process runs. A stopping container (SIGTERM) first goes on serving for ",[627,2289,2290],{},"SHADE_DRAIN_DELAY_MS"," (3 seconds), so the proxy\nhas time to see ",[627,2293,2269],{}," turn 503 without losing a connection. Then it finishes the requests in flight and ends live\nstreams and sockets with a notice that makes the page reconnect, all within ",[627,2296,2297],{},"SHADE_STOP_GRACE_MS"," (30 seconds; 120 on\nthe ",[627,2300,640],{},[627,2302,1064],{}," roles, for long uploads). Give the container a stop grace above the two together (",[627,2305,2306],{},"stop_grace_period: 40s",",\nor ",[627,2309,2310],{},"130s"," for ",[627,2313,640],{},[627,2315,1064],{},", as in the template). The ",[627,2318,644],{},[627,2320,648],{}," containers wait up to\n",[627,2323,2324],{},"SHADE_MIGRATION_WAIT_MS"," (5 minutes) for the admin to apply the migrations of their image, so they may be started\nbefore it. With one compose file an update restarts the containers in a few seconds; for updates without a gap run\nmore than one ",[627,2327,644],{}," container behind the proxy, and update the admin first.",[619,2330,2331,2332,2335,2336,2338],{},"Keep the proxy's idle timeout for connections to the API below the API's own. The API keeps an idle connection open\nfor 125 seconds (",[627,2333,2334],{},"KEEP_ALIVE_TIMEOUT_MS","). Caddy keeps one 2 minutes, Traefik 90 seconds, nginx and AWS's load\nbalancer about 60, so their defaults are fine. If the proxy keeps idle connections longer, it may send a request on a\nconnection the API is just closing, and the visitor gets a 502. Then lower the proxy's timeout, or raise\n",[627,2337,2334],{}," above it (at most 280000).",[619,2340,2341,2342,2344,2345,795,2348,799,2351,2354,2355,2358,2359,1074],{},"Let the proxy pass WebSocket upgrades on the account API (",[627,2343,2235],{},"): a module may keep two-way connections with\nvisitors (decision 0014 point 15). Caddy and Traefik do by default; nginx needs ",[627,2346,2347],{},"proxy_http_version 1.1;",[627,2349,2350],{},"proxy_set_header Upgrade $http_upgrade;",[627,2352,2353],{},"proxy_set_header Connection \"upgrade\";"," and a ",[627,2356,2357],{},"proxy_read_timeout"," above 25\nseconds (the API pings every 25 seconds). A stopping container closes them with code 1001 and the page opens a new\none (",[623,2360,417],{"href":418},[619,2362,2363,2364,970],{},"Let the proxy pass large uploads to the admin's address: the media library takes a video or audio file of up to\n100 MB, and up to 200 MB in one upload of several files. Caddy and Traefik pass any size by default; nginx takes 1 MB\nunless you set ",[627,2365,2366],{},"client_max_body_size 200m;",[655,2368,2370],{"id":2369},"_3-first-start","3. First start",[850,2372,2374],{"className":852,"code":2373,"language":854,"meta":855,"style":855},"cd \u002Fsrv\u002Fshade && docker compose up -d postgres redis shade public worker\ndocker compose logs shade | grep create-owner\n",[627,2375,2376,2410],{"__ignoreMap":855},[859,2377,2378,2382,2385,2388,2390,2393,2396,2399,2402,2404,2406,2408],{"class":861,"line":862},[859,2379,2381],{"class":2380},"s2Zo4","cd",[859,2383,2384],{"class":869}," \u002Fsrv\u002Fshade",[859,2386,2387],{"class":1159}," &&",[859,2389,884],{"class":865},[859,2391,2392],{"class":869}," compose",[859,2394,2395],{"class":869}," up",[859,2397,2398],{"class":869}," -d",[859,2400,2401],{"class":869}," postgres",[859,2403,1466],{"class":869},[859,2405,905],{"class":869},[859,2407,1907],{"class":869},[859,2409,1790],{"class":869},[859,2411,2412,2414,2416,2419,2421,2424,2427],{"class":861,"line":879},[859,2413,1096],{"class":865},[859,2415,2392],{"class":869},[859,2417,2418],{"class":869}," logs",[859,2420,905],{"class":869},[859,2422,2423],{"class":1159}," |",[859,2425,2426],{"class":865}," grep",[859,2428,2429],{"class":869}," create-owner\n",[619,2431,2432,2433,2436,2437,2440,2441,2444,2445,2448,2449,833],{},"The log line holds the address to open, ",[627,2434,2435],{},"https:\u002F\u002Fadmin.example.com\u002Fcreate-owner",", and a one-time code that works once,\nfor an hour (",[627,2438,2439],{},"docker compose restart shade"," prints a new one). Open it, enter the code, your name, email address and a\npassword, and set up two-factor or a passkey when the admin asks. From a script, ",[627,2442,2443],{},"docker compose exec shade node console\u002Fcreate-admin.mjs"," makes the first admin instead; it reads the same env file. Then, signed in at\n",[627,2446,2447],{},"https:\u002F\u002Fadmin.example.com",",\nas in ",[623,2450,46],{"href":2451},"\u002Frun\u002Fcoolify#configure-shade-for-the-site",[663,2453,2454,2463,2475],{},[666,2455,2456,2459,2460,1074],{},[669,2457,2458],{},"Settings",": the Site URL (",[627,2461,2462],{},"https:\u002F\u002Fwww.example.com",[666,2464,2465,2467,2468,2471,2472,970],{},[669,2466,317],{},": install and switch on the website module; in its settings the Preview address (the same address: the\nsite container serves ",[627,2469,2470],{},"\u002Fpreview",") and the build hook ",[627,2473,2474],{},"http:\u002F\u002Fsite:8081\u002Frebuild?token=\u003CSITE_REBUILD_TOKEN>",[666,2476,2477,2479,2480,970],{},[669,2478,257],{},": a build token for the site; put it in ",[627,2481,2199],{},[619,2483,2484,2485,970],{},"Then start the site: ",[627,2486,2487],{},"docker compose up -d site",[655,2489,2491],{"id":2490},"_4-client-programs-optional-shade-programs","4. Client programs (optional: shade-programs)",[619,2493,2494,2495,2497,2498,2501],{},"Only when the client runs programs of their own beside SHADE\n(",[623,2496,349],{"href":350},"); ",[623,2499,46],{"href":2500},"\u002Frun\u002Fcoolify#client-programs-optional-shade-programs","\nexplains the parts. The host holds the server's Docker socket, which is as good as root on that server: it gets no\npublished port, and only the instance reaches it, on the compose file's network.",[619,2503,2504,2505,2508,2509,2512,2513,2516,2517,2520,2521,2524,2525,2528],{},"Build its image from a checkout of ",[627,2506,2507],{},"shadehq-dev\u002Fshade-programs"," until its first release (then use\n",[627,2510,2511],{},"ghcr.io\u002Fshadehq-dev\u002Fshade-programs:\u003Cversion>","), and install gVisor's ",[627,2514,2515],{},"runsc"," for untrusted client programs\n(",[627,2518,2519],{},"runsc install",", then restart Docker). Without it, leave ",[627,2522,2523],{},"SHADE_PROGRAMS_GVISOR"," on: trusted programs run either\nway, and an untrusted one refuses to start until gVisor is there. ",[627,2526,2527],{},"off"," runs untrusted programs in plain containers,\nfor development only, never on a server:",[850,2530,2532],{"className":852,"code":2531,"language":854,"meta":855,"style":855},"docker build -t shade-programs shade-programs\n",[627,2533,2534],{"__ignoreMap":855},[859,2535,2536,2538,2540,2542,2545],{"class":861,"line":862},[859,2537,1096],{"class":865},[859,2539,1099],{"class":869},[859,2541,1108],{"class":869},[859,2543,2544],{"class":869}," shade-programs",[859,2546,2547],{"class":869}," shade-programs\n",[619,2549,2550,2551,2553,2554,2556,2557,2560,2561,833],{},"Add it to ",[627,2552,1143],{},", under ",[627,2555,1156],{},", and ",[627,2558,2559],{},"shade-programs-data:"," under ",[627,2562,2000],{},[850,2564,2566],{"className":1146,"code":2565,"language":1148,"meta":855,"style":855},"  # The client programs. No port: the instance reaches it on this network.\n  shade-programs:\n    image: shade-programs\n    restart: unless-stopped\n    # A fixed name: the host joins each client program's network under it, for the egress proxy.\n    container_name: shade-programs\n    # The Docker socket and its group (stat -c %g \u002Fvar\u002Frun\u002Fdocker.sock).\n    group_add: ['\u003Csocket group id>']\n    env_file: \u002Fetc\u002Fshade\u002Fshade-programs.env\n    environment:\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\u002Fshade:4000\n      SHADE_PROGRAMS_CONTAINER: shade-programs\n    volumes:\n      - \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n      - shade-programs-data:\u002Fdata\n",[627,2567,2568,2573,2580,2588,2596,2601,2610,2615,2634,2643,2649,2654,2662,2671,2677,2684],{"__ignoreMap":855},[859,2569,2570],{"class":861,"line":862},[859,2571,2572],{"class":1242},"  # The client programs. No port: the instance reaches it on this network.\n",[859,2574,2575,2578],{"class":861,"line":879},[859,2576,2577],{"class":1155},"  shade-programs",[859,2579,1160],{"class":1159},[859,2581,2582,2584,2586],{"class":861,"line":923},[859,2583,1172],{"class":1155},[859,2585,833],{"class":1159},[859,2587,2547],{"class":869},[859,2589,2590,2592,2594],{"class":861,"line":1180},[859,2591,1183],{"class":1155},[859,2593,833],{"class":1159},[859,2595,1188],{"class":869},[859,2597,2598],{"class":861,"line":1191},[859,2599,2600],{"class":1242},"    # A fixed name: the host joins each client program's network under it, for the egress proxy.\n",[859,2602,2603,2606,2608],{"class":861,"line":1199},[859,2604,2605],{"class":1155},"    container_name",[859,2607,833],{"class":1159},[859,2609,2547],{"class":869},[859,2611,2612],{"class":861,"line":1210},[859,2613,2614],{"class":1242},"    # The Docker socket and its group (stat -c %g \u002Fvar\u002Frun\u002Fdocker.sock).\n",[859,2616,2617,2620,2622,2624,2627,2630,2632],{"class":861,"line":1220},[859,2618,2619],{"class":1155},"    group_add",[859,2621,833],{"class":1159},[859,2623,1457],{"class":1159},[859,2625,2626],{"class":1159},"'",[859,2628,2629],{"class":869},"\u003Csocket group id>",[859,2631,2626],{"class":1159},[859,2633,1469],{"class":1159},[859,2635,2636,2638,2640],{"class":861,"line":1231},[859,2637,1921],{"class":1155},[859,2639,833],{"class":1159},[859,2641,2642],{"class":869}," \u002Fetc\u002Fshade\u002Fshade-programs.env\n",[859,2644,2645,2647],{"class":861,"line":1239},[859,2646,1194],{"class":1155},[859,2648,1160],{"class":1159},[859,2650,2651],{"class":861,"line":1246},[859,2652,2653],{"class":1242},"      # The API as the client programs reach it: the admin container, which serves the content and data APIs.\n",[859,2655,2656,2658,2660],{"class":861,"line":1255},[859,2657,1939],{"class":1155},[859,2659,833],{"class":1159},[859,2661,1944],{"class":869},[859,2663,2664,2667,2669],{"class":861,"line":1263},[859,2665,2666],{"class":1155},"      SHADE_PROGRAMS_CONTAINER",[859,2668,833],{"class":1159},[859,2670,2547],{"class":869},[859,2672,2673,2675],{"class":861,"line":1271},[859,2674,1234],{"class":1155},[859,2676,1160],{"class":1159},[859,2678,2679,2681],{"class":861,"line":1279},[859,2680,1249],{"class":1159},[859,2682,2683],{"class":869}," \u002Fvar\u002Frun\u002Fdocker.sock:\u002Fvar\u002Frun\u002Fdocker.sock\n",[859,2685,2686,2688],{"class":861,"line":1287},[859,2687,1249],{"class":1159},[859,2689,2690],{"class":869}," shade-programs-data:\u002Fdata\n",[619,2692,2693,2696,2697,799,2700,2702,2703,2705],{},[627,2694,2695],{},"\u002Fetc\u002Fshade\u002Fshade-programs.env"," holds ",[627,2698,2699],{},"SHADE_PROGRAMS_TOKEN=\u003Copenssl rand -hex 32>",[627,2701,943],{},". Add the same token and\nthe host's address to ",[627,2704,739],{},", which the three SHADE containers share:",[850,2707,2710],{"className":2708,"code":2709,"language":2189},[2187],"SHADE_PROGRAMS_URL=http:\u002F\u002Fshade-programs:8090\nSHADE_PROGRAMS_TOKEN=\u003Cthe same token>\n",[627,2711,2709],{"__ignoreMap":855},[619,2713,2714,2715,2718,2719,783,2722,2725,2726,2729],{},"Then ",[627,2716,2717],{},"docker compose up -d shade-programs shade public worker",". The host logs ",[627,2720,2721],{},"listening on 8090",[627,2723,2724],{},"egress proxy on 3128","; ",[669,2727,2728],{},"Programs"," in the admin shows no notice about the host. Every setting of the host is in\nshade-programs' README.",[655,2731,2733],{"id":2732},"without-docker","Without Docker",[619,2735,2736,2737,799,2740,2743,2744,1082,2747,2750],{},"With Node.js 26, Postgres, Redis (Valkey or any server that speaks its protocol, with ",[627,2738,2739],{},"requirepass",[627,2741,2742],{},"maxmemory-policy noeviction"," and no persistence, as above) and a\nSHADE checkout in ",[627,2745,2746],{},"\u002Fopt\u002Fshade",[627,2748,2749],{},"pnpm install && pnpm build","), a systemd template unit runs the API as its own user,\nonce per container role:",[850,2752,2756],{"className":2753,"code":2754,"language":2755,"meta":855,"style":855},"language-ini shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# \u002Fetc\u002Fsystemd\u002Fsystem\u002Fshade@.service\n[Service]\nUser=shade\nWorkingDirectory=\u002Fopt\u002Fshade\u002Fapps\u002Fapi\nEnvironment=NODE_ENV=production\nEnvironment=SHADE_ENV_FILE=\u002Fetc\u002Fshade\u002Fshade.env\nEnvironment=SHADE_API_ROLE=%i\nEnvironmentFile=\u002Fetc\u002Fshade\u002F%i.env\nExecStart=\u002Fusr\u002Fbin\u002Fnode dist\u002Fserver.mjs\nRestart=on-failure\nTimeoutStopSec=40\n\n[Install]\nWantedBy=multi-user.target\n","ini",[627,2757,2758,2763,2768,2773,2778,2783,2788,2793,2798,2803,2808,2813,2817,2822],{"__ignoreMap":855},[859,2759,2760],{"class":861,"line":862},[859,2761,2762],{},"# \u002Fetc\u002Fsystemd\u002Fsystem\u002Fshade@.service\n",[859,2764,2765],{"class":861,"line":879},[859,2766,2767],{},"[Service]\n",[859,2769,2770],{"class":861,"line":923},[859,2771,2772],{},"User=shade\n",[859,2774,2775],{"class":861,"line":1180},[859,2776,2777],{},"WorkingDirectory=\u002Fopt\u002Fshade\u002Fapps\u002Fapi\n",[859,2779,2780],{"class":861,"line":1191},[859,2781,2782],{},"Environment=NODE_ENV=production\n",[859,2784,2785],{"class":861,"line":1199},[859,2786,2787],{},"Environment=SHADE_ENV_FILE=\u002Fetc\u002Fshade\u002Fshade.env\n",[859,2789,2790],{"class":861,"line":1210},[859,2791,2792],{},"Environment=SHADE_API_ROLE=%i\n",[859,2794,2795],{"class":861,"line":1220},[859,2796,2797],{},"EnvironmentFile=\u002Fetc\u002Fshade\u002F%i.env\n",[859,2799,2800],{"class":861,"line":1231},[859,2801,2802],{},"ExecStart=\u002Fusr\u002Fbin\u002Fnode dist\u002Fserver.mjs\n",[859,2804,2805],{"class":861,"line":1239},[859,2806,2807],{},"Restart=on-failure\n",[859,2809,2810],{"class":861,"line":1246},[859,2811,2812],{},"TimeoutStopSec=40\n",[859,2814,2815],{"class":861,"line":1255},[859,2816,1305],{"emptyLinePlaceholder":1304},[859,2818,2819],{"class":861,"line":1263},[859,2820,2821],{},"[Install]\n",[859,2823,2824],{"class":861,"line":1271},[859,2825,2826],{},"WantedBy=multi-user.target\n",[619,2828,2829,2696,2832,630,2835,799,2838,834,2841,2844,2845,834,2848,630,2851,2854,2855,970],{},[627,2830,2831],{},"\u002Fetc\u002Fshade\u002Fadmin.env",[627,2833,2834],{},"PORT=4000",[627,2836,2837],{},"MIGRATE_ON_START=true",[627,2839,2840],{},"\u002Fetc\u002Fshade\u002Fpublic.env",[627,2842,2843],{},"PORT=4001",", and\n",[627,2846,2847],{},"\u002Fetc\u002Fshade\u002Fworker.env",[627,2849,2850],{},"PORT=4002",[627,2852,2853],{},"MODULE_PACKAGES_DIR=\u002Fvar\u002Flib\u002Fshade\u002Fworker-packages"," (a folder of its own).\nThen ",[627,2856,2857],{},"systemctl enable --now shade@admin shade@public shade@worker",[619,2859,2860,2861,2863,2864,2867,2868,799,2870,799,2872,799,2874,2876,2877,2880,2881,2884,2885,1074],{},"The env file then belongs to the ",[627,2862,1615],{}," user (",[627,2865,2866],{},"sudo chown shade: \u002Fetc\u002Fshade\u002Fshade.env","). Its paths default to the\ncheckout (",[627,2869,805],{},[627,2871,808],{},[627,2873,814],{},[627,2875,820],{}," relative to ",[627,2878,2879],{},"apps\u002Fapi","); the admin's unit migrates on\nstart, or run the ",[627,2882,2883],{},"migrate"," console command after each update (",[623,2886,50],{"href":2887},"\u002Frun\u002Fconsole#migrate",[655,2889,2891],{"id":2890},"what-shade-refuses-at-start","What SHADE refuses at start",[709,2893,2894,2904],{},[712,2895,2896],{},[715,2897,2898,2901],{},[718,2899,2900],{},"Problem",[718,2902,2903],{},"Message (abridged)",[725,2905,2906,2918,2928,2938,2948,2959,2975],{},[715,2907,2908,2913],{},[730,2909,2910,2912],{},[627,2911,778],{}," names no file",[730,2914,2915],{},[627,2916,2917],{},"SHADE_ENV_FILE … does not exist",[715,2919,2920,2923],{},[730,2921,2922],{},"other users can read or change it",[730,2924,2925],{},[627,2926,2927],{},"… can be read or changed by every user of the server (mode 644): run chmod 600 …",[715,2929,2930,2933],{},[730,2931,2932],{},"its group can change it",[730,2934,2935],{},[627,2936,2937],{},"… can be changed by its group (mode 660): run chmod 600 …",[715,2939,2940,2943],{},[730,2941,2942],{},"it sits in a folder SHADE serves (admin files, uploads, server packages)",[730,2944,2945],{},[627,2946,2947],{},"… is inside …, which SHADE serves: keep it outside every served folder",[715,2949,2950,2953],{},[730,2951,2952],{},"a required variable is missing or invalid",[730,2954,2955,2958],{},[627,2956,2957],{},"[config] APP_SECRET: APP_SECRET must be at least 32 characters"," and the like",[715,2960,2961,2966],{},[730,2962,2963,2965],{},[627,2964,686],{}," is missing, or has no password",[730,2967,2968,2971,2972],{},[627,2969,2970],{},"[config] REDIS_URL: REDIS_URL is required: every instance has a Redis …"," \u002F ",[627,2973,2974],{},"… needs the password Redis is started with …",[715,2976,2977,2980],{},[730,2978,2979],{},"Redis does not answer (or refuses the password)",[730,2981,2982],{},[627,2983,2984],{},"Cannot reach Redis at redis:\u002F\u002F:***@redis:6379: … Check REDIS_URL and its password …",[655,2986,2988],{"id":2987},"details","Details",[663,2990,2991],{},[666,2992,2993,2994,2997,2998,3000,3001,3004,3005,3008,3009,799,3012,799,3015,799,3018,799,3021,799,3024,795,3027,2725,3030,3033,3034,3037,3038,3041,3042,3045,3046,3049,3050,3053,3054,3056,3057,3060,3061,3064,3065,799,3068,799,3071,799,3074,799,3077,799,3080,795,3083,799,3086,799,3089,3092,3093,3096,3097,3100,3101,3104,3105,3107,3108,3111,3112,3115,3116,3119,3120,3122,3123,3125,3126,3056,3129,3131],{},"Media storage: ",[627,2995,2996],{},"STORAGE_DRIVER=local"," (default) keeps files under ",[627,2999,820],{}," (a Docker volume in\nproduction), written atomically (temp file then rename), empty month folders tidied on delete, keys with ",[627,3002,3003],{},"..",",\nbackslashes, absolute paths or empty segments refused. ",[627,3006,3007],{},"STORAGE_DRIVER=s3",": any S3-compatible bucket, SHADE signing its own\nrequests (no SDK; decision 0008 point 13); ",[627,3010,3011],{},"STORAGE_S3_BUCKET",[627,3013,3014],{},"_REGION",[627,3016,3017],{},"_ENDPOINT",[627,3019,3020],{},"_ACCESS_KEY_ID",[627,3022,3023],{},"_SECRET_ACCESS_KEY",[627,3025,3026],{},"_FORCE_PATH_STYLE",[627,3028,3029],{},"_PREFIX",[627,3031,3032],{},".env.example"," has examples for Scaleway (",[627,3035,3036],{},"nl-ams","), Hetzner (",[627,3039,3040],{},"fsn1","), Cloudflare R2 and AWS; the app\nrefuses to start when bucket, keys or ",[627,3043,3044],{},"STORAGE_PUBLIC_BASE_URL"," are missing; objects get ",[627,3047,3048],{},"Cache-Control: public, max-age=31536000, immutable"," (SVGs also ",[627,3051,3052],{},"Content-Disposition: attachment","); each call times out after 30 seconds;\nerrors never contain credentials. Public URLs: ",[627,3055,3044],{},", or ",[627,3058,3059],{},"${SHADE_API_URL}\u002Fuploads"," when empty\n(local only). With the local driver the admin serves ",[627,3062,3063],{},"\u002Fuploads\u002F*",": only ",[627,3066,3067],{},"jpg",[627,3069,3070],{},"jpeg",[627,3072,3073],{},"png",[627,3075,3076],{},"webp",[627,3078,3079],{},"avif",[627,3081,3082],{},"gif",[627,3084,3085],{},"svg",[627,3087,3088],{},"pdf",[627,3090,3091],{},"woff2",", cached for a year, ",[627,3094,3095],{},"nosniff",", a ",[627,3098,3099],{},"default-src 'none'"," CSP for images and fonts (the SVG policy\nfor SVGs), ",[627,3102,3103],{},"Cross-Origin-Resource-Policy: cross-origin"," so ",[627,3106,2470],{}," can load them, fonts also\n",[627,3109,3110],{},"Access-Control-Allow-Origin: *",". With S3 give the bucket a CORS rule allowing ",[627,3113,3114],{},"GET"," from the site's origin, or the\npreview shows the fallback font; with S3 ",[627,3117,3118],{},"\u002Fuploads"," serves nothing; the ",[627,3121,644],{}," API role answers 404 on ",[627,3124,3118],{},".\nThe site build downloads from ",[627,3127,3128],{},"SHADE_MEDIA_BASE_URL",[627,3130,3059],{}," when empty; with S3 it must be\nset to the bucket's public URL.",[3133,3134,3135],"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 .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}",{"title":855,"searchDepth":879,"depth":879,"links":3137},[3138,3139,3140,3141,3142,3143,3144,3145],{"id":657,"depth":879,"text":658},{"id":844,"depth":879,"text":845},{"id":1057,"depth":879,"text":1058},{"id":2369,"depth":879,"text":2370},{"id":2490,"depth":879,"text":2491},{"id":2732,"depth":879,"text":2733},{"id":2890,"depth":879,"text":2891},{"id":2987,"depth":879,"text":2988},"md",null,{},{"title":62,"description":855},"CWFtReJJm8ANptGX9q8kIMaMc3zbGB4-TZbPYYITfio",[3152,3153],{"title":58,"path":59,"stem":60,"description":855,"children":-1},{"title":66,"path":67,"stem":68,"description":855,"children":-1},1796500157511]