[{"data":1,"prerenderedAt":474},["ShallowReactive",2],{"navigation_docs":3,"section-navigation-docs":130,"-docs-volumes":164,"-docs-volumes-surround":381,"doc-previews":386},[4,8,50,54,58,62,66,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126],{"title":5,"path":6,"stem":7},"Quickstart","\u002Fdocs\u002Fquickstart","docs\u002F01.quickstart",{"title":9,"path":10,"stem":11,"children":12},"Guides","\u002Fdocs\u002Fguides","docs\u002F02.guides\u002Findex",[13,14,18,22,26,30,34,38,42,46],{"title":9,"path":10,"stem":11},{"title":15,"path":16,"stem":17},"Next.js","\u002Fdocs\u002Fguides\u002Fnextjs","docs\u002F02.guides\u002F1.nextjs",{"title":19,"path":20,"stem":21},"Nuxt","\u002Fdocs\u002Fguides\u002Fnuxt","docs\u002F02.guides\u002F2.nuxt",{"title":23,"path":24,"stem":25},"SvelteKit","\u002Fdocs\u002Fguides\u002Fsveltekit","docs\u002F02.guides\u002F3.sveltekit",{"title":27,"path":28,"stem":29},"Astro","\u002Fdocs\u002Fguides\u002Fastro","docs\u002F02.guides\u002F4.astro",{"title":31,"path":32,"stem":33},"Express","\u002Fdocs\u002Fguides\u002Fexpress","docs\u002F02.guides\u002F5.express",{"title":35,"path":36,"stem":37},"FastAPI","\u002Fdocs\u002Fguides\u002Ffastapi","docs\u002F02.guides\u002F6.fastapi",{"title":39,"path":40,"stem":41},"Django","\u002Fdocs\u002Fguides\u002Fdjango","docs\u002F02.guides\u002F7.django",{"title":43,"path":44,"stem":45},"Laravel","\u002Fdocs\u002Fguides\u002Flaravel","docs\u002F02.guides\u002F8.laravel",{"title":47,"path":48,"stem":49},"Go","\u002Fdocs\u002Fguides\u002Fgo","docs\u002F02.guides\u002F9.go",{"title":51,"path":52,"stem":53},"Services","\u002Fdocs\u002Fservices","docs\u002F03.services",{"title":55,"path":56,"stem":57},"Deployments","\u002Fdocs\u002Fdeployments","docs\u002F04.deployments",{"title":59,"path":60,"stem":61},"Builds","\u002Fdocs\u002Fbuilds","docs\u002F05.builds",{"title":63,"path":64,"stem":65},"Variables","\u002Fdocs\u002Fvariables","docs\u002F06.variables",{"title":67,"path":68,"stem":69},"Domains","\u002Fdocs\u002Fdomains","docs\u002F07.domains",{"title":71,"path":72,"stem":73},"PostgreSQL","\u002Fdocs\u002Fpostgres","docs\u002F08.postgres",{"title":75,"path":76,"stem":77},"Object storage","\u002Fdocs\u002Fobject-storage","docs\u002F09.object-storage",{"title":79,"path":80,"stem":81},"Volumes","\u002Fdocs\u002Fvolumes","docs\u002F10.volumes",{"title":83,"path":84,"stem":85},"Key-value store","\u002Fdocs\u002Fredis","docs\u002F11.redis",{"title":87,"path":88,"stem":89},"Workspaces","\u002Fdocs\u002Fworkspaces","docs\u002F12.workspaces",{"title":91,"path":92,"stem":93},"Projects","\u002Fdocs\u002Fprojects","docs\u002F13.projects",{"title":95,"path":96,"stem":97},"Environments","\u002Fdocs\u002Fenvironments","docs\u002F14.environments",{"title":99,"path":100,"stem":101},"Eject","\u002Fdocs\u002Feject","docs\u002F15.eject",{"title":103,"path":104,"stem":105},"API","\u002Fdocs\u002Fapi","docs\u002F16.api",{"title":107,"path":108,"stem":109},"CLI","\u002Fdocs\u002Fcli","docs\u002F17.cli",{"title":111,"path":112,"stem":113},"Claude Plugin & MCP","\u002Fdocs\u002Fclaude-plugin","docs\u002F18.claude-plugin",{"title":115,"path":116,"stem":117},"Metrics","\u002Fdocs\u002Fmetrics","docs\u002F19.metrics",{"title":119,"path":120,"stem":121},"Logs","\u002Fdocs\u002Flogs","docs\u002F20.logs",{"title":123,"path":124,"stem":125},"Billing","\u002Fdocs\u002Fbilling","docs\u002F21.billing",{"title":127,"path":128,"stem":129},"Self-hosting","\u002Fdocs\u002Fself-hosting","docs\u002F22.self-hosting",[131,132,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163],{"title":5,"path":6,"stem":7},{"title":9,"path":10,"stem":11,"children":133},[134,135,136,137,138,139,140,141,142,143],{"title":9,"path":10,"stem":11},{"title":15,"path":16,"stem":17},{"title":19,"path":20,"stem":21},{"title":23,"path":24,"stem":25},{"title":27,"path":28,"stem":29},{"title":31,"path":32,"stem":33},{"title":35,"path":36,"stem":37},{"title":39,"path":40,"stem":41},{"title":43,"path":44,"stem":45},{"title":47,"path":48,"stem":49},{"title":51,"path":52,"stem":53},{"title":55,"path":56,"stem":57},{"title":59,"path":60,"stem":61},{"title":63,"path":64,"stem":65},{"title":67,"path":68,"stem":69},{"title":71,"path":72,"stem":73},{"title":75,"path":76,"stem":77},{"title":79,"path":80,"stem":81},{"title":83,"path":84,"stem":85},{"title":87,"path":88,"stem":89},{"title":91,"path":92,"stem":93},{"title":95,"path":96,"stem":97},{"title":99,"path":100,"stem":101},{"title":103,"path":104,"stem":105},{"title":107,"path":108,"stem":109},{"title":111,"path":112,"stem":113},{"title":115,"path":116,"stem":117},{"title":119,"path":120,"stem":121},{"title":123,"path":124,"stem":125},{"title":127,"path":128,"stem":129},{"id":165,"title":79,"body":166,"description":374,"extension":375,"links":376,"meta":377,"navigation":378,"path":80,"seo":379,"stem":81,"__hash__":380},"docs\u002Fdocs\u002F10.volumes.md",{"type":167,"value":168,"toc":362},"minimark",[169,173,185,190,202,227,230,237,246,250,253,267,271,274,277,281,290,293,300,304,317,321,327,331,338,342],[170,171,172],"p",{},"The root filesystem of a Lucity service is ephemeral, and should only be used for temporary files you do not mind losing on the next deploy.",[170,174,175,176,180,181,184],{},"A volume is a disk that outlives the container, and the place to put data you want to keep. It is worth knowing that your application might never need one, because volumes come with limitations that the alternatives do not have. Uploads belong in a ",[177,178,179],"a",{"href":76},"bucket"," and data belongs in a ",[177,182,183],{"href":72},"database",", both of which any number of instances can reach at once. Reach for a volume when something insists on a real filesystem. Typical examples are self-hosted software with a data directory, a search index it rebuilds on disk, or a database you are running yourself.",[186,187,189],"h2",{"id":188},"creating-and-mounting","Creating and mounting",[170,191,192,193,197,198,201],{},"On the project canvas, click ",[194,195,196],"strong",{},"Create"," and choose ",[194,199,200],{},"Volume",". Give it a name between 2 and 16 characters and a size, and it is ready immediately.",[170,203,204,205,208,209,212,213,217,218,221,222,226],{},"A freshly created volume is unmounted. Open it, and under ",[194,206,207],{},"Settings"," → ",[194,210,211],{},"Mount",", pick the service and the path to mount it at. The path is where your application expects to find its data, ",[214,215,216],"code",{},"\u002Fvar\u002Flib\u002Fghost\u002Fcontent"," or ",[214,219,220],{},"\u002Fdata"," or wherever the software in question insists on. Mounting takes effect immediately and needs no rebuild, like any other ",[177,223,225],{"href":224},"\u002Fdocs\u002Fdeployments#configuration-changes","configuration change",". It restarts the service so the disk is there when it starts.",[170,228,229],{},"Unmounting detaches the disk and restarts the service again. Your data stays on the volume, so you can mount it somewhere else, or back on the same service, later.",[170,231,232,233,236],{},"A volume and the service it mounts into must be in the same ",[177,234,235],{"href":96},"environment",".",[238,239,240,241,245],"note",{},"Mounting a volume causes a short downtime, and so does ",[177,242,244],{"href":243},"#rollout-downtime","every deploy afterwards",". The service stops before its replacement starts, because the disk cannot be attached to two instances at once. Unmounting is the exception, since the replacement no longer needs the disk and can take over before the old instance goes.",[186,247,249],{"id":248},"one-volume-one-service","One volume, one service",[170,251,252],{},"A volume is a single disk, and a disk can only be attached to one machine at a time. This means volumes can only be attached to services with a single replica.",[170,254,255,256,258,259,262,263,266],{},"That is why we generally recommend keeping your application stateless, writing its state into a ",[177,257,183],{"href":72},", a ",[177,260,261],{"href":84},"key-value store"," or an ",[177,264,265],{"href":76},"object storage bucket"," instead.",[186,268,270],{"id":269},"rollout-downtime","Rollout downtime",[170,272,273],{},"Since a volume can only be attached to one instance at a time, services with a mounted volume have a short downtime window on every deploy. The old instance has to release the disk before the new one can claim it, so the service stops and starts again instead of handing over.",[170,275,276],{},"Plan for it the way you would plan a restart. It is usually a few seconds, and it is the price of keeping state on a disk rather than in a database or a bucket.",[186,278,280],{"id":279},"size","Size",[170,282,283,284,208,286,289],{},"Volumes run from 10 GB up to 1 TB. You can add space at any time under ",[194,285,207],{},[194,287,288],{},"Storage",", and the disk grows in place while the service keeps running.",[170,291,292],{},"Storage can never be made smaller. Moving to a smaller disk means creating a second volume, copying the data across, and pointing the service at the new one.",[170,294,295,296,299],{},"The ",[194,297,298],{},"Usage"," tab charts how much of the volume is actually in use over time, which is what to check before deciding you need more.",[186,301,303],{"id":302},"file-ownership","File ownership",[170,305,306,307,310,311,208,313,316],{},"For ",[177,308,309],{"href":52},"services"," created from an image, the run-as user set under ",[194,312,207],{},[194,314,315],{},"Run as user"," also becomes the owner of the mounted volume. That is usually what you need for an image that runs as a non-root user and expects to write to its own data directory.",[186,318,320],{"id":319},"whats-not-there-yet","What's not there yet",[170,322,323,324,326],{},"Volumes are not backed up. There are no snapshots and no retention window, and deleting a volume deletes its contents for good. If a volume holds something you cannot lose, copy it somewhere else on a schedule: a periodic dump into a ",[177,325,179],{"href":76}," from inside the service is the usual answer, and it produces something you can actually restore from.",[186,328,330],{"id":329},"under-the-hood","Under the hood",[170,332,333,334,337],{},"A volume is a PersistentVolumeClaim in your environment's namespace, mounted into the service's pod at the path you chose. That is why the constraints look the way they do: a single-writer disk, attached to one pod, expandable but not shrinkable. An ",[177,335,336],{"href":100},"ejected"," project keeps its volumes exactly as they are.",[186,339,341],{"id":340},"next-steps","Next steps",[343,344,345,352,357],"ul",{},[346,347,348,351],"li",{},[177,349,51],{"href":350},"\u002Fdocs\u002Fservices#volume-mounts"," for what mounting a volume does to a service",[346,353,354,356],{},[177,355,75],{"href":76}," for files that do not need a filesystem",[346,358,359,361],{},[177,360,71],{"href":72}," for data that belongs in a database",{"title":363,"searchDepth":364,"depth":364,"links":365},"",2,[366,367,368,369,370,371,372,373],{"id":188,"depth":364,"text":189},{"id":248,"depth":364,"text":249},{"id":269,"depth":364,"text":270},{"id":279,"depth":364,"text":280},{"id":302,"depth":364,"text":303},{"id":319,"depth":364,"text":320},{"id":329,"depth":364,"text":330},{"id":340,"depth":364,"text":341},"Persistent disks for services that need to keep state on the filesystem.","md",null,{},true,{"title":79,"description":374},"UTLrahF8sFFqfq2k7UqFizi4CP9T9BXrXO3DE6gUvec",[382,384],{"title":75,"path":76,"stem":77,"description":383,"children":-1},"S3-compatible buckets for uploads, exports and anything else your service needs to keep.",{"title":83,"path":84,"stem":85,"description":385,"children":-1},"A Redis®-compatible key-value store for caching, sessions and queues.",[387,390,392,395,398,401,404,407,410,413,416,419,422,424,426,428,430,432,434,435,436,437,439,441,443,445,447,449,451,453,455,457,459,462,466,470],{"path":6,"title":388,"description":389},"Deploy your first service","Deploy an app to Lucity, put it on a public domain, and connect a PostgreSQL database and an object storage bucket in about fifteen minutes.",{"path":391,"title":9,"description":376},"\u002Fdocs\u002Fguides\u002F.navigation",{"path":16,"title":393,"description":394},"Deploy a Next.js app","Deploy a Next.js app on Lucity, with a database, environment variables that behave, and no Dockerfile.",{"path":20,"title":396,"description":397},"Deploy a Nuxt app","Deploy a Nuxt app on Lucity. Nitro output, runtime config, and a database, with no preset to pick.",{"path":24,"title":399,"description":400},"Deploy a SvelteKit app","Deploy a SvelteKit app on Lucity. One adapter change stands between a fresh project and a running service.",{"path":28,"title":402,"description":403},"Deploy an Astro site","Deploy an Astro site on Lucity, static by default and server rendered when you add an adapter.",{"path":32,"title":405,"description":406},"Deploy an Express API","Deploy an Express API on Lucity. Three requirements, none of them platform-specific.",{"path":36,"title":408,"description":409},"Deploy a FastAPI service","Deploy a FastAPI service on Lucity. Detection is picky about layout, and the fix is one setting.",{"path":40,"title":411,"description":412},"Deploy a Django project","Deploy a Django project on Lucity, with migrations that run themselves and static files that do not.",{"path":44,"title":414,"description":415},"Deploy a Laravel application","Deploy a Laravel application on Lucity, with migrations, caches and a queue worker, and no server to configure.",{"path":48,"title":417,"description":418},"Deploy a Go service","Deploy a Go service on Lucity. Compiled in the build, shipped as a binary, nothing else in the image.",{"path":10,"title":420,"description":421},"Deploy your framework","Deploy guides for the frameworks people actually ship: Next.js, Nuxt, SvelteKit, Astro, Express, FastAPI, Django, Laravel, and Go.",{"path":52,"title":51,"description":423},"Services are the deployable units of a project: what they are, how they are configured, and how they scale.",{"path":56,"title":55,"description":425},"How a deployment goes live on Lucity, and the ways to trigger one.",{"path":60,"title":59,"description":427},"How Lucity turns your source code into a container image.",{"path":64,"title":63,"description":429},"Configuration for your services: service variables, shared variables, and dynamic variables.",{"path":68,"title":67,"description":431},"Put a service on the internet. Use a platform hostname for quick tests, or a domain you own.",{"path":72,"title":71,"description":433},"Managed PostgreSQL databases, replicated and backed up, connected to your services without copying credentials.",{"path":76,"title":75,"description":383},{"path":80,"title":79,"description":374},{"path":84,"title":83,"description":385},{"path":88,"title":87,"description":438},"Workspaces represent your organization in Lucity, with their own members, isolation and billing.",{"path":92,"title":91,"description":440},"Projects group services, databases and the environments they run in.",{"path":96,"title":95,"description":442},"Development, staging, production: isolated copies of the same application.",{"path":100,"title":99,"description":444},"Download a project as a Helm chart and run it on a Kubernetes cluster of your own.",{"path":104,"title":103,"description":446},"The GraphQL API behind the dashboard, with an interactive playground.",{"path":108,"title":107,"description":448},"Deploy and manage your services from a terminal or a CI pipeline.",{"path":112,"title":111,"description":450},"Deploy and manage your services from Claude Code, Codex, Cursor or any other MCP client.",{"path":116,"title":115,"description":452},"CPU and memory for every service, and disk usage for every volume.",{"path":120,"title":119,"description":454},"What your services print while they run, and the output of every deployment step.",{"path":124,"title":123,"description":456},"Plans, resource usage, the free trial, and what happens when a payment fails.",{"path":128,"title":127,"description":458},"Run the whole platform on a Kubernetes cluster you own, using the same two Helm charts we run ourselves.",{"path":460,"title":461,"description":376},"\u002Flegal\u002F.navigation","Legal",{"path":463,"title":464,"description":465},"\u002Flegal\u002Fdata-processing-agreement","Data Processing Agreement","How Lucity processes personal data on your behalf.",{"path":467,"title":468,"description":469},"\u002Flegal\u002Fprivacy-policy","Privacy Policy","How Lucity handles your data.",{"path":471,"title":472,"description":473},"\u002Flegal\u002Fterms-of-use","Terms of Use","Terms governing your use of Lucity.",1791216728262]