<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Loki Bein Blodsson </title>
    <description>The latest articles on DEV Community by Loki Bein Blodsson  (@stingingraven).</description>
    <link>https://dev.to/stingingraven</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3920781%2F87eb6443-afa2-4109-996c-c8fc7d4bd9c8.png</url>
      <title>DEV Community: Loki Bein Blodsson </title>
      <link>https://dev.to/stingingraven</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/stingingraven"/>
    <language>en</language>
    <item>
      <title>Reclaiming the Digital Clearing: A Guide to Self-Hosting SearXNG</title>
      <dc:creator>Loki Bein Blodsson </dc:creator>
      <pubDate>Sun, 07 Jun 2026 04:18:54 +0000</pubDate>
      <link>https://dev.to/stingingraven/reclaiming-the-digital-clearing-a-guide-to-self-hosting-searxng-57pn</link>
      <guid>https://dev.to/stingingraven/reclaiming-the-digital-clearing-a-guide-to-self-hosting-searxng-57pn</guid>
      <description>&lt;h2&gt;
  
  
  Introduction: Reclaiming the Digital Clearing
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd51pc90mp1zpabncjbha.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd51pc90mp1zpabncjbha.png" alt="A comparison matrix showing three search options (Big Tech Search, Public SearXNG Instances, and Self-Hosted SearXNG) across four criteria: IP Logging &amp;amp; Tracking, Algorithmic Bias, Rate-Limit Control, and Local AI Integration. Highlights that self-hosted SearXNG offers zero tracking, no bias, absolute control, and native API access for local LLMs." width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In&lt;/strong&gt; the vast, rugged landscapes of Central Alberta, we understand that a homestead is only as secure as the perimeter we defend. In the digital realm, our search queries are the raw ore that data-mining giants exploit to track our movements and trap us in algorithmic filter bubbles. To reclaim your digital sovereignty, you must step into the  digital forge  and build your own tools.&lt;/p&gt;

&lt;p&gt;SearXNG is a "metasearch engine"—it does not crawl the web itself but acts as a privacy-preserving proxy, aggregating results from dozens of services without passing your personal footprint to them. By hosting your own instance on the traditional territory of Treaty 6, you break free from biased results and ensure your intent remains your own. This is the first step in establishing a digital clearing where you decide what is surfaced and who is allowed to watch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fps1sm38byh9h5lyqm3is.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fps1sm38byh9h5lyqm3is.png" alt="Technical diagram showing Docker Compose configuration for deploying SearXNG with Redis cache. Displays YAML configuration code and illustrates the internal Docker network architecture with SearXNG Core and Redis Cache containers communicating on a protected virtual network via port 8080." width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Your Accomplishments
&lt;/h2&gt;

&lt;p&gt;Establish a stable Docker-based bedrock on Ubuntu 22.04+.&lt;br&gt;
Deploy a high-performance SearXNG and Redis stack.&lt;br&gt;
Configure advanced settings to prevent bot blocks.&lt;br&gt;
Integrate your private search engine into your daily routine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkwkukiwj0tlyso115e9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkwkukiwj0tlyso115e9k.png" alt="Flowchart illustrating how SearXNG acts as an aggregating proxy between users and multiple search engines (Google, DDG, Wikipedia, Bing). Shows user queries flowing through Ubuntu Server/SearXNG Container with Redis caching, which then sends anonymized, fragmented requests to upstream providers without passing user IP or profile data." width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites: Establishing the Bedrock
&lt;/h2&gt;

