[{"data":1,"prerenderedAt":1414},["ShallowReactive",2],{"navigation_docs":3,"-security-hardening":613,"-security-hardening-surround":1411},[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":555,"body":615,"description":1394,"extension":1406,"links":1407,"meta":1408,"navigation":708,"path":556,"seo":1409,"stem":557,"__hash__":1410},"docs\u002F5.security\u002F2.hardening.md",{"type":616,"value":617,"toc":1393},"minimark",[618,630,635,642,690,693,697,745,749,760,977,981,1051,1055,1117,1120,1123,1166,1170,1191,1195,1216,1220],[619,620,621,622,625,626,629],"p",{},"What a client's server and deployment must have before it goes live. SHADE's image is built carefully (below), but a\ncontainer only covers what runs inside it: the server, the network and the deployment's settings are set up per\ninstance. Go through this list for every new instance, and again after changing its setup. How to set an instance up\nis ",[623,624,46],"a",{"href":47},"; how to test it is ",[623,627,628],{"href":552},"Security\ntesting",".",[631,632,634],"h2",{"id":633},"what-the-image-already-does","What the image already does",[619,636,637,641],{},[638,639,640],"code",{},"apps\u002Fapi\u002FDockerfile"," in the SHADE repository:",[643,644,645,649,656,659,662,665,676,683],"ul",{},[646,647,648],"li",{},"the base image is pinned by its digest, so a release can't change it unseen;",[646,650,651,652,655],{},"it runs as the unprivileged ",[638,653,654],{},"node"," user, not root;",[646,657,658],{},"a slim base with one added system package (CA certificates); compilers and build tools stay in the build stage;",[646,660,661],{},"a health check, and a memory limit for Node;",[646,663,664],{},"the admin is static files with no server code of its own; untrusted modules run in workerd's sandbox;",[646,666,667,668,671,672,675],{},"modules call out only to the hosts they declare, over https, and never into the containers' own network\n(",[638,669,670],{},"moduleFetch"," and the sandbox's egress). A trusted module's code could still call around that: an outbound\nfirewall on the server that blocks the cloud's metadata address (",[638,673,674],{},"169.254.169.254",") adds a second wall;",[646,677,678,679,682],{},"the SMTP server for email is checked the same way: never an address inside the network, unless\n",[638,680,681],{},"SHADE_SMTP_ALLOW_INTERNAL=true"," allows a relay of the instance's own;",[646,684,685,686,689],{},"a module's outside provider (the payments module's Mollie) is called at its own address unless the operator names\nanother in ",[638,687,688],{},"SHADE_PROVIDER_URLS",", which only the environment sets: then that module alone may call it, inside the\nnetwork too.",[619,691,692],{},"A pinned image is safe on the day it's built and outdated months later: rebuild and scan it with every release,\nand update instances when a release fixes something.",[631,694,696],{"id":695},"the-server","The server",[643,698,701,711,717,727,733,739],{"className":699},[700],"contains-task-list",[646,702,705,710],{"className":703},[704],"task-list-item",[706,707],"input",{"disabled":708,"type":709},true,"checkbox"," Only ports 80 and 443 reach the server from the internet (a firewall at the host or the provider). SSH is\nlimited to the operator's addresses, or reached through a VPN.",[646,712,714,716],{"className":713},[704],[706,715],{"disabled":708,"type":709}," SSH accepts keys only: no passwords, no root login.",[646,718,720,722,723,726],{"className":719},[704],[706,721],{"disabled":708,"type":709}," Automatic security updates for the operating system (",[638,724,725],{},"unattended-upgrades"," on Debian and Ubuntu).",[646,728,730,732],{"className":729},[704],[706,731],{"disabled":708,"type":709}," Coolify's own dashboard is not on the open internet, or is behind its two-factor sign-in and an address\nallow-list. Coolify itself kept up to date.",[646,734,736,738],{"className":735},[704],[706,737],{"disabled":708,"type":709}," The proxy's dashboard and admin API are off or not reachable from outside (Traefik's dashboard, Caddy's admin API on port 2019).",[646,740,742,744],{"className":741},[704],[706,743],{"disabled":708,"type":709}," The Docker socket is never mounted into SHADE's containers.",[631,746,748],{"id":747},"the-containers","The containers",[619,750,751,752,755,756,759],{},"Start from the SHADE repository's ",[638,753,754],{},"deploy\u002Fcompose.yml",", which has every one of these: a test fails\nwhen one of them goes, and before a release the image is started with exactly these settings (",[638,757,758],{},"pnpm deploy:smoke","). Set\nthe same in Coolify's settings when the resources are made one by one:",[643,761,763,774,811,835,852,899,915,924,936,952],{"className":762},[700],[646,764,766,768,769,773],{"className":765},[704],[706,767],{"disabled":708,"type":709}," ",[770,771,772],"strong",{},"No published database port."," Postgres and Redis are reached only on the containers' own network.",[646,775,777,768,779,782,783,786,787,790,791,794,795,798,799,802,803,805,806,810],{"className":776},[704],[706,778],{"disabled":708,"type":709},[770,780,781],{},"Three database roles, none a superuser."," SHADE runs every request as ",[638,784,785],{},"shade_app",", which owns nothing and has no\n",[638,788,789],{},"BYPASSRLS",", so row-level security applies to it. The owner ",[638,792,793],{},"shade"," alone changes the schema and is held by the admin\ncontainer only; ",[638,796,797],{},"shade_backup"," reads everything, read-only, and is held by the worker only. SHADE refuses to start when\n",[638,800,801],{},"DATABASE_URL"," names a role that is a superuser, has ",[638,804,789],{}," or owns a table\n(",[623,807,809],{"href":808},"\u002Frun\u002Fown-server#the-databases-roles","The database's roles",").",[646,812,814,768,816,822,823,826,827,830,831,834],{"className":813},[704],[706,815],{"disabled":708,"type":709},[770,817,818,819],{},"Redis with a password and ",[638,820,821],{},"noeviction",": ",[638,824,825],{},"REDIS_URL"," carries the password, a full Redis\nrefuses writes instead of evicting a lease, and it keeps nothing on disk (",[638,828,829],{},"appendonly no",", ",[638,832,833],{},"save \"\"","). In the\ntemplate it is Valkey (BSD-licensed; any server that speaks the Redis protocol works), running as its own user\nwith a read-only filesystem and every capability dropped.",[646,836,838,768,840,843,844,847,848,851],{"className":837},[704],[706,839],{"disabled":708,"type":709},[770,841,842],{},"Redis watched like the database."," Every rate limit counts in Redis and refuses its requests with 503 while\nRedis does not answer, so a Redis outage stops sign-in, forms and modules' limited routes\nuntil it is back (reading content goes on). ",[638,845,846],{},"\u002Fhealth"," is 503 and names ",[638,849,850],{},"redis"," while Redis is away; alert on it, and on a run of 503s in the\nerror log.",[646,853,855,768,857,860,861,864,865,868,869,872,873,876,877,880,881,884,885,887,888,891,892,894,895,898],{"className":854},[704],[706,856],{"disabled":708,"type":709},[770,858,859],{},"A read-only filesystem"," for the API container, with writable volumes only where SHADE writes:\nthe data volume at ",[638,862,863],{},"\u002Fapp\u002Fdata"," (media in ",[638,866,867],{},"uploads\u002F",", with the local storage driver, and the installed module\npackages in ",[638,870,871],{},"module-packages\u002F","; the ",[638,874,875],{},"public"," role, which never stores media, gets a ",[638,878,879],{},"tmpfs"," there; the ",[638,882,883],{},"worker","\nrole shares the media and unpacks its packages into a ",[638,886,879],{}," of its own at ",[638,889,890],{},"\u002Fapp\u002Fpackages","), and a\n",[638,893,879],{}," for ",[638,896,897],{},"\u002Ftmp",". The smoke test signs in and uploads with this setup; anything SHADE fails to write elsewhere is a bug to\nreport.",[646,900,902,768,904,907,908,911,912,629],{"className":901},[704],[706,903],{"disabled":708,"type":709},[770,905,906],{},"No extra privileges:"," drop all Linux capabilities (",[638,909,910],{},"cap_drop: [ALL]",") and set ",[638,913,914],{},"no-new-privileges",[646,916,918,768,920,923],{"className":917},[704],[706,919],{"disabled":708,"type":709},[770,921,922],{},"Memory and CPU limits",", so one container can't starve the others.",[646,925,927,768,929,768,932,935],{"className":926},[704],[706,928],{"disabled":708,"type":709},[770,930,931],{},"Restart policy",[638,933,934],{},"unless-stopped",", and the health check left on.",[646,937,939,941,942,945,946,948,949,810],{"className":938},[704],[706,940],{"disabled":708,"type":709}," The ",[638,943,944],{},"admin"," and ",[638,947,875],{}," roles as separate containers when the instance takes visitor traffic, so the admin API\nis not on the public container (",[623,950,951],{"href":47},"Public role",[646,953,955,768,957,960,961,964,965,967,968,972,973,976],{"className":954},[704],[706,956],{"disabled":708,"type":709},[770,958,959],{},"A worker container"," (",[638,962,963],{},"SHADE_API_ROLE=worker","), with no domain and no published port: it serves only ",[638,966,846],{},".\nWithout one, nothing scheduled runs and the admin says so on every screen. The ",[623,969,971],{"href":970},"\u002Frun\u002Fcoolify#the-small-profile","small\nprofile"," runs one ",[638,974,975],{},"all"," container instead, with the same hardening.",[631,978,980],{"id":979},"secrets","Secrets",[643,982,984,1017,1026,1034],{"className":983},[700],[646,985,987,768,989,992,993,995,996,998,999,1001,1002,1005,1006,1008,1009,1012,1013,1016],{"className":986},[704],[706,988],{"disabled":708,"type":709},[638,990,991],{},"APP_SECRET",", the database and Redis passwords and the storage keys are never in the image or the repository, and\nare different for every client. The deployment template generates ",[638,994,991],{},", the backup key and the database\nand Redis passwords on the first start, into four volumes by who reads them, so the public container holds\nneither the backup key, nor the owner's or the backup role's password, nor the database's superuser password; the doctor's ",[638,997,979],{}," check says which were\ngenerated. A copy of ",[638,1000,991],{}," and the backup key is kept apart from the server, and an admin has confirmed it\n(the doctor's ",[638,1003,1004],{},"kept-copy"," check). One you set in Coolify's environment wins: ",[638,1007,991],{},"\nlong and random (",[638,1010,1011],{},"openssl rand -base64 48","), the database and Redis passwords letters and digits only\n(",[638,1014,1015],{},"openssl rand -hex 32","), as they go into their addresses as they are. The storage keys are always set.",[646,1018,1020,1022,1023,1025],{"className":1019},[704],[706,1021],{"disabled":708,"type":709}," Payment and email keys are entered in the admin (they are stored encrypted with ",[638,1024,991],{},"), not in the\nenvironment.",[646,1027,1029,768,1031,1033],{"className":1028},[704],[706,1030],{"disabled":708,"type":709},[638,1032,991],{}," and the database backups are kept where the client and the operator can reach them for a handover,\nand nowhere else.",[646,1035,1037,1039,1040,1043,1044,1047,1048,810],{"className":1036},[704],[706,1038],{"disabled":708,"type":709}," A site on a static host that forwards the account API: ",[638,1041,1042],{},"SHADE_PROXY_SECRET"," is set on the public role and as a\nsecret of the Cloudflare Worker (or as an environment variable of the Netlify site, Functions scope), the same random value of at least 32\ncharacters, and nowhere else (never in the site's repository, ",[638,1045,1046],{},"netlify.toml"," or build). Without it the site works,\nbut sign-in and form limits count all its visitors as one (",[623,1049,1050],{"href":75},"Hosting the site on a static\nhost",[631,1052,1054],{"id":1053},"the-edge-tls-and-headers","The edge: TLS and headers",[643,1056,1058,1064,1074,1080,1090,1111],{"className":1057},[700],[646,1059,1061,1063],{"className":1060},[704],[706,1062],{"disabled":708,"type":709}," HTTPS on every domain, with HTTP redirected; certificates renew on their own (the proxy and Let's Encrypt).",[646,1065,1067,1069,1070,1073],{"className":1066},[704],[706,1068],{"disabled":708,"type":709}," TLS 1.2 or newer only. Check with ",[638,1071,1072],{},"testssl.sh"," or SSL Labs.",[646,1075,1077,1079],{"className":1076},[704],[706,1078],{"disabled":708,"type":709}," HSTS on every domain once HTTPS works everywhere.",[646,1081,1083,1085,1086,1089],{"className":1082},[704],[706,1084],{"disabled":708,"type":709}," The admin's Content Security Policy is SHADE's own (",[638,1087,1088],{},"apps\u002Fapi\u002Fsrc\u002Fhttp\u002Fcsp.ts","); the proxy doesn't override or\nweaken it. The site sets its own headers in its Caddy config.",[646,1091,1093,1095,1096,830,1099,1102,1103,1106,1107,1110],{"className":1092},[704],[706,1094],{"disabled":708,"type":709}," The proxy or CDN in front of the API keeps SHADE's ",[638,1097,1098],{},"Cache-Control",[638,1100,1101],{},"Content-Security-Policy"," and\n",[638,1104,1105],{},"X-Content-Type-Options"," on the API's answers, module routes' included: it never caches an answer marked\n",[638,1108,1109],{},"no-store"," (user, session and token routes, answers that set a cookie), nor adds a longer cache of its own, and\nnever strips the policy SHADE puts on a module's SVG.",[646,1112,1114,1116],{"className":1113},[704],[706,1115],{"disabled":708,"type":709}," A CAA record naming the certificate authority in use, and no DNS records left pointing at servers that no\nlonger exist (dangling subdomains can be taken over).",[631,1118,287],{"id":1119},"email",[619,1121,1122],{},"Password reset and confirmation emails are how users and team members get into their accounts, so nobody else must be\nable to send convincing ones in the client's name, nor read them (the email settings take a signed-in admin, never a\ntoken):",[643,1124,1126,1132,1149,1158],{"className":1125},[700],[646,1127,1129,1131],{"className":1128},[704],[706,1130],{"disabled":708,"type":709}," SPF and DKIM for the sending domain, matching the email service in use (SMTP or Brevo).",[646,1133,1135,1137,1138,1141,1142,1145,1146,629],{"className":1134},[704],[706,1136],{"disabled":708,"type":709}," DMARC, starting with ",[638,1139,1140],{},"p=none"," to watch reports, then ",[638,1143,1144],{},"quarantine"," or ",[638,1147,1148],{},"reject",[646,1150,1152,768,1154,1157],{"className":1151},[704],[706,1153],{"disabled":708,"type":709},[638,1155,1156],{},"SHADE_SMTP_ALLOW_INTERNAL"," left off unless the mail goes through a relay on the instance's own network.",[646,1159,1161,768,1163,1165],{"className":1160},[704],[706,1162],{"disabled":708,"type":709},[638,1164,688],{}," empty, unless a module's provider goes through a proxy of your own.",[631,1167,1169],{"id":1168},"backups","Backups",[643,1171,1173,1179,1185],{"className":1172},[700],[646,1174,1176,1178],{"className":1175},[704],[706,1177],{"disabled":708,"type":709}," The database is backed up daily, encrypted, and stored off the server.",[646,1180,1182,1184],{"className":1181},[704],[706,1183],{"disabled":708,"type":709}," Uploaded media are backed up too when they are on the server's disk (not on S3).",[646,1186,1188,1190],{"className":1187},[704],[706,1189],{"disabled":708,"type":709}," A restore has been tried once on a scratch instance, and the steps written down.",[631,1192,1194],{"id":1193},"watching","Watching",[643,1196,1198,1204,1210],{"className":1197},[700],[646,1199,1201,1203],{"className":1200},[704],[706,1202],{"disabled":708,"type":709}," At least one admin receives SHADE's security alerts, and someone reads them.",[646,1205,1207,1209],{"className":1206},[704],[706,1208],{"disabled":708,"type":709}," The error log is looked at after every update.",[646,1211,1213,1215],{"className":1212},[704],[706,1214],{"disabled":708,"type":709}," Coolify's or the provider's disk and uptime alerts go to the operator.",[631,1217,1219],{"id":1218},"details","Details",[643,1221,1222,1306,1333],{},[646,1223,1224,1225,830,1228,830,1231,1233,1234,1237,1238,830,1241,1244,1245,830,1248,830,1251,1254,1255,830,1258,830,1261,830,1264,830,1267,830,1270,1273,1274,1277,1278,1281,1282,1285,1286,1289,1290,1293,1294,1297,1298,1301,1302,1305],{},"API security headers: every response from the API app (",[638,1226,1227],{},"\u002Fapi",[638,1229,1230],{},"\u002Fuploads",[638,1232,846],{},") gets Hono's ",[638,1235,1236],{},"secureHeaders","\ndefaults: ",[638,1239,1240],{},"Cross-Origin-Resource-Policy: same-origin",[638,1242,1243],{},"Cross-Origin-Opener-Policy: same-origin",",\n",[638,1246,1247],{},"Origin-Agent-Cluster",[638,1249,1250],{},"Referrer-Policy: no-referrer",[638,1252,1253],{},"Strict-Transport-Security"," (180 days, subdomains),\n",[638,1256,1257],{},"X-Content-Type-Options: nosniff",[638,1259,1260],{},"X-DNS-Prefetch-Control: off",[638,1262,1263],{},"X-Download-Options: noopen",[638,1265,1266],{},"X-Frame-Options: SAMEORIGIN",[638,1268,1269],{},"X-Permitted-Cross-Domain-Policies: none",[638,1271,1272],{},"X-XSS-Protection: 0",". Files under ",[638,1275,1276],{},"\u002Fuploads\u002F"," use\n",[638,1279,1280],{},"Cross-Origin-Resource-Policy: cross-origin"," so the site's ",[638,1283,1284],{},"\u002Fpreview"," can load them. API answers also get\n",[638,1287,1288],{},"Content-Security-Policy: default-src 'none'; frame-ancestors 'none'","; uploads set their own: ",[638,1291,1292],{},"default-src 'none'","\nfor images and fonts, none for PDFs, and for SVG ",[638,1295,1296],{},"default-src 'none'; style-src 'unsafe-inline'; img-src data:; sandbox",", which the site's Caddy and its ",[638,1299,1300],{},"_headers"," on Cloudflare and Netlify send for ",[638,1303,1304],{},"\u002Fmedia\u002F*.svg"," too.",[646,1307,1308,1309,1312,1313,1316,1317,830,1319,830,1322,1324,1325,1328,1329,1332],{},"The public site's Caddy (",[638,1310,1311],{},"site\u002FCaddyfile"," for the static image, ",[638,1314,1315],{},"site\u002FCaddyfile.runner"," for the runner) sends\n",[638,1318,1257],{},[638,1320,1321],{},"Referrer-Policy: strict-origin-when-cross-origin",[638,1323,1266],{},"\nand ",[638,1326,1327],{},"Strict-Transport-Security: max-age=31536000; includeSubDomains"," (a year, subdomains included: once seen, the\nbrowser only uses HTTPS for the site's domain and every subdomain), and drops ",[638,1330,1331],{},"Server",". Serve every subdomain of the\nsite's domain over HTTPS before going live.",[646,1334,1335,1336,1339,1340,830,1342,1344,1345,1339,1347,1350,1351,1354,1355,1357,1358,1361,1362,945,1364,1367,1368,1370,1371,1374,1375,1377,1378,1381,1382,1385,1386,1389,1390,1392],{},"Secrets and ",[638,1337,1338],{},".env"," files (",[638,1341,991],{},[638,1343,801],{},", storage keys, the site's build token are environment\nvariables): in development they live in ",[638,1346,1338],{},[638,1348,1349],{},".env.example"," lists every variable without values): SHADE's at\nthe repository root, the site's in ",[638,1352,1353],{},"site\u002F"," or SHADE's next to it. In production Coolify passes them to the container\nand the API reads no ",[638,1356,1338],{}," file, except the one ",[638,1359,1360],{},"SHADE_ENV_FILE"," names on a server without Coolify; SHADE refuses to\nstart when other users of the server can read or change that file, or when it sits in a folder SHADE serves. Every\nrepository ignores ",[638,1363,1338],{},[638,1365,1366],{},".env.*"," (not ",[638,1369,1349],{},"): SHADE, the site, the docs, the workspace, the modules,\nand every module ",[638,1372,1373],{},"shade-module init"," creates. The images' build contexts leave out every ",[638,1376,1338],{}," at any depth (SHADE's\nand the workspace's ",[638,1379,1380],{},".dockerignore","), and the API's image keeps only its built server. The build token is an Astro\nserver secret: read while building and on the site's Node server, never written into pages, scripts or the server\nbundle; the admin's built files hold no environment values. The admin's file server and local uploads answer only\nfiles inside their own folder however a path is written (",[638,1383,1384],{},"..\u002F",", encoded, double-encoded, backslashes); uploads only\nmedia types; the site's Caddy serves only the built pages. An unexpected error answers ",[638,1387,1388],{},"500 Internal server error","\nand nothing more, details go to the log. Untrusted modules get no environment and no server files. Secrets entered in\nthe admin (mail and payment keys, modules' secret settings) are encrypted with a key derived from ",[638,1391,991],{},"; API\ntokens are stored only as hashes; the build hook comes back masked. Each is checked by a test.",{"title":1394,"searchDepth":1395,"depth":1395,"links":1396},"",2,[1397,1398,1399,1400,1401,1402,1403,1404,1405],{"id":633,"depth":1395,"text":634},{"id":695,"depth":1395,"text":696},{"id":747,"depth":1395,"text":748},{"id":979,"depth":1395,"text":980},{"id":1053,"depth":1395,"text":1054},{"id":1119,"depth":1395,"text":287},{"id":1168,"depth":1395,"text":1169},{"id":1193,"depth":1395,"text":1194},{"id":1218,"depth":1395,"text":1219},"md",null,{},{"title":555,"description":1394},"6w-WwY16H2I2pa2SSrqm0OxAkEOF7JOE-pu9-tARfH4",[1412,1413],{"title":551,"path":552,"stem":553,"description":1394,"children":-1},{"title":559,"path":560,"stem":561,"description":1394,"children":-1},1796500153677]