[{"data":1,"prerenderedAt":640},["ShallowReactive",2],{"docs-navigation":3,"docs:\u002Fdocs\u002Fgetting-started\u002Frequirements":235,"docs-surround:\u002Fdocs\u002Fgetting-started\u002Frequirements":635},[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":25,"body":237,"description":629,"extension":630,"eyebrow":14,"icon":23,"meta":631,"navigation":632,"path":26,"seo":633,"stem":27,"__hash__":634},"docs\u002Fdocs\u002F1.getting-started\u002F2.requirements.md",{"type":238,"value":239,"toc":613},"minimark",[240,244,249,350,354,361,453,460,472,477,485,488,491,494,497,522,532,535,549,553,589,593,596,600,610],[241,242,243],"p",{},"Hubstruct runs as a set of Docker containers. Most of them are light; the AI models are what need real hardware, and the GPU most of all. This page covers what to have, and what each part of Hubstruct does with it.",[245,246,248],"h2",{"id":247},"in-short","In short",[250,251,252,267],"table",{},[253,254,255],"thead",{},[256,257,258,261,264],"tr",{},[259,260],"th",{},[259,262,263],{},"Minimum",[259,265,266],{},"Recommended",[268,269,270,285,298,311,324,337],"tbody",{},[256,271,272,279,282],{},[273,274,275],"td",{},[276,277,278],"strong",{},"Operating system",[273,280,281],{},"Linux with Docker, or Windows 11 with WSL 2",[273,283,284],{},"Linux (Ubuntu 24.04 or Debian 12)",[256,286,287,292,295],{},[273,288,289],{},[276,290,291],{},"CPU",[273,293,294],{},"4 cores",[273,296,297],{},"8 or more cores",[256,299,300,305,308],{},[273,301,302],{},[276,303,304],{},"Memory",[273,306,307],{},"16 GB",[273,309,310],{},"32 GB",[256,312,313,318,321],{},[273,314,315],{},[276,316,317],{},"GPU",[273,319,320],{},"None (the AI steps wait)",[273,322,323],{},"NVIDIA, 12 GB of video memory",[256,325,326,331,334],{},[273,327,328],{},[276,329,330],{},"Disk",[273,332,333],{},"40 GB plus your media",[273,335,336],{},"An SSD for the database and models",[256,338,339,344,347],{},[273,340,341],{},[276,342,343],{},"Docker",[273,345,346],{},"Docker Engine 24 and Compose v2",[273,348,349],{},"The latest of both",[245,351,353],{"id":352},"the-gpu","The GPU",[241,355,356,357,360],{},"The AI steps run on an NVIDIA GPU through the NVIDIA Container Toolkit. Hubstruct is tuned for a card with ",[276,358,359],{},"12 GB of video memory",", such as an RTX 4070 or 3060 12 GB, and fits its models into that:",[250,362,363,379],{},[253,364,365],{},[256,366,367,370,373,376],{},[259,368,369],{},"Model",[259,371,372],{},"Runs in",[259,374,375],{},"Used for",[259,377,378],{},"Video memory",[268,380,381,401,418,435],{},[256,382,383,389,395,398],{},[273,384,385,388],{},[276,386,387],{},"Gemma 4"," (e2b, or e4b)",[273,390,391],{},[392,393,394],"code",{},"models",[273,396,397],{},"Descriptions, titles, reading text in pictures",[273,399,400],{},"About 4 GB (e4b: 7 GB)",[256,402,403,408,412,415],{},[273,404,405],{},[276,406,407],{},"EmbeddingGemma 2",[273,409,410],{},[392,411,394],{},[273,413,414],{},"The search embeddings of text and pictures",[273,416,417],{},"About 2 GB",[256,419,420,425,429,432],{},[273,421,422],{},[276,423,424],{},"d1 2B",[273,426,427],{},[392,428,394],{},[273,430,431],{},"Smart tags and NSFW scores",[273,433,434],{},"About 3.3 GB",[256,436,437,442,447,450],{},[273,438,439],{},[276,440,441],{},"Face and text detectors",[273,443,444],{},[392,445,446],{},"vision",[273,448,449],{},"Faces (real and drawn), where text is",[273,451,452],{},"Up to 768 MB per model",[241,454,455,456,459],{},"The models server starts each model when a step needs it and makes room by stopping an idle one, so there's nothing to switch by hand. With Gemma 4 e2b, all of them fit on a 12 GB card at once; with e4b, it takes turns with d1. ",[457,458,161],"a",{"href":162}," explains more.",[461,462,465],"callout",{"title":463,"type":464},"AMD and Apple GPUs","info",[241,466,467,468,471],{},"The bundled Compose file asks Docker for NVIDIA GPUs. llama.cpp itself also runs on AMD (Vulkan, ROCm) and Apple Silicon, so you can run the models server outside Docker and point Hubstruct at it (",[392,469,470],{},"MODELS_URL","), but the vision service needs CUDA today.",[473,474,476],"h3",{"id":475},"without-a-gpu","Without a GPU",[241,478,479,480,484],{},"Hubstruct still runs without one. Uploading, browsing, albums by hand, duplicates and everything that doesn't need a model work normally. The steps that need a model show as ",[481,482,483],"em",{},"waiting"," on the dashboard and run when a model server becomes reachable. The models server can run on the CPU too (llama-swap's CPU image), but we haven't measured how slow that is yet.",[245,486,304],{"id":487},"memory",[241,489,490],{},"PostgreSQL, the worker and the API together use 2 to 4 GB in normal use. The rest is for the models when they're loaded on the CPU side, and for your operating system's disk cache, which makes a large database noticeably faster. 16 GB works; 32 GB is comfortable for libraries over 100,000 items.",[245,492,330],{"id":493},"disk",[241,495,496],{},"Plan for three things:",[498,499,500,510,516],"ul",{},[501,502,503,506,507,509],"li",{},[276,504,505],{},"The models",", about 20 GB, in the ",[392,508,394],{}," volume: Gemma, EmbeddingGemma and d1.",[501,511,512,515],{},[276,513,514],{},"The database",", roughly 1 GB per 10,000 media. Embeddings and face data are most of it. An SSD makes searching and the album rules faster.",[501,517,518,521],{},[276,519,520],{},"Your media",". Uploads are kept as they are, with a thumbnail and a preview beside each.",[241,523,524,525,528,529,531],{},"S3 storage lives in a folder on the host (",[392,526,527],{},".\u002Fdata\u002Fstorage"," by default), which you can put on a large, slower disk. See ",[457,530,62],{"href":165},".",[245,533,291],{"id":534},"cpu",[241,536,537,538,541,542,545,546,548],{},"Several steps run on the CPU, with no model: reading file details, making thumbnails, measuring colors and sharpness, and the duplicate check. Each service has a CPU limit (",[392,539,540],{},"WORKER_CPUS",", ",[392,543,544],{},"POSTGRES_CPUS"," and so on) so a busy one never makes the machine unusable. The defaults suit an 8 to 16 core machine; ",[457,547,176],{"href":177}," explains how to tune them.",[245,550,552],{"id":551},"software","Software",[498,554,555,573,583],{},[501,556,557,560,561,564,565,568,569,572],{},[276,558,559],{},"Docker Engine 24+"," with ",[276,562,563],{},"Compose v2"," (",[392,566,567],{},"docker compose",", not ",[392,570,571],{},"docker-compose",").",[501,574,575,578,579,582],{},[276,576,577],{},"NVIDIA driver"," 550 or newer, and the ",[276,580,581],{},"NVIDIA Container Toolkit",", for the GPU.",[501,584,585,588],{},[276,586,587],{},"A modern browser",": a current Chrome, Edge, Firefox or Safari. The app can be installed as an app on desktop and mobile.",[473,590,592],{"id":591},"windows","Windows",[241,594,595],{},"Hubstruct runs on Windows 11 through Docker Desktop with the WSL 2 backend. GPU access works through WSL with a current NVIDIA driver. Keep the S3 storage folder inside the WSL filesystem, or on a fast local disk: folders shared from Windows into containers are much slower.",[245,597,599],{"id":598},"the-network","The network",[241,601,602,603,606,607,609],{},"Only the app needs to be reachable from your browser, on port ",[276,604,605],{},"4173"," by default. The other services talk to each other on Compose's private network. A few are also published on the machine itself for convenience, such as the API on 3000 and the database on 5432; you can remove those ports if you don't use them. See ",[457,608,180],{"href":181}," to put Hubstruct behind a reverse proxy.",[241,611,612],{},"Outgoing, Hubstruct needs the internet only to download the images and models on first start, and to reach Google if you use Google sign-in.",{"title":614,"searchDepth":615,"depth":615,"links":616},"",3,[617,619,622,623,624,625,628],{"id":247,"depth":618,"text":248},2,{"id":352,"depth":618,"text":353,"children":620},[621],{"id":475,"depth":615,"text":476},{"id":487,"depth":618,"text":304},{"id":493,"depth":618,"text":330},{"id":534,"depth":618,"text":291},{"id":551,"depth":618,"text":552,"children":626},[627],{"id":591,"depth":615,"text":592},{"id":598,"depth":618,"text":599},"The hardware and software Hubstruct needs, what each part uses, and what happens when you have less.","md",{},true,{"title":25,"description":629},"53mHpdWIjMZgSAs-z6uxMqtp5jpFKlkaE0Xi5XIA_aA",[636,638],{"title":20,"path":21,"stem":22,"description":637,"children":-1},"What Hubstruct is, what it does with your photos and videos, and how the pieces fit together.",{"title":29,"path":30,"stem":31,"description":639,"children":-1},"Install Hubstruct with Docker Compose, start it, and open it for the first time.",1795744072891]