&lt;p&gt;Properly sized infrastructure is the hewn stone of your foundation. A stable system requires a base that can withstand the weight of its operations; without precision here, the "chaos" of system failure is inevitable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzypxqee70yfaevtgc7v9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzypxqee70yfaevtgc7v9.png" alt="Infrastructure requirements diagram divided into three sections: Compute Node (1 CPU core/1GB RAM minimum), OS &amp;amp; Stack (Ubuntu 22.04+ with Docker), and Network Infrastructure (VPS hosting with clean IP reputation). Emphasizes minimal hardware footprint with focus on network stability." width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hardware Requirements&lt;/strong&gt;&lt;br&gt;
CPU:  1 Core (Minimum).&lt;br&gt;
RAM:  1 GB (Minimum).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Scaling Path:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you intend to weave this search engine into your Local AI (Week 1), you will need the strength of  16GB RAM and an NVIDIA GPU  (6GB+ VRAM) to turn the AI's crawl into a sprint.Software Requirements&lt;br&gt;
OS:  Ubuntu 22.04 or newer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Orchestration:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Docker and Docker-Compose installed and functional.Recommended Hosting: Claim Your Credits  For those operating beyond the local homestead, a Virtual Private Server (VPS) provides the uptime your kingdom requires.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vultr:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Claim your $100 free credit to lower the barrier to entry. Their "Give $100, Get $35" structure is built for rapid Docker deployments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DigitalOcean:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;A respected name offering generous credits for the first 60 days to help you spin up your stack.Once the bedrock is firm, the "incantation" of installation can begin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Orchestration: Docker and Docker-Compose.
&lt;/h2&gt;

&lt;p&gt;Using Docker Compose is a strategic maneuver; it allows for rapid, reproducible deployments that can be re-forged in seconds.Prepare the Environment  Execute these commands to prepare the space for your engine:&lt;br&gt;
mkdir searxng-stack &amp;amp;&amp;amp; cd searxng-stack&lt;br&gt;
nano docker-compose.yml&lt;/p&gt;

&lt;p&gt;The Configuration (docker-compose.yml)  Paste this logic into your editor:&lt;/p&gt;

&lt;p&gt;version: '3'&lt;br&gt;
services:&lt;br&gt;
  redis:&lt;br&gt;
    container_name: redis&lt;br&gt;
    image: redis:alpine&lt;br&gt;
    networks:&lt;br&gt;
      - searxng&lt;br&gt;
    restart: always&lt;/p&gt;

&lt;p&gt;searxng:&lt;br&gt;
    container_name: searxng&lt;br&gt;
    image: searxng/searxng:latest&lt;br&gt;
    networks:&lt;br&gt;
      - searxng&lt;br&gt;
    ports:&lt;br&gt;
      - "8080:8080"&lt;br&gt;
    volumes:&lt;br&gt;
      - ./searxng-data:/etc/searxng&lt;br&gt;
    environment:&lt;br&gt;
      - SEARXNG_BASE_URL=&lt;a href="http://localhost:8080/" rel="noopener noreferrer"&gt;http://localhost:8080/&lt;/a&gt;&lt;br&gt;
    depends_on:&lt;br&gt;
      - redis&lt;br&gt;
    restart: always&lt;/p&gt;

&lt;p&gt;networks:&lt;br&gt;
  searxng:&lt;br&gt;
    external: false&lt;/p&gt;

&lt;p&gt;Execute and Verify  Strike the anvil with the following command:&lt;br&gt;
docker compose up -d&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First-run verification:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Navigate to &lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt;. The appearance of the SearXNG search bar confirms your gateway is live. However, "up and running" is only the beginning of a truly refined system.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnq3pz592l0ojtv9hime7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnq3pz592l0ojtv9hime7.png" alt="Architectural overview showing a server rack inside a protective dome structure, representing a private self-hosted search engine setup. Illustrates connections to various data sources (search engines, document repositories, knowledge graphs) through secure protocols. Tagline emphasizes bypassing filter bubbles, eliminating trackers, and reclaiming data ownership." width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Detailed Configuration: Refining the Logic
&lt;/h2&gt;

&lt;p&gt;Precision within the settings.yml file prevents future system failure. This is where you fine-tune the engine's soul.&lt;br&gt;
Casting the Sigil:  Use openssl rand -hex 32 to generate a unique cryptographic key. Paste this into the secret_key field to secure your sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Naming the Kingdom:
&lt;/h2&gt;

&lt;p&gt;Customize the instance_name to reflect your identity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enabling Formats:
&lt;/h2&gt;

