[{"data":1,"prerenderedAt":487},["ShallowReactive",2],{"docs-navigation":3,"docs:\u002Fdocs\u002Fself-hosting\u002Freverse-proxy":235,"docs-surround:\u002Fdocs\u002Fself-hosting\u002Freverse-proxy":482},[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":180,"body":237,"description":476,"extension":477,"eyebrow":147,"icon":23,"meta":478,"navigation":479,"path":181,"seo":480,"stem":182,"__hash__":481},"docs\u002Fdocs\u002F6.self-hosting\u002F7.reverse-proxy.md",{"type":238,"value":239,"toc":468},"minimark",[240,254,259,298,302,305,316,319,326,330,337,375,382,411,419,423,434,438,445,461,464],[241,242,243,244,248,249,253],"p",{},"To reach Hubstruct from outside your home network, or just at a nice address with HTTPS, put a ",[245,246,247],"strong",{},"reverse proxy"," in front of the app. Only the ",[250,251,252],"code",{},"console"," service needs to be behind it: the app passes the browser's API calls on to the API itself.",[255,256,258],"h2",{"id":257},"what-the-proxy-must-allow","What the proxy must allow",[260,261,262,273,279,285],"ul",{},[263,264,265,268,269,272],"li",{},[245,266,267],{},"Long-lived responses."," The live stream (",[250,270,271],{},"\u002Fapi\u002Fevents",") stays open for as long as a page is, sending a ping every so often. The proxy must not buffer it or time it out quickly.",[263,274,275,278],{},[245,276,277],{},"Large uploads."," Uploads are streamed as the request body; a proxy's default body limit (1 MB in nginx) would refuse most videos.",[263,280,281,284],{},[245,282,283],{},"Range requests",", so videos can seek. Proxies pass these through by default.",[263,286,287,293,294,297],{},[245,288,289,290],{},"The original ",[250,291,292],{},"Host",", and ",[250,295,296],{},"X-Forwarded-Proto: https",", so links and Google's redirect address are built correctly.",[255,299,301],{"id":300},"caddy","Caddy",[241,303,304],{},"Caddy gets and renews certificates by itself, and handles streaming responses without extra settings:",[306,307,314],"pre",{"className":308,"code":310,"filename":311,"language":312,"meta":313},[309],"language-text","photos.example.com {\n  reverse_proxy localhost:4173\n  request_body {\n    max_size 10GB\n  }\n}\n","Caddyfile","text","",[250,315,310],{"__ignoreMap":313},[255,317,318],{"id":318},"nginx",[306,320,324],{"className":321,"code":322,"filename":323,"language":312,"meta":313},[309],"server {\n  listen 443 ssl http2;\n  server_name photos.example.com;\n\n  ssl_certificate     \u002Fetc\u002Fletsencrypt\u002Flive\u002Fphotos.example.com\u002Ffullchain.pem;\n  ssl_certificate_key \u002Fetc\u002Fletsencrypt\u002Flive\u002Fphotos.example.com\u002Fprivkey.pem;\n\n  client_max_body_size 10G;\n\n  location \u002F {\n    proxy_pass http:\u002F\u002F127.0.0.1:4173;\n    proxy_http_version 1.1;\n    proxy_set_header Host $host;\n    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n    proxy_set_header X-Forwarded-Proto $scheme;\n\n    # The live stream and uploads: no buffering, long timeouts.\n    proxy_buffering off;\n    proxy_request_buffering off;\n    proxy_read_timeout 1h;\n  }\n}\n","hubstruct.conf",[250,325,322],{"__ignoreMap":313},[255,327,329],{"id":328},"keep-the-other-ports-private","Keep the other ports private",[241,331,332,333,336],{},"Once the proxy is in place, publish the app only on ",[250,334,335],{},"127.0.0.1"," so it can't be reached around the proxy, and remove the other published ports you don't use. In the Compose file:",[306,338,342],{"className":339,"code":340,"language":341,"meta":313,"style":313},"language-yaml shiki shiki-themes github-dark github-light","  console:\n    ports:\n      - \"127.0.0.1:4173:3000\"\n","yaml",[250,343,344,357,365],{"__ignoreMap":313},[345,346,349,353],"span",{"class":347,"line":348},"line",1,[345,350,352],{"class":351},"shQVT","  console",[345,354,356],{"class":355},"shWlK",":\n",[345,358,360,363],{"class":347,"line":359},2,[345,361,362],{"class":351},"    ports",[345,364,356],{"class":355},[345,366,368,371],{"class":347,"line":367},3,[345,369,370],{"class":355},"      - ",[345,372,374],{"class":373},"skb7c","\"127.0.0.1:4173:3000\"\n",[241,376,377,378,381],{},"Then tell the app it's behind a proxy, so it takes each browser's address from the ",[250,379,380],{},"X-Forwarded-For"," header the proxy adds, rather than the proxy's own (sign-in attempts are limited per address):",[306,383,385],{"className":339,"code":384,"language":341,"meta":313,"style":313},"  console:\n    environment:\n      NUXT_TRUST_PROXY: \"true\"\n",[250,386,387,393,400],{"__ignoreMap":313},[345,388,389,391],{"class":347,"line":348},[345,390,352],{"class":351},[345,392,356],{"class":355},[345,394,395,398],{"class":347,"line":359},[345,396,397],{"class":351},"    environment",[345,399,356],{"class":355},[345,401,402,405,408],{"class":347,"line":367},[345,403,404],{"class":351},"      NUXT_TRUST_PROXY",[345,406,407],{"class":355},": ",[345,409,410],{"class":373},"\"true\"\n",[241,412,413,414,418],{},"See ",[415,416,153],"a",{"href":417},"\u002Fdocs\u002Fself-hosting\u002Farchitecture#which-ports-need-to-be-open"," for what each port is for.",[255,420,422],{"id":421},"google-sign-in-at-the-new-address","Google sign-in at the new address",[241,424,425,426,429,430,433],{},"If you use Google sign-in, its redirect address changes with the domain. Add the new redirect URI, shown in ",[245,427,428],{},"Settings → Sign-in"," at the new address, to your OAuth client in Google Cloud. See ",[415,431,135],{"href":432},"\u002Fdocs\u002Fadministration\u002Fusers-and-sign-in#signing-in-with-google",".",[255,435,437],{"id":436},"calling-the-api-from-another-site","Calling the API from another site",[241,439,440,441,444],{},"Pages served from another origin that call Hubstruct's API with a session cookie need to be allowed, for CORS and the API's cross-site request check. List their origins, comma-separated, in ",[250,442,443],{},"APP_ORIGINS",":",[306,446,451],{"className":447,"code":448,"filename":449,"language":450,"meta":313,"style":313},"language-ini shiki shiki-themes github-dark github-light","APP_ORIGINS=https:\u002F\u002Fdashboard.example.com\n",".env","ini",[250,452,453],{"__ignoreMap":313},[345,454,455,458],{"class":347,"line":348},[345,456,443],{"class":457},"spKkM",[345,459,460],{"class":355},"=https:\u002F\u002Fdashboard.example.com\n",[241,462,463],{},"Scripts using an API key don't need this, nor does the app itself.",[465,466,467],"style",{},"html pre.shiki code .shQVT, html code.shiki .shQVT{--shiki-default:#85E89D;--shiki-light:#22863A}html pre.shiki code .shWlK, html code.shiki .shWlK{--shiki-default:#E1E4E8;--shiki-light:#24292E}html pre.shiki code .skb7c, html code.shiki .skb7c{--shiki-default:#9ECBFF;--shiki-light:#032F62}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 .spKkM, html code.shiki .spKkM{--shiki-default:#F97583;--shiki-light:#D73A49}",{"title":313,"searchDepth":367,"depth":367,"links":469},[470,471,472,473,474,475],{"id":257,"depth":359,"text":258},{"id":300,"depth":359,"text":301},{"id":318,"depth":359,"text":318},{"id":328,"depth":359,"text":329},{"id":421,"depth":359,"text":422},{"id":436,"depth":359,"text":437},"Putting Hubstruct behind a reverse proxy with HTTPS, with examples for Caddy and nginx, and what the proxy must allow.","md",{},true,{"title":180,"description":476},"HBgRFQhMfQud_I_H0FVP9mi--3rTZKSba30J-NISR2c",[483,485],{"title":176,"path":177,"stem":178,"description":484,"children":-1},"Splitting the worker across containers with worker roles, CPU limits, and what to tune for large libraries.",{"title":184,"path":185,"stem":186,"description":486,"children":-1},"What to check when something isn't working, from services that won't start to steps that never finish.",1795744073353]