[{"data":1,"prerenderedAt":1270},["ShallowReactive",2],{"navigation_docs":3,"-run-nixos":613,"-run-nixos-surround":1267},[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":66,"body":615,"description":677,"extension":1262,"links":1263,"meta":1264,"navigation":711,"path":67,"seo":1265,"stem":68,"__hash__":1266},"docs\u002F2.run\u002F14.nixos.md",{"type":616,"value":617,"toc":1252},"minimark",[618,631,638,643,656,660,671,755,770,774,781,857,864,939,967,988,992,1003,1068,1097,1101,1125,1129,1163,1176,1180,1190,1193,1197,1203,1239,1248],[619,620,621,622,626,627,630],"p",{},"On NixOS, SHADE can run without Docker: the ",[623,624,625],"code",{},"shade"," repository has a flake that builds the same release the image\nholds (the API bundle, the admin screens, the migrations and the console commands, from the same lockfile) and a\nNixOS module that declares an instance with its Postgres database, its Redis server and its services. It is\nexperimental in 0.1: it is tested, but its options may change in a minor version. The image stays the reference way\nto run SHADE, and ",[628,629,70],"a",{"href":71}," is the path most instances take.",[619,632,633,634,637],{},"Everything about SHADE's settings in ",[628,635,636],{"href":47},"Setting up an instance"," holds here too. What differs is how the\ninstance is started: as systemd services that NixOS writes from your configuration, instead of containers.",[639,640,642],"h2",{"id":641},"what-you-need","What you need",[644,645,646,650,653],"ul",{},[647,648,649],"li",{},"A NixOS host (x86_64 or aarch64) with flakes switched on.",[647,651,652],{},"A domain for the instance's API, and optionally one for the admin, pointed at the host.",[647,654,655],{},"Ports 80 and 443 open when the module's Caddy is in front; otherwise your own proxy.",[639,657,659],{"id":658},"adding-the-flake","Adding the flake",[619,661,662,663,666,667,670],{},"The flake is released with every version of SHADE, so a host pins the version it runs. 0.1.0 isn't out; the tag\nbelow is the pre-release ",[623,664,665],{},"v0.1.0-next.2",", so take the newest one in the ",[628,668,669],{"href":600},"changelog",".",[672,673,678],"pre",{"className":674,"code":675,"language":676,"meta":677,"style":677},"language-nix shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# flake.nix of the host\n{\n  inputs.nixpkgs.url = \"github:NixOS\u002Fnixpkgs\u002Fnixos-unstable\";\n  inputs.shade.url = \"github:shadehq-dev\u002Fshade\u002Fv0.1.0-next.2\";\n\n  outputs = { nixpkgs, shade, ... }: {\n    nixosConfigurations.server = nixpkgs.lib.nixosSystem {\n      system = \"x86_64-linux\";\n      modules = [ shade.nixosModules.shade .\u002Fconfiguration.nix ];\n    };\n  };\n}\n","nix","",[623,679,680,688,694,700,706,713,719,725,731,737,743,749],{"__ignoreMap":677},[681,682,685],"span",{"class":683,"line":684},"line",1,[681,686,687],{},"# flake.nix of the host\n",[681,689,691],{"class":683,"line":690},2,[681,692,693],{},"{\n",[681,695,697],{"class":683,"line":696},3,[681,698,699],{},"  inputs.nixpkgs.url = \"github:NixOS\u002Fnixpkgs\u002Fnixos-unstable\";\n",[681,701,703],{"class":683,"line":702},4,[681,704,705],{},"  inputs.shade.url = \"github:shadehq-dev\u002Fshade\u002Fv0.1.0-next.2\";\n",[681,707,709],{"class":683,"line":708},5,[681,710,712],{"emptyLinePlaceholder":711},true,"\n",[681,714,716],{"class":683,"line":715},6,[681,717,718],{},"  outputs = { nixpkgs, shade, ... }: {\n",[681,720,722],{"class":683,"line":721},7,[681,723,724],{},"    nixosConfigurations.server = nixpkgs.lib.nixosSystem {\n",[681,726,728],{"class":683,"line":727},8,[681,729,730],{},"      system = \"x86_64-linux\";\n",[681,732,734],{"class":683,"line":733},9,[681,735,736],{},"      modules = [ shade.nixosModules.shade .\u002Fconfiguration.nix ];\n",[681,738,740],{"class":683,"line":739},10,[681,741,742],{},"    };\n",[681,744,746],{"class":683,"line":745},11,[681,747,748],{},"  };\n",[681,750,752],{"class":683,"line":751},12,[681,753,754],{},"}\n",[619,756,757,758,761,762,765,766,769],{},"It gives ",[623,759,760],{},"packages.\u003Csystem>.shade"," (the built release), ",[623,763,764],{},"nixosModules.shade"," (the module below) and\n",[623,767,768],{},"checks.\u003Csystem>"," (its tests).",[639,771,773],{"id":772},"one-instance","One instance",[619,775,776,777,780],{},"An instance is one business, as with the image. The module's options sit under ",[623,778,779],{},"services.shade.instances.\u003Cname>",":",[672,782,784],{"className":674,"code":783,"language":676,"meta":677,"style":677},"# configuration.nix\nservices.shade.instances.example = {\n  apiUrl = \"https:\u002F\u002Fapi.example.org\";\n  adminUrl = \"https:\u002F\u002Fadmin.example.org\";       # optional: the admin on a domain of its own\n  environmentFile = \"\u002Frun\u002Fsecrets\u002Fshade-example.env\";\n  redis.passwordFile = \"\u002Frun\u002Fsecrets\u002Fshade-example-redis\";\n  database.ownerPasswordFile = \"\u002Frun\u002Fsecrets\u002Fshade-example-db-owner\";\n  database.backupPasswordFile = \"\u002Frun\u002Fsecrets\u002Fshade-example-db-backup\";\n  proxy = \"caddy\";                              # optional: Caddy in front, with HTTPS\n  settings = {\n    SHADE_PACKAGE_APPROVAL = true;\n    SHADE_BACKUP_URL = \"s3:\u002F\u002Fbackups\u002Fexample\";\n  };\n};\n",[623,785,786,791,796,801,806,811,816,821,826,831,836,841,846,851],{"__ignoreMap":677},[681,787,788],{"class":683,"line":684},[681,789,790],{},"# configuration.nix\n",[681,792,793],{"class":683,"line":690},[681,794,795],{},"services.shade.instances.example = {\n",[681,797,798],{"class":683,"line":696},[681,799,800],{},"  apiUrl = \"https:\u002F\u002Fapi.example.org\";\n",[681,802,803],{"class":683,"line":702},[681,804,805],{},"  adminUrl = \"https:\u002F\u002Fadmin.example.org\";       # optional: the admin on a domain of its own\n",[681,807,808],{"class":683,"line":708},[681,809,810],{},"  environmentFile = \"\u002Frun\u002Fsecrets\u002Fshade-example.env\";\n",[681,812,813],{"class":683,"line":715},[681,814,815],{},"  redis.passwordFile = \"\u002Frun\u002Fsecrets\u002Fshade-example-redis\";\n",[681,817,818],{"class":683,"line":721},[681,819,820],{},"  database.ownerPasswordFile = \"\u002Frun\u002Fsecrets\u002Fshade-example-db-owner\";\n",[681,822,823],{"class":683,"line":727},[681,824,825],{},"  database.backupPasswordFile = \"\u002Frun\u002Fsecrets\u002Fshade-example-db-backup\";\n",[681,827,828],{"class":683,"line":733},[681,829,830],{},"  proxy = \"caddy\";                              # optional: Caddy in front, with HTTPS\n",[681,832,833],{"class":683,"line":739},[681,834,835],{},"  settings = {\n",[681,837,838],{"class":683,"line":745},[681,839,840],{},"    SHADE_PACKAGE_APPROVAL = true;\n",[681,842,843],{"class":683,"line":751},[681,844,845],{},"    SHADE_BACKUP_URL = \"s3:\u002F\u002Fbackups\u002Fexample\";\n",[681,847,849],{"class":683,"line":848},13,[681,850,748],{},[681,852,854],{"class":683,"line":853},14,[681,855,856],{},"};\n",[619,858,859,860,863],{},"With that, ",[623,861,862],{},"nixos-rebuild switch"," gives the instance:",[644,865,866,885,900,922,933],{},[647,867,868,869,872,873,876,877,880,881,884],{},"the services ",[623,870,871],{},"shade-example-admin",", ",[623,874,875],{},"shade-example-public"," and ",[623,878,879],{},"shade-example-worker",", one per container role.\n",[623,882,883],{},"roles = [ \"all\" ];"," runs the small profile, all three in one service, with what that gives up;",[647,886,887,888,891,892,895,896,899],{},"a system user ",[623,889,890],{},"shade-example",", and the state folder ",[623,893,894],{},"\u002Fvar\u002Flib\u002Fshade\u002Fexample"," for uploaded media and the unpacked\nserver packages, in place of the image's ",[623,897,898],{},"\u002Fapp\u002Fdata",";",[647,901,902,903,905,906,910,911,913,914,917,918,921],{},"its own Postgres database, ",[623,904,890],{},", with the three roles of ",[628,907,909],{"href":908},"\u002Frun\u002Fown-server#the-databases-roles","The database's\nroles",": ",[623,912,890],{},", the running role, which reaches it over the local\nsocket as the system user, with no password and owning nothing; ",[623,915,916],{},"shade-example-owner",", which owns the database and\nconnects over the loopback address; and ",[623,919,920],{},"shade-example-backup",", which reads everything and is read-only;",[647,923,924,925,928,929,932],{},"its own Redis server, ",[623,926,927],{},"redis-shade-example"," (Valkey, with a password, ",[623,930,931],{},"noeviction"," and nothing written to disk, as\nin the deployment template);",[647,934,935,936,938],{},"the command ",[623,937,890],{},", which runs SHADE's console commands for this instance.",[619,940,941,942,945,946,949,950,952,953,956,957,959,960,963,964,670],{},"A oneshot service, ",[623,943,944],{},"shade-example-database",", makes the roles and the database once, as the ",[623,947,948],{},"postgres"," user, and sets the\ntwo passwords again on every start. It refuses a database made before the three roles (one owned by ",[623,951,890],{},"):\nset it up again with a fresh database. The owner's password is loaded only in the admin (and ",[623,954,955],{},"all",") service and the\nconsole, and the backup role's only in the worker (and ",[623,958,955],{},") service. The module no longer uses\n",[623,961,962],{},"services.postgresql.ensureDatabases"," or ",[623,965,966],{},"ensureUsers",[619,968,969,970,973,974,977,978,981,982,876,985,670],{},"The admin service applies the migrations when it starts, as ",[623,971,972],{},"MIGRATE_ON_START"," does in the template; the public role\nand the worker wait for them. ",[623,975,976],{},"settings"," takes any further variable from SHADE's configuration (the backup bucket,\nOIDC, ",[623,979,980],{},"SHADE_TRUSTED_MODULE_KEYS","). A second instance on the same host needs ports of its own:\n",[623,983,984],{},"ports = { admin = 4100; public = 4101; worker = 4102; }",[623,986,987],{},"redis.port = 6380",[639,989,991],{"id":990},"secrets","Secrets",[619,993,994,995,998,999,1002],{},"Everything in your NixOS configuration ends up in the Nix store, which every user of the host can read. So the\nmodule takes no secret as an option. ",[623,996,997],{},"environmentFile"," is a file of ",[623,1000,1001],{},"NAME=value"," lines that systemd reads when a\nservice starts:",[672,1004,1008],{"className":1005,"code":1006,"language":1007,"meta":677,"style":677},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","APP_SECRET=\u003Copenssl rand -base64 48>\nSHADE_BACKUP_KEY=\u003Copenssl rand -base64 32>\nSHADE_BACKUP_S3_SECRET_ACCESS_KEY=...\n","bash",[623,1009,1010,1038,1057],{"__ignoreMap":677},[681,1011,1012,1016,1020,1024,1028,1031,1035],{"class":683,"line":684},[681,1013,1015],{"class":1014},"sTEyZ","APP_SECRET",[681,1017,1019],{"class":1018},"sMK4o","=\u003C",[681,1021,1023],{"class":1022},"sfazB","openssl",[681,1025,1027],{"class":1026},"sBMFI"," rand",[681,1029,1030],{"class":1022}," -base64",[681,1032,1034],{"class":1033},"sbssI"," 4",[681,1036,1037],{"class":1018},"8>\n",[681,1039,1040,1043,1045,1047,1049,1051,1054],{"class":683,"line":690},[681,1041,1042],{"class":1014},"SHADE_BACKUP_KEY",[681,1044,1019],{"class":1018},[681,1046,1023],{"class":1022},[681,1048,1027],{"class":1026},[681,1050,1030],{"class":1022},[681,1052,1053],{"class":1033}," 3",[681,1055,1056],{"class":1018},"2>\n",[681,1058,1059,1062,1065],{"class":683,"line":696},[681,1060,1061],{"class":1014},"SHADE_BACKUP_S3_SECRET_ACCESS_KEY",[681,1063,1064],{"class":1018},"=",[681,1066,1067],{"class":1022},"...\n",[619,1069,1070,1073,1074,1077,1078,876,1081,1084,1085,1087,1088,1090,1091,1093,1094,670],{},[623,1071,1072],{},"redis.passwordFile"," holds the Redis password on its own, letters and digits only (",[623,1075,1076],{},"openssl rand -hex 32","), since it\ngoes into the Redis address as it is; ",[623,1079,1080],{},"database.ownerPasswordFile",[623,1082,1083],{},"database.backupPasswordFile"," hold the owner's and\nthe backup role's passwords the same way (letters and digits only, ",[623,1086,1076],{},"). All three are paths given as strings, outside the store: a tool such as sops-nix or\nagenix, or a file you write yourself, readable by root only. The module refuses a secret's name in ",[623,1089,976],{},"\n(",[623,1092,1015],{},", a token, a password, a key) and a secret file under ",[623,1095,1096],{},"\u002Fnix\u002Fstore",[639,1098,1100],{"id":1099},"routing","Routing",[619,1102,1103,1104,1107,1108,1113,1114,1117,1118,1121,1122,670],{},"With ",[623,1105,1106],{},"proxy = \"caddy\"",", Caddy serves the API's domain with HTTPS and routes it as the deployment template does, and as the Caddy of ",[628,1109,1110],{"href":71},[623,1111,1112],{},"shade install"," does on Docker:\n",[623,1115,1116],{},"\u002Fapi\u002Fv1\u002Faccount"," goes to the public role, everything else to the admin. An admin domain of its own goes to the admin.\nWithout it, the services listen on ",[623,1119,1120],{},"127.0.0.1"," (ports 4000, 4001 and 4002) and your own proxy routes them the same\nway; the worker only answers ",[623,1123,1124],{},"\u002Fhealth",[639,1126,1128],{"id":1127},"the-first-admin","The first admin",[672,1130,1132],{"className":1005,"code":1131,"language":1007,"meta":677,"style":677},"sudo shade-example create-admin --email you@example.org --name \"Your Name\"\n",[623,1133,1134],{"__ignoreMap":677},[681,1135,1136,1139,1142,1145,1148,1151,1154,1157,1160],{"class":683,"line":684},[681,1137,1138],{"class":1026},"sudo",[681,1140,1141],{"class":1022}," shade-example",[681,1143,1144],{"class":1022}," create-admin",[681,1146,1147],{"class":1022}," --email",[681,1149,1150],{"class":1022}," you@example.org",[681,1152,1153],{"class":1022}," --name",[681,1155,1156],{"class":1018}," \"",[681,1158,1159],{"class":1022},"Your Name",[681,1161,1162],{"class":1018},"\"\n",[619,1164,1165,1166,1169,1170,876,1172,1175],{},"It asks for the password, and runs as the instance's user with its settings and secrets. Every console command\nworks this way (",[628,1167,1168],{"href":51},"The console","), apart from ",[623,1171,1112],{},[623,1173,1174],{},"shade update",", which set up and update\nthe Docker installation and are left out here.",[639,1177,1179],{"id":1178},"updating-and-rolling-back","Updating and rolling back",[619,1181,1182,1183,1186,1187,1189],{},"Move the flake's input to the new version (",[623,1184,1185],{},"github:shadehq-dev\u002Fshade\u002Fv0.1.1",") and switch. The admin service takes\nthe backup before it migrates, if backups are set up (",[628,1188,82],{"href":83},"), and then\napplies the new migrations.",[619,1191,1192],{},"A NixOS generation rolls the code back, never the data. Going back one release is safe, because a release only adds\ntables and columns and removes them a release later, so the previous release runs on the new database. Going back\nfurther means restoring the backup taken before the update.",[639,1194,1196],{"id":1195},"for-developers-checking-the-flake","For developers: checking the flake",[619,1198,1199,1200,1202],{},"From a checkout of ",[623,1201,625],{},", on Linux or in WSL2 with Nix:",[644,1204,1205,1227,1233],{},[647,1206,1207,1210,1211,1214,1215,1218,1219,1222,1223,1226],{},[623,1208,1209],{},"nix build .#shade"," builds the release. The pnpm dependencies are one download pinned by its hash in\n",[623,1212,1213],{},"nix\u002Fpackage.nix"," (",[623,1216,1217],{},"pnpmDeps.hash","); the build itself has no network. After a change to ",[623,1220,1221],{},"pnpm-lock.yaml",", set the\nhash to ",[623,1224,1225],{},"\"\"",", build, and copy the hash Nix prints.",[647,1228,1229,1232],{},[623,1230,1231],{},"nix build .#checks.x86_64-linux.module"," evaluates what the module refuses, without a VM.",[647,1234,1235,1238],{},[623,1236,1237],{},"nix flake check"," also runs the VM test: one instance with its three roles, an admin and a read token made with\nthe console, the content API read on the public role, and an untrusted module run in the sandbox. It boots a\nvirtual machine: quick with KVM, and it also runs without, under QEMU's software emulation (a few minutes).",[619,1240,1241,1244,1245,1247],{},[623,1242,1243],{},"pnpm release:gates"," runs ",[623,1246,1237],{}," where Nix is installed and says when it skipped it. While the native\ninstall is experimental, a failure there is a warning, not a reason to hold a release.",[1249,1250,1251],"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 .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":677,"searchDepth":690,"depth":690,"links":1253},[1254,1255,1256,1257,1258,1259,1260,1261],{"id":641,"depth":690,"text":642},{"id":658,"depth":690,"text":659},{"id":772,"depth":690,"text":773},{"id":990,"depth":690,"text":991},{"id":1099,"depth":690,"text":1100},{"id":1127,"depth":690,"text":1128},{"id":1178,"depth":690,"text":1179},{"id":1195,"depth":690,"text":1196},"md",null,{},{"title":66,"description":677},"qL6bIidzGuyUM9svCR1vkc3WI6oB1dbj7ZmOHiO5fDA",[1268,1269],{"title":62,"path":63,"stem":64,"description":677,"children":-1},{"title":70,"path":71,"stem":72,"description":677,"children":-1},1796500154135]