&lt;p&gt;Ensure both html and json formats are enabled, allowing for human use and future AI-weaving.The Strategy of Persistence  By using the volume mapping ./searxng-data, you ensure configurations survive container updates. Without this, every "re-forging" of the container wipes your custom logic. Persistence is the difference between a temporary tool and a permanent homestead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ncng9chsbdqjou0es3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ncng9chsbdqjou0es3p.png" alt="Explains the SearXNG configuration workflow, detailing how Docker volume mapping persists  raw `settings.yml` endraw  on the Ubuntu host. Includes a magnified view of YAML syntax requirements (spaces vs. tabs) and warns that incorrect indentation can cause container restart loops.&lt;br&gt;
" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Use-Cases:&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Integrating the Kingdom&lt;br&gt;
A tool only provides value when it is seamlessly integrated into your daily routine. To truly break the shackles of Big Tech profiling, you must set SearXNG as your default search engine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step-by-Step Browser Integration:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Access browser settings and locate the "Search Engine" management section.&lt;br&gt;
Add a new search engine using your server's details.&lt;br&gt;
Use the following query URL format: &lt;/p&gt;

&lt;p&gt;your-server-ip:8080/search?q=%sThis integration transforms your relationship with the web, turning a passive utility into a private gateway.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0wlbbv9b0s3pw23elwcv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0wlbbv9b0s3pw23elwcv.png" alt="A three-panel guide to essential SearXNG settings: generating a cryptographic secret key for session security using OpenSSL, defining a custom instance name for brand identity, and enabling both HTML and JSON output formats to support human users and API/AI integrations.&lt;br&gt;
" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Critical Takeaways for Avoiding Blocks:
&lt;/h2&gt;

&lt;p&gt;If Google or Bing blocks your IP, increase your engine timeouts significantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Strategic Maneuver:
&lt;/h2&gt;

&lt;p&gt;Rely on more permissive alternatives like  Startpage  or DuckDuckGo if aggressive engines remain hostile.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ficm6dzu7ye2aodini34e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ficm6dzu7ye2aodini34e.png" alt="A troubleshooting flowchart for handling upstream rate limits. Outlines a three-step recovery process: detecting when Google flags the server IP, adjusting  raw `settings.yml` endraw  to increase timeouts or disable specific engines, and restoring query routing through alternative providers like Bing and DuckDuckGo to protect IP reputation.&lt;br&gt;
" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Security &amp;amp; Production Hardening:
&lt;/h2&gt;

&lt;p&gt;The Protector’s Oath&lt;br&gt;
Exposing your engine to the internet without hardening is an ethical failure. Leaving port 8080 open is an  unlocked gate in a storm , inviting unwanted eyes into your sanctuary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reverse Proxy:&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Route traffic through Nginx or Traefik to hide internal ports and act as a shield.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTPS/SSL Certificates:&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Use Let's Encrypt to ensure your queries are encrypted in transit.&lt;br&gt;
Access Restriction:  Implement IP whitelisting or HTTP auth so only authorized kin can consume your resources.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lwmbna693lslaepz35l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lwmbna693lslaepz35l.png" alt="Step-by-step visual guide for setting SearXNG as the default browser search engine. Shows how to navigate browser settings, define the custom search URL string ( raw `your-server-ip:8080/search?q=%s` endraw ), and activate it so all address bar queries route through the private server.&lt;br&gt;
" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Extending the Stack: The Weaving of Systems
&lt;/h2&gt;

&lt;p&gt;SearXNG is a vital component in the larger FOSS AI ecosystem. It acts as the "eyes" for your local LLM, providing it with live web data.Connecting to Open-WebUI (Week 1):&lt;/p&gt;

&lt;p&gt;Navigate to  Open-WebUI  admin settings.&lt;br&gt;
Select  Web Search  and choose  SearXNG .&lt;br&gt;
Provide the internal Docker URL: &lt;a href="http://searxng:8080" rel="noopener noreferrer"&gt;http://searxng:8080&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;This connection grants your local AI a view of the live web. For further automation, integrate  n8n-Server  to build search-based workflows that monitor the web on your behalf.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh95nt3hqmbl3nbn2yhht.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh95nt3hqmbl3nbn2yhht.png" alt="Security architecture diagram illustrating layered protection for the SearXNG instance. Depicts concentric security layers including Let's Encrypt SSL, a Reverse Proxy (Nginx/Traefik), and Basic HTTP Authentication. Emphasizes the critical rule of never exposing Port 8080 directly to the public internet.&lt;br&gt;
" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion &amp;amp; The Horizon: Next Steps
&lt;/h2&gt;

