[{"data":1,"prerenderedAt":663},["ShallowReactive",2],{"docs-navigation":3,"docs:\u002Fdocs\u002Fself-hosting\u002Fstorage":235,"docs-surround:\u002Fdocs\u002Fself-hosting\u002Fstorage":658},[4],{"title":5,"path":6,"stem":7,"children":8},"Docs","\u002Fdocs","docs",[9,13,37,55,70,128,146,191,217],{"title":10,"path":6,"stem":11,"icon":12},"Hubstruct documentation","docs\u002Findex","book-open",{"title":14,"icon":15,"path":16,"stem":17,"children":18,"page":36},"Getting started","rocket","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[19,24,28,32],{"title":20,"path":21,"stem":22,"icon":23},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F1.getting-started\u002F1.introduction",null,{"title":25,"path":26,"stem":27,"icon":23},"Requirements","\u002Fdocs\u002Fgetting-started\u002Frequirements","docs\u002F1.getting-started\u002F2.requirements",{"title":29,"path":30,"stem":31,"icon":23},"Quick start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F1.getting-started\u002F3.quick-start",{"title":33,"path":34,"stem":35,"icon":23},"First steps","\u002Fdocs\u002Fgetting-started\u002Ffirst-steps","docs\u002F1.getting-started\u002F4.first-steps",false,{"title":38,"icon":39,"path":40,"stem":41,"children":42,"page":36},"Concepts","lightbulb","\u002Fdocs\u002Fconcepts","docs\u002F2.concepts",[43,47,51],{"title":44,"path":45,"stem":46,"icon":23},"How it works","\u002Fdocs\u002Fconcepts\u002Fhow-it-works","docs\u002F2.concepts\u002F1.how-it-works",{"title":48,"path":49,"stem":50,"icon":23},"Processing steps","\u002Fdocs\u002Fconcepts\u002Fprocessing","docs\u002F2.concepts\u002F2.processing",{"title":52,"path":53,"stem":54,"icon":23},"Media","\u002Fdocs\u002Fconcepts\u002Fmedia","docs\u002F2.concepts\u002F3.media",{"title":56,"path":57,"stem":58,"children":59,"icon":69},"Libraries","\u002Fdocs\u002Flibraries","docs\u002F3.libraries\u002F1.index",[60,61,65],{"title":56,"path":57,"stem":58,"icon":23},{"title":62,"path":63,"stem":64,"icon":23},"Storage","\u002Fdocs\u002Flibraries\u002Fs3","docs\u002F3.libraries\u002F3.s3",{"title":66,"path":67,"stem":68,"icon":23},"Uploading","\u002Fdocs\u002Flibraries\u002Fuploading","docs\u002F3.libraries\u002F4.uploading","layer-group",{"title":71,"icon":72,"path":73,"stem":74,"children":75,"page":36},"Features","wand-magic-sparkles","\u002Fdocs\u002Ffeatures","docs\u002F4.features",[76,80,84,88,92,96,100,104,108,112,116,120,124],{"title":77,"path":78,"stem":79,"icon":23},"Browsing","\u002Fdocs\u002Ffeatures\u002Fbrowsing","docs\u002F4.features\u002F01.browsing",{"title":81,"path":82,"stem":83,"icon":23},"Search","\u002Fdocs\u002Ffeatures\u002Fsearch","docs\u002F4.features\u002F02.search",{"title":85,"path":86,"stem":87,"icon":23},"Tags","\u002Fdocs\u002Ffeatures\u002Ftags","docs\u002F4.features\u002F03.tags",{"title":89,"path":90,"stem":91,"icon":23},"Albums","\u002Fdocs\u002Ffeatures\u002Falbums","docs\u002F4.features\u002F04.albums",{"title":93,"path":94,"stem":95,"icon":23},"People and faces","\u002Fdocs\u002Ffeatures\u002Fpeople","docs\u002F4.features\u002F05.people",{"title":97,"path":98,"stem":99,"icon":23},"Groups","\u002Fdocs\u002Ffeatures\u002Fgroups","docs\u002F4.features\u002F06.groups",{"title":101,"path":102,"stem":103,"icon":23},"Duplicates and stacks","\u002Fdocs\u002Ffeatures\u002Fduplicates-and-stacks","docs\u002F4.features\u002F07.duplicates-and-stacks",{"title":105,"path":106,"stem":107,"icon":23},"NSFW","\u002Fdocs\u002Ffeatures\u002Fnsfw","docs\u002F4.features\u002F08.nsfw",{"title":109,"path":110,"stem":111,"icon":23},"Trash","\u002Fdocs\u002Ffeatures\u002Ftrash","docs\u002F4.features\u002F09.trash",{"title":113,"path":114,"stem":115,"icon":23},"Home and the dashboard","\u002Fdocs\u002Ffeatures\u002Fhome-and-dashboard","docs\u002F4.features\u002F10.home-and-dashboard",{"title":117,"path":118,"stem":119,"icon":23},"Live updates and offline","\u002Fdocs\u002Ffeatures\u002Flive-updates","docs\u002F4.features\u002F11.live-updates",{"title":121,"path":122,"stem":123,"icon":23},"Appearance and the app","\u002Fdocs\u002Ffeatures\u002Fappearance","docs\u002F4.features\u002F12.appearance",{"title":125,"path":126,"stem":127,"icon":23},"Places","\u002Fdocs\u002Ffeatures\u002Fplaces","docs\u002F4.features\u002F13.places",{"title":129,"icon":130,"path":131,"stem":132,"children":133,"page":36},"Administration","sliders","\u002Fdocs\u002Fadministration","docs\u002F5.administration",[134,138,142],{"title":135,"path":136,"stem":137,"icon":23},"Users and sign-in","\u002Fdocs\u002Fadministration\u002Fusers-and-sign-in","docs\u002F5.administration\u002F1.users-and-sign-in",{"title":139,"path":140,"stem":141,"icon":23},"API keys","\u002Fdocs\u002Fadministration\u002Fapi-keys","docs\u002F5.administration\u002F2.api-keys",{"title":143,"path":144,"stem":145,"icon":23},"Processing settings","\u002Fdocs\u002Fadministration\u002Fprocessing-settings","docs\u002F5.administration\u002F3.processing-settings",{"title":147,"icon":148,"path":149,"stem":150,"children":151,"page":36},"Self-hosting","server","\u002Fdocs\u002Fself-hosting","docs\u002F6.self-hosting",[152,156,160,164,167,171,175,179,183,187],{"title":153,"path":154,"stem":155,"icon":23},"Architecture","\u002Fdocs\u002Fself-hosting\u002Farchitecture","docs\u002F6.self-hosting\u002F1.architecture",{"title":157,"path":158,"stem":159,"icon":23},"Telemetry","\u002Fdocs\u002Fself-hosting\u002Ftelemetry","docs\u002F6.self-hosting\u002F10.telemetry",{"title":161,"path":162,"stem":163,"icon":23},"Sharing one GPU","\u002Fdocs\u002Fself-hosting\u002Fgpu","docs\u002F6.self-hosting\u002F2.gpu",{"title":62,"path":165,"stem":166,"icon":23},"\u002Fdocs\u002Fself-hosting\u002Fstorage","docs\u002F6.self-hosting\u002F3.storage",{"title":168,"path":169,"stem":170,"icon":23},"Backups","\u002Fdocs\u002Fself-hosting\u002Fbackups","docs\u002F6.self-hosting\u002F4.backups",{"title":172,"path":173,"stem":174,"icon":23},"Updating","\u002Fdocs\u002Fself-hosting\u002Fupdating","docs\u002F6.self-hosting\u002F5.updating",{"title":176,"path":177,"stem":178,"icon":23},"Scaling","\u002Fdocs\u002Fself-hosting\u002Fscaling","docs\u002F6.self-hosting\u002F6.scaling",{"title":180,"path":181,"stem":182,"icon":23},"HTTPS and a domain","\u002Fdocs\u002Fself-hosting\u002Freverse-proxy","docs\u002F6.self-hosting\u002F7.reverse-proxy",{"title":184,"path":185,"stem":186,"icon":23},"Troubleshooting","\u002Fdocs\u002Fself-hosting\u002Ftroubleshooting","docs\u002F6.self-hosting\u002F8.troubleshooting",{"title":188,"path":189,"stem":190,"icon":23},"The config file","\u002Fdocs\u002Fself-hosting\u002Fconfig-file","docs\u002F6.self-hosting\u002F9.config-file",{"title":192,"icon":193,"path":194,"stem":195,"children":196,"page":36},"Reference","book","\u002Fdocs\u002Freference","docs\u002F7.reference",[197,201,205,209,213],{"title":198,"path":199,"stem":200,"icon":23},"Environment variables","\u002Fdocs\u002Freference\u002Fenvironment","docs\u002F7.reference\u002F1.environment",{"title":202,"path":203,"stem":204,"icon":23},"Worker roles","\u002Fdocs\u002Freference\u002Fworker-roles","docs\u002F7.reference\u002F2.worker-roles",{"title":206,"path":207,"stem":208,"icon":23},"API","\u002Fdocs\u002Freference\u002Fapi","docs\u002F7.reference\u002F3.api",{"title":210,"path":211,"stem":212,"icon":23},"Keyboard shortcuts","\u002Fdocs\u002Freference\u002Fkeyboard-shortcuts","docs\u002F7.reference\u002F4.keyboard-shortcuts",{"title":214,"path":215,"stem":216,"icon":23},"Models","\u002Fdocs\u002Freference\u002Fmodels","docs\u002F7.reference\u002F5.models",{"title":218,"icon":219,"path":220,"stem":221,"children":222,"page":36},"Hubstruct Cloud","cloud","\u002Fdocs\u002Fcloud","docs\u002F8.cloud",[223,227,231],{"title":224,"path":225,"stem":226,"icon":23},"Getting started with the cloud","\u002Fdocs\u002Fcloud\u002Fgetting-started","docs\u002F8.cloud\u002F1.getting-started",{"title":228,"path":229,"stem":230,"icon":23},"Plans and billing","\u002Fdocs\u002Fcloud\u002Fplans-and-billing","docs\u002F8.cloud\u002F2.plans-and-billing",{"title":232,"path":233,"stem":234,"icon":23},"Moving between cloud and self-hosted","\u002Fdocs\u002Fcloud\u002Fmoving","docs\u002F8.cloud\u002F3.moving",{"id":236,"title":62,"body":237,"description":652,"extension":653,"eyebrow":147,"icon":23,"meta":654,"navigation":655,"path":165,"seo":656,"stem":166,"__hash__":657},"docs\u002Fdocs\u002F6.self-hosting\u002F3.storage.md",{"type":238,"value":239,"toc":645},"minimark",[240,266,271,282,322,328,338,359,369,373,378,440,447,457,461,464,467,602,605,609,630,634,641],[241,242,243,244,248,249,253,254,258,259,265],"p",{},"Hubstruct keeps files in ",[245,246,247],"strong",{},"S3-compatible object storage",": the originals and renditions of ",[250,251,252],"a",{"href":63},"libraries",", and the pictures it makes itself, such as album, tag and person mosaics. Self-hosted, that's the ",[255,256,257],"code",{},"storage"," service: ",[250,260,264],{"href":261,"rel":262},"https:\u002F\u002Fgaragehq.deuxfleurs.fr",[263],"nofollow","Garage",", a small, single-node object store.",[267,268,270],"h2",{"id":269},"where-the-files-are","Where the files are",[241,272,273,274,277,278,281],{},"Garage keeps two folders on the host, under ",[255,275,276],{},"MEDIA_DIR"," (",[255,279,280],{},".\u002Fdata"," by default, next to the Compose file):",[283,284,285,298],"table",{},[286,287,288],"thead",{},[289,290,291,295],"tr",{},[292,293,294],"th",{},"Folder",[292,296,297],{},"Holds",[299,300,301,312],"tbody",{},[289,302,303,309],{},[304,305,306],"td",{},[255,307,308],{},"${MEDIA_DIR}\u002Fstorage\u002Fmeta",[304,310,311],{},"Garage's metadata: which objects exist and where their blocks are",[289,313,314,319],{},[304,315,316],{},[255,317,318],{},"${MEDIA_DIR}\u002Fstorage\u002Fdata",[304,320,321],{},"The blocks: your files' bytes, split and deduplicated",[241,323,324,327],{},[245,325,326],{},"Both are needed."," The data folder is unreadable without the metadata. And because Garage stores files in its own block format, the data folder holds your media's bytes but not browsable photos.",[241,329,330,331,333,334,337],{},"To keep media on a big disk, set ",[255,332,276],{}," in ",[255,335,336],{},".env",":",[339,340,345],"pre",{"className":341,"code":342,"filename":336,"language":343,"meta":344,"style":344},"language-ini shiki shiki-themes github-dark github-light","MEDIA_DIR=\u002Fmnt\u002Fmedia\u002Fhubstruct\n","ini","",[255,346,347],{"__ignoreMap":344},[348,349,352,355],"span",{"class":350,"line":351},"line",1,[348,353,276],{"class":354},"spKkM",[348,356,358],{"class":357},"shWlK","=\u002Fmnt\u002Fmedia\u002Fhubstruct\n",[241,360,361,362,365,366,368],{},"Put ",[255,363,364],{},"meta"," on fast storage if you can, since it's small and read constantly. To do so, edit the two volume lines of the ",[255,367,257],{}," service in the Compose file.",[267,370,372],{"id":371},"its-keys","Its keys",[241,374,375,376,337],{},"Garage makes its bucket and access key on its first start, from ",[255,377,336],{},[283,379,380,390],{},[286,381,382],{},[289,383,384,387],{},[292,385,386],{},"Variable",[292,388,389],{},"Means",[299,391,392,402,416,426],{},[289,393,394,399],{},[304,395,396],{},[255,397,398],{},"S3_RPC_SECRET",[304,400,401],{},"Garage's internal secret: 64 hex characters",[289,403,404,409],{},[304,405,406],{},[255,407,408],{},"S3_ACCESS_KEY",[304,410,411,412,415],{},"The access key: ",[255,413,414],{},"GK"," and 24 hex characters",[289,417,418,423],{},[304,419,420],{},[255,421,422],{},"S3_SECRET_KEY",[304,424,425],{},"The secret key: 64 hex characters",[289,427,428,433],{},[304,429,430],{},[255,431,432],{},"S3_BUCKET",[304,434,435,436,439],{},"The bucket's name: ",[255,437,438],{},"hubstruct"," by default",[241,441,442,443,446],{},"The API and the worker use these to reach storage at ",[255,444,445],{},"http:\u002F\u002Fstorage:3900",". Storage isn't published on the host: only Hubstruct's services can reach it.",[448,449,451],"callout",{"type":450},"warning",[241,452,453,454,456],{},"Don't change the keys after the first start. Garage made its key from them; changing ",[255,455,336],{}," alone would lock Hubstruct out of its own storage.",[267,458,460],{"id":459},"getting-files-out","Getting files out",[241,462,463],{},"One at a time: open a media's original full size from its page, and save it from your browser.",[241,465,466],{},"In bulk, use any S3 client against Garage, from a container on the same network. For example, with the AWS CLI:",[339,468,472],{"className":469,"code":470,"language":471,"meta":344,"style":344},"language-bash shiki shiki-themes github-dark github-light","docker run --rm -it --network hubstruct_default \\\n  -e AWS_ACCESS_KEY_ID=\"$S3_ACCESS_KEY\" \\\n  -e AWS_SECRET_ACCESS_KEY=\"$S3_SECRET_KEY\" \\\n  -v \"$PWD\u002Fexport:\u002Fexport\" \\\n  amazon\u002Faws-cli --endpoint-url http:\u002F\u002Fstorage:3900 --region garage \\\n  s3 sync s3:\u002F\u002Fhubstruct\u002Flibraries\u002F\u003Clibrary id>\u002Foriginals \u002Fexport\n","bash",[255,473,474,500,517,532,549,569],{"__ignoreMap":344},[348,475,476,480,484,488,491,494,497],{"class":350,"line":351},[348,477,479],{"class":478},"sqoU-","docker",[348,481,483],{"class":482},"skb7c"," run",[348,485,487],{"class":486},"sTU5a"," --rm",[348,489,490],{"class":486}," -it",[348,492,493],{"class":486}," --network",[348,495,496],{"class":482}," hubstruct_default",[348,498,499],{"class":486}," \\\n",[348,501,503,506,509,512,515],{"class":350,"line":502},2,[348,504,505],{"class":486},"  -e",[348,507,508],{"class":482}," AWS_ACCESS_KEY_ID=\"",[348,510,511],{"class":357},"$S3_ACCESS_KEY",[348,513,514],{"class":482},"\"",[348,516,499],{"class":486},[348,518,520,522,525,528,530],{"class":350,"line":519},3,[348,521,505],{"class":486},[348,523,524],{"class":482}," AWS_SECRET_ACCESS_KEY=\"",[348,526,527],{"class":357},"$S3_SECRET_KEY",[348,529,514],{"class":482},[348,531,499],{"class":486},[348,533,535,538,541,544,547],{"class":350,"line":534},4,[348,536,537],{"class":486},"  -v",[348,539,540],{"class":482}," \"",[348,542,543],{"class":357},"$PWD",[348,545,546],{"class":482},"\u002Fexport:\u002Fexport\"",[348,548,499],{"class":486},[348,550,552,555,558,561,564,567],{"class":350,"line":551},5,[348,553,554],{"class":482},"  amazon\u002Faws-cli",[348,556,557],{"class":486}," --endpoint-url",[348,559,560],{"class":482}," http:\u002F\u002Fstorage:3900",[348,562,563],{"class":486}," --region",[348,565,566],{"class":482}," garage",[348,568,499],{"class":486},[348,570,572,575,578,581,584,587,590,593,596,599],{"class":350,"line":571},6,[348,573,574],{"class":482},"  s3",[348,576,577],{"class":482}," sync",[348,579,580],{"class":482}," s3:\u002F\u002Fhubstruct\u002Flibraries\u002F",[348,582,583],{"class":354},"\u003C",[348,585,586],{"class":482},"library",[348,588,589],{"class":482}," i",[348,591,592],{"class":357},"d",[348,594,595],{"class":354},">",[348,597,598],{"class":482},"\u002Foriginals",[348,600,601],{"class":482}," \u002Fexport\n",[241,603,604],{},"Originals are stored under the media's id, without the file name. The file names are in the database, and in the API's media listing.",[267,606,608],{"id":607},"using-other-s3-storage","Using other S3 storage",[241,610,611,612,614,615,618,619,618,622,618,624,626,627,629],{},"Hubstruct speaks plain S3, so it can use other S3-compatible storage, such as MinIO, Cloudflare R2, Backblaze B2 or AWS S3, instead of Garage. Remove the ",[255,613,257],{}," service, and set the API's and worker's ",[255,616,617],{},"S3_ENDPOINT",", ",[255,620,621],{},"S3_REGION",[255,623,432],{},[255,625,408],{}," and ",[255,628,422],{}," to your provider's. The bucket must exist, and the key must be able to read, write, list and delete in it.",[267,631,633],{"id":632},"backing-it-up","Backing it up",[241,635,636,637,640],{},"See ",[250,638,168],{"href":639},"\u002Fdocs\u002Fself-hosting\u002Fbackups#storage",".",[642,643,644],"style",{},"html pre.shiki code .spKkM, html code.shiki .spKkM{--shiki-default:#F97583;--shiki-light:#D73A49}html pre.shiki code .shWlK, html code.shiki .shWlK{--shiki-default:#E1E4E8;--shiki-light:#24292E}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 .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 pre.shiki code .sqoU-, html code.shiki .sqoU-{--shiki-default:#B392F0;--shiki-light:#6F42C1}html pre.shiki code .skb7c, html code.shiki .skb7c{--shiki-default:#9ECBFF;--shiki-light:#032F62}html pre.shiki code .sTU5a, html code.shiki .sTU5a{--shiki-default:#79B8FF;--shiki-light:#005CC5}",{"title":344,"searchDepth":519,"depth":519,"links":646},[647,648,649,650,651],{"id":269,"depth":502,"text":270},{"id":371,"depth":502,"text":372},{"id":459,"depth":502,"text":460},{"id":607,"depth":502,"text":608},{"id":632,"depth":502,"text":633},"The storage service (Garage), where its files live on the host, its keys, and getting files out of it.","md",{},true,{"title":62,"description":652},"D0AiC5WanBWMdzpu3JwE5THA0dUx9vV9gQ6U0Xbb-9I",[659,661],{"title":161,"path":162,"stem":163,"description":660,"children":-1},"How the models server and the vision service share a GPU, what fits on a 12 GB card, and running on bigger or several cards.",{"title":168,"path":169,"stem":170,"description":662,"children":-1},"What to back up, how to dump the database and copy storage safely, how to restore, and a script to run nightly.",1795744073310]