{"id":489,"date":"2026-09-23T08:30:00","date_gmt":"2026-09-23T06:30:00","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/?p=489"},"modified":"2026-09-10T10:52:40","modified_gmt":"2026-09-10T08:52:40","slug":"self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy","status":"publish","type":"post","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/","title":{"rendered":"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy"},"content":{"rendered":"\r\n<p class=\"wp-block-paragraph\">Sending proprietary corporate documents, customer records, and source code to public Large Language Model (LLM) APIs such as OpenAI, Anthropic, or Google Gemini creates severe data sovereignty risks and potential GDPR violations. Hosting open-weight LLMs\u2014such as Llama 3.1, Mistral, or CodeLlama\u2014on internal enterprise hardware guarantees complete data isolation. However, because the popular inference server Ollama exposes its REST API on port <code>11434<\/code> without native authentication, deploying it safely inside an enterprise network requires an architectural wrapper: an Nginx reverse proxy enforcing strict API token authentication and TLS encryption.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">1. Architectural Framework: Secure Edge Inference Pipeline<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">An enterprise-grade local LLM deployment decouples model execution from network exposure by layering three isolated services within a containerized environment:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>Ollama Inference Backend:<\/strong> Executes open-weight LLM weights using NVIDIA GPU acceleration (via NVIDIA Container Toolkit) or high-thread CPU quantization, bound strictly to internal container network interfaces.<\/li>\r\n<li><strong>Nginx Authentication &amp; TLS Reverse Proxy:<\/strong> Acts as the single entry point, intercepting all HTTP requests, terminating SSL\/TLS encryption, and validating secret Bearer tokens or HTTP Basic Authentication credentials before proxying requests to Ollama.<\/li>\r\n<li><strong>OpenAI-Compatible Frontend \/ Scripts:<\/strong> Internal web UIs (such as Open WebUI) or automated Python scripts interact with the secured endpoint using standard OpenAI SDK syntaxes without ever bypassing the proxy security layer.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<figure class=\"lw-diagram\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/diagrams\/hand-ollama-en.png\" width=\"1120\" height=\"580\" alt=\"Perimeter diagram: only port 8443 of the nginx auth proxy is published, while the Ollama backend on 11434 stays inside the Docker bridge network\">\n<figcaption>The inference backend never touches the outside world. Only the proxy is published, and it answers nothing without authentication \u2014 which is what turns a local model into an internal service.<\/figcaption>\n<\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">2. Step-by-Step Container &amp; GPU Provisioning<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">To launch Ollama alongside a dedicated Nginx reverse proxy, deploy the following production-ready <code>docker-compose.yml<\/code> file configured for GPU passthrough and isolated networking:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code class=\"language-yaml\">services:\n  ollama:\n    image: ollama\/ollama:latest\n    container_name: enterprise_ollama\n    restart: always\n    environment:\n      - OLLAMA_HOST=0.0.0.0\n      - OLLAMA_ORIGINS=*\n    volumes:\n      - .\/ollama_data:\/root\/.ollama\n    deploy:\n      resources:\n        reservations:\n          devices:\n            - driver: nvidia\n              count: all\n              capabilities: [gpu]\n    networks:\n      - llm_internal\n\n  auth_proxy:\n    image: nginx:alpine\n    container_name: ollama_auth_proxy\n    restart: always\n    ports:\n      - \"8443:443\"\n    volumes:\n      - .\/nginx.conf:\/etc\/nginx\/nginx.conf:ro\n      - .\/certs:\/etc\/nginx\/certs:ro\n      - .\/htpasswd:\/etc\/nginx\/.htpasswd:ro\n    depends_on:\n      - ollama\n    networks:\n      - llm_internal\n\nnetworks:\n  llm_internal:\n    driver: bridge<\/code><\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">3. Step-by-Step Nginx Auth Proxy Configuration<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">To restrict API access exclusively to authorized enterprise applications, configure Nginx to require HTTP Basic Authentication or API token validation. The following <code>nginx.conf<\/code> script enforces authentication and manages streaming timeouts for large LLM inference responses:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code class=\"language-nginx\">events {\n    worker_connections 1024;\n}\n\nhttp {\n    upstream ollama_backend {\n        server ollama:11434;\n    }\n\n    server {\n        listen 443 ssl;\n        server_name llm.internal.domain;\n\n        ssl_certificate \/etc\/nginx\/certs\/server.crt;\n        ssl_certificate_key \/etc\/nginx\/certs\/server.key;\n        ssl_protocols TLSv1.2 TLSv1.3;\n\n        # Enforcing HTTP Basic Auth (Generate via: htpasswd -c .\/htpasswd api_user)\n        auth_basic \"Enterprise LLM Secure Gateway\";\n        auth_basic_user_file \/etc\/nginx\/.htpasswd;\n\n        # Mandatory timeout extensions for long-running streaming inference\n        proxy_read_timeout 600s;\n        proxy_connect_timeout 600s;\n        proxy_send_timeout 600s;\n\n        location \/ {\n            proxy_pass http:\/\/ollama_backend;\n            proxy_set_header Host $host;\n            proxy_set_header X-Real-IP $remote_addr;\n            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n            proxy_set_header X-Forwarded-Proto $scheme;\n            \n            # Streaming support for Server-Sent Events (SSE)\n            proxy_buffering off;\n            proxy_cache off;\n        }\n    }\n}<\/code><\/pre>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">4. Step-by-Step Script &amp; Web UI Verification<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">Once the proxy is active, the inference engine can be queried safely via standard scripts or integrated into chat UIs:<\/p>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li><strong>Downloading Models:<\/strong> Execute the initial model pull inside the container via Docker command-line execution:\r\n    <br><code>docker exec -it enterprise_ollama ollama run llama3.1<\/code>\r\n<\/li>\r\n<li><strong>Python API Verification:<\/strong> Send an authenticated HTTPS REST request to the proxy using HTTP Basic credentials or authorization headers:\r\n    <br><code>curl -k -u \"api_user:SecretPassword123\" https:\/\/localhost:8443\/api\/generate -d '{\"model\": \"llama3.1\", \"prompt\": \"Summarize the company privacy policy.\", \"stream\": false}'<\/code>\r\n<\/li>\r\n<li><strong>Connecting Open WebUI:<\/strong> Deploy the <code>open-webui<\/code> Docker container on the same network and assign the endpoint environment variable:\r\n    <br><code>OLLAMA_BASE_URL=https:\/\/api_user:SecretPassword123@auth_proxy:443<\/code>\r\n<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">5. Summary &amp; Architectural Value<\/h2>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><strong>What this tutorial achieves:<\/strong> The deployment of a self-hosted, GPU-accelerated open-weight Large Language Model server using Ollama, shielded by an Nginx authentication and SSL\/TLS reverse proxy pipeline.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\"><strong>Resulting value:<\/strong> A private, high-performance &#8220;ChatGPT&#8221;-equivalent is established for corporate workflows, internal software scripts, and employee web UIs without any data leakage to external commercial AI APIs. Complete data sovereignty and GDPR compliance are guaranteed, while mandatory authentication headers prevent unauthorized network access to the inference compute resources.<\/p>\r\n\n\n<div class=\"lw-quellen\">\n<h2>Sources<\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/ollama\/ollama\/blob\/main\/README.md\" target=\"_blank\" rel=\"noopener noreferrer\">Ollama documentation<\/a><\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>A technical step-by-step tutorial on deploying a private, GPU-accelerated LLM server using Ollama secured behind an Nginx authentication proxy.<\/p>\n","protected":false},"author":1,"featured_media":14049,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92636],"tags":[91380,91113,91064,91404,91237,91099,91219,91115],"class_list":["post-489","post","type-post","status-publish","format-standard","hentry","category-tutorials-en-cloud-ai","tag-artificial-intelligence","tag-homelab","tag-linux","tag-llm","tag-self-hosting","tag-server-administration","tag-tutorial","tag-web-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy - Lukas Wojcik - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"A technical step-by-step tutorial on deploying a private, GPU-accelerated LLM server using Ollama secured behind an Nginx authentication proxy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-23T06:30:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-489-self-hosted-large-language-model-llm-g.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Lukas Wojcik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Lukas Wojcik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/\"},\"author\":{\"name\":\"Lukas Wojcik\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"headline\":\"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy\",\"datePublished\":\"2026-09-23T06:30:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/\"},\"wordCount\":472,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-489-self-hosted-large-language-model-llm-g.png\",\"keywords\":[\"Artificial Intelligence\",\"Homelab\",\"Linux\",\"LLM\",\"Self-Hosting\",\"Server Administration\",\"Tutorial\",\"Web Security\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/\",\"name\":\"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-489-self-hosted-large-language-model-llm-g.png\",\"datePublished\":\"2026-09-23T06:30:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-489-self-hosted-large-language-model-llm-g.png\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/hero-489-self-hosted-large-language-model-llm-g.png\",\"width\":1200,\"height\":630,\"caption\":\"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/cloud-ai\\\/tutorials-en-cloud-ai\\\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"Lukas Wojcik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"Lukas Wojcik\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy - Lukas Wojcik - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/","og_locale":"en_US","og_type":"article","og_title":"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy - Lukas Wojcik - Blog","og_description":"A technical step-by-step tutorial on deploying a private, GPU-accelerated LLM server using Ollama secured behind an Nginx authentication proxy.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/","og_site_name":"Lukas Wojcik - Blog","article_published_time":"2026-09-23T06:30:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-489-self-hosted-large-language-model-llm-g.png","type":"image\/png"}],"author":"Lukas Wojcik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Lukas Wojcik","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/#article","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/"},"author":{"name":"Lukas Wojcik","@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"headline":"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy","datePublished":"2026-09-23T06:30:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/"},"wordCount":472,"commentCount":0,"publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-489-self-hosted-large-language-model-llm-g.png","keywords":["Artificial Intelligence","Homelab","Linux","LLM","Self-Hosting","Server Administration","Tutorial","Web Security"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/","name":"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/#primaryimage"},"image":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/#primaryimage"},"thumbnailUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-489-self-hosted-large-language-model-llm-g.png","datePublished":"2026-09-23T06:30:00+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/#primaryimage","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-489-self-hosted-large-language-model-llm-g.png","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/09\/hero-489-self-hosted-large-language-model-llm-g.png","width":1200,"height":630,"caption":"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy"},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/cloud-ai\/tutorials-en-cloud-ai\/self-hosted-large-language-model-llm-with-ollama-behind-an-auth-proxy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Self-Hosted Large Language Model (LLM) with Ollama Behind an Auth Proxy"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"Lukas Wojcik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"Lukas Wojcik"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=489"}],"version-history":[{"count":5,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/489\/revisions"}],"predecessor-version":[{"id":17955,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/posts\/489\/revisions\/17955"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media\/14049"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/categories?post=489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}