&lt;p&gt;The system is live. You have forged a search engine that respects your privacy and breaks the bubbles of the old world. You have reclaimed your data.The system is live. The work continues.Supercharge Your Forge: The FOSS AI Power Pack  For those who value their time and require the master ledger, the  FOSS AI Power Pack (  $9–$  19)  is available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inside:&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Optimized Compose files, environment variable cheat sheets, and troubleshooting flowcharts to ensure your forge never goes cold.Internal Lore:&lt;br&gt;
Open-WebUI + Ollama: Run LLMs Locally&lt;br&gt;
n8n-Server: The No-Code Automation Engine&lt;br&gt;
Whisper-API: Self-Hosted Speech-to-Text&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcvt1iti5klk4ffaiacqa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcvt1iti5klk4ffaiacqa.png" alt="Illustrates the integration of local AI with private search, showing Open-WebUI and Ollama Week 1 connecting directly to a self-hosted SearXNG instance Week 2 via internal Docker networking. Explains how this setup grants local LLMs secure, tracker-free internet access for RAG workflows without relying on external corporate APIs.&lt;br&gt;
" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Keep up the good work! Thank you for checking out Loki's Studio. &lt;strong&gt;ALWAYS&lt;/strong&gt; check any code before using it to insure it is trust worthy! I am starting with this series, but soon I will have a lot more to share. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxbn9x0dnf51gtyxupy1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxbn9x0dnf51gtyxupy1.png" alt="A project completion summary featuring a " width="800" height="447"&gt;&lt;/a&gt;
"/&amp;gt;&lt;/p&gt;

&lt;p&gt;PROST 🍻 &lt;/p&gt;

</description>
      <category>programming</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Open-WebUI + Ollama Guide: Run LLMs Locally with Docker</title>
      <dc:creator>Loki Bein Blodsson </dc:creator>
      <pubDate>Sat, 09 May 2026 00:07:17 +0000</pubDate>
      <link>https://dev.to/stingingraven/open-webui-ollama-guide-run-llms-locally-with-docker-54el</link>
      <guid>https://dev.to/stingingraven/open-webui-ollama-guide-run-llms-locally-with-docker-54el</guid>
      <description>&lt;p&gt;1️⃣ &lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Welcome to the ultimate Open-WebUI guide. If you've ever wanted the power and sleek interface of ChatGPT but with the privacy of a local server, you are in the right place.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flit67ymrz866idd6pff3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flit67ymrz866idd6pff3.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ollama is a lightweight inference engine that makes running large language models (LLMs) dead simple, while Open-WebUI (formerly Ollama WebUI) provides a beautiful, feature-rich, and extensible front-end. By combining them, you can build your own private AI assistant.&lt;br&gt;
Why a self-hosted FOSS version matters:&lt;br&gt;
Absolute Privacy: Your chats, code snippets, and intellectual property never leave your machine.&lt;br&gt;
Zero Subscription Costs: Run powerful open-source models for free.&lt;br&gt;
Offline Access: Work seamlessly even without an internet connection.&lt;br&gt;
TL;DR - What you will accomplish today:&lt;br&gt;
Install Docker &amp;amp; Docker Compose.&lt;br&gt;
Deploy a unified Ollama and Open-WebUI stack using a single file.&lt;br&gt;
Prevent data loss with persistent volumes.&lt;br&gt;
Download and run Llama locally.&lt;/p&gt;

&lt;p&gt;2️⃣ &lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvyf69ct0c6s6cro6awr9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvyf69ct0c6s6cro6awr9.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before we spin up our Ollama local LLM stack, ensure your system meets these baseline requirements:&lt;br&gt;
Hardware: * RAM: 8 GB minimum (16 GB highly recommended to run 7B-8B parameter models).&lt;br&gt;
CPU: Modern multi-core processor.&lt;br&gt;
GPU (Optional but recommended): An NVIDIA GPU with at least 6GB VRAM will drastically improve token generation speed.&lt;br&gt;
Software: Docker and Docker-Compose installed on your system. (If you haven't done this yet, check out our Beginner's Guide to Docker).&lt;br&gt;
Network: Ports 8080 (WebUI) and 11434 (Ollama API) available.&lt;/p&gt;

&lt;p&gt;3️⃣ &lt;strong&gt;Quick-Start Installation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The biggest mistake beginners make is running Open-WebUI and Ollama in separate, disjointed Docker commands, leading to localhost connection errors. We will solve this by deploying them together in a single docker-compose.yml file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4rwzwgcxdz6or4g0vi1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk4rwzwgcxdz6or4g0vi1.png" alt=" " width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a new directory and create your compose file:&lt;/p&gt;

&lt;p&gt;mkdir open-webui-stack &amp;amp;&amp;amp; cd open-webui-stack&lt;br&gt;
nano docker-compose.yml&lt;/p&gt;

&lt;p&gt;Paste the following configuration:&lt;/p&gt;

&lt;p&gt;version: '3.8'&lt;/p&gt;

&lt;p&gt;services:&lt;br&gt;
  ollama:&lt;br&gt;
    image: ollama/ollama:latest&lt;br&gt;
    container_name: ollama&lt;br&gt;
    volumes:&lt;br&gt;
      - ollama_data:/root/.ollama&lt;br&gt;
    ports:&lt;br&gt;
      - "11434:11434"&lt;br&gt;
    restart: unless-stopped&lt;br&gt;
    # Uncomment the following lines if you have an NVIDIA GPU and nvidia-docker2 installed&lt;br&gt;
    # deploy:&lt;br&gt;
    #   resources:&lt;br&gt;
    #     reservations:&lt;br&gt;
    #       devices:&lt;br&gt;
    #         - driver: nvidia&lt;br&gt;
    #           count: 1&lt;br&gt;
    #           capabilities: [gpu]&lt;/p&gt;

&lt;p&gt;open-webui:&lt;br&gt;
    image: ghcr.io/open-webui/open-webui:main&lt;br&gt;
    container_name: open-webui&lt;br&gt;
    volumes:&lt;br&gt;
      - open-webui_data:/app/backend/data&lt;br&gt;
    ports:&lt;br&gt;
      - "8080:8080"&lt;br&gt;
    environment:&lt;br&gt;
      - OLLAMA_BASE_URL=&lt;a href="http://ollama:11434" rel="noopener noreferrer"&gt;http://ollama:11434&lt;/a&gt;&lt;br&gt;
      - WEBUI_AUTH=True&lt;br&gt;
    depends_on:&lt;br&gt;
      - ollama&lt;br&gt;
    restart: unless-stopped&lt;/p&gt;

&lt;p&gt;volumes:&lt;br&gt;
  ollama_data:&lt;br&gt;
  open-webui_data:&lt;/p&gt;

&lt;p&gt;Save the file and run:&lt;br&gt;
docker compose up -d&lt;/p&gt;

&lt;p&gt;First-run verification: Wait about 60 seconds for the containers to initialize, then open your browser and navigate to &lt;a href="http://localhost:8080" rel="noopener noreferrer"&gt;http://localhost:8080&lt;/a&gt;. You should be greeted by the Open-WebUI login screen!&lt;/p&gt;

&lt;p&gt;4️⃣ &lt;strong&gt;Detailed Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's break down why this configuration solves the most common self-hosting headaches:&lt;br&gt;
Persistent Storage (Volumes): Notice the ollama_data and open-webui_data volumes? Without these, every time you update or restart your container, you would lose your downloaded models and chat history. This setup ensures your data is permanently safe.&lt;br&gt;
Internal Network Routing: By setting OLLAMA_BASE_URL=&lt;a href="http://ollama:11434" rel="noopener noreferrer"&gt;http://ollama:11434&lt;/a&gt;, we tell the WebUI to talk directly to the Ollama container via Docker's internal DNS. This completely bypasses annoying localhost or 127.0.0.1 routing conflicts.&lt;br&gt;
Authentication (WEBUI_AUTH=True): This forces users to create an account before accessing the AI, securing your server from unauthorized use.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro-Tip&lt;/strong&gt;: If you want to access this outside your home network, we highly recommend putting Open-WebUI behind Nginx Proxy Manager or Traefik with an SSL certificate.&lt;/p&gt;

&lt;p&gt;5️⃣ &lt;strong&gt;Common Use-Cases &amp;amp; Mini-Projects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Downloading Your First Model&lt;br&gt;
Once logged into Open-WebUI, click on the Settings gear, navigate to Models, and type llama3 or llama3.1 into the pull model field. Click download.&lt;br&gt;
Alternatively, you can pull a model directly via your terminal:&lt;br&gt;
docker exec -it ollama ollama run llama3.1&lt;/p&gt;

&lt;p&gt;API Access for Developers&lt;br&gt;
Because we exposed port 11434, you can use your new local LLM server just like the OpenAI API. Test it with this simple curl request:&lt;br&gt;
curl -X POST &lt;a href="http://localhost:11434/api/generate" rel="noopener noreferrer"&gt;http://localhost:11434/api/generate&lt;/a&gt; -d '{&lt;br&gt;
  "model": "llama3.1",&lt;br&gt;
  "prompt": "Why is the sky blue? Explain in one sentence.",&lt;br&gt;
  "stream": false&lt;br&gt;
}'&lt;/p&gt;

&lt;p&gt;6️⃣ &lt;strong&gt;Troubleshooting &amp;amp; FAQ&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Q: My GPU isn't being detected by Ollama. Tokens are generating very slowly! &lt;/p&gt;

&lt;p&gt;A: If you are on Linux with an NVIDIA card, you must install the NVIDIA Container Toolkit (nvidia-docker2). Once installed, uncomment the deploy block in the docker-compose.yml file and restart the stack (docker compose up -d --force-recreate).&lt;/p&gt;

&lt;p&gt;Q: I keep getting "Out of Memory" errors on my 8GB RAM machine. &lt;/p&gt;

&lt;p&gt;A: Standard 7B or 8B models might be too heavy for your system. Switch to a smaller, highly efficient model. Try pulling gemma:2b or Microsoft's phi3 inside the Open-WebUI interface.&lt;/p&gt;

&lt;p&gt;Q: Open-WebUI says "Ollama connection failed." &lt;/p&gt;

&lt;p&gt;A: Double-check that your OLLAMA_BASE_URL is set to &lt;a href="http://ollama:11434" rel="noopener noreferrer"&gt;http://ollama:11434&lt;/a&gt; (not localhost) and that the ollama container is running without restart loops (docker ps).&lt;/p&gt;

&lt;p&gt;7️⃣ &lt;strong&gt;Security &amp;amp; Production Hardening&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk7ag0ictt97hpmnigdhr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk7ag0ictt97hpmnigdhr.png" alt=" " width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you plan to expose this setup to the internet, you must harden it:&lt;br&gt;
Disable Open Signups: Once you have created your admin account, go to the WebUI Admin Panel -&amp;gt; Settings -&amp;gt; General, and turn off "Enable New User Signups".&lt;br&gt;
Backup Strategy: Regularly back up your Docker volumes. You can easily tarball your volumes located in /var/lib/docker/volumes/ to keep your chat history safe.&lt;br&gt;
Reverse Proxy: Never expose port 8080 directly to the web. Route it through a proxy manager with Let's Encrypt SSL.&lt;/p&gt;

&lt;p&gt;8️⃣ &lt;strong&gt;Extending the Stack&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbftknz8fer5mfa1e3gt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbftknz8fer5mfa1e3gt3.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your private AI assistant doesn't have to exist in a vacuum. You can seamlessly integrate this setup with other FOSS homelab tools:&lt;br&gt;
Give it internet access: Connect Open-WebUI to SearXNG (Self-Hosted Search Engine) to allow your LLM to scrape the live web.&lt;br&gt;
Safe Code Execution: Integrate Open-Terminal to give your AI agents a sandboxed browser-based shell to write and test code safely.&lt;/p&gt;

&lt;p&gt;9️⃣ &lt;strong&gt;Conclusion &amp;amp; Next Steps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgbffub34jxv3f67pv4nl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgbffub34jxv3f67pv4nl.jpg" alt=" " width="800" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You now have a fully functional, highly secure, and persistent Ollama local LLM server with a gorgeous user interface. You've eliminated third-party privacy risks and unlocked the world of open-weight AI models.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
