DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk11 min

How to Fix Docker Document-Management Containers That Cannot Reach Their AI Service

A practical, topology-first guide to fixing Docker document-management containers that cannot connect to an AI service, with Open WebUI/Ollama and Paperless-ngx examples.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The reliable fix is to troubleshoot from the container that makes the AI request, not from your browser or the Docker host. Identify that requesting process, inspect the endpoint it actually uses, and test that address and port from the same container network. Then verify that the AI service is listening on an address reachable from that network. A host-side localhost or 127.0.0.1 is not a general alias for another container or for the Docker host.

The exact setting depends on whether the AI service is in the same Compose project, on the Docker host, or on another machine. Open WebUI and Paperless-ngx provide useful examples, but their documented fixes should be applied only when your topology matches.

As an Amazon Associate I earn from qualifying purchases.

Start with the network viewpoint that matters

Every connection has two sides: the process that opens the connection and the service that accepts it. In a Dockerized document-management stack, the requester is usually an application container, a worker, or a background task process. The browser may reach an address that the requester cannot, and a test run on the host may succeed even though the container has no route, DNS entry, or port access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use the requester’s network namespace as the source of truth. If the application container is configured with http://localhost:11434, it will look for an Ollama listener inside that same container. It will not automatically find Ollama running in a sibling container or on the host. Replace the address with one that is meaningful from the requester’s point of view.

#1 Best Overall
Sale
Epson Workforce ES-50 Compact & Lightweight Mobile Document Scanner | For Computers including PC and Mac Receipt and Document Scanner USB Powered
  • PORTABLE SCANNER FOR USE ON-THE-GO — The fastest and lightest mobile single-sheet-fed compact document scanner in its class¹
  • QUICK DOCUMENT SCANNING ― This Epson ultra-fast scanner scans a single page as quickly as 5.5 seconds²; Windows and Mac compatible
  • VERSATILE PAPER HANDLING ― Portable scanner scans documents up to 8.5 x 72 in; Also easily digitizes receipts and ID cards to make accounting, bookkeeping, and organizing simpler
  • INTUITIVE, HIGH-SPEED SOFTWARE — Epson ScanSmart Software³ is a smart tool allowing you to easily scan, review, and save; Stay organized easily with the help of this Epson scanner
  • EASY SETUP — USB-powered connect to your computer for quick and simple scanning; No batteries or external power supply required to operate portable document scanner; Standard Connectivity: USB 2.0

Open WebUI’s troubleshooting documentation describes backend connections using a Docker service name, host.docker.internal, or an internal IP, depending on deployment. It characterizes a failure caused by an unreachable backend as “a deployment and networking condition, not an Open WebUI bug.”

Map the deployment before changing settings

Write down four facts before editing Compose files or environment variables:

  • Which process sends the AI request: the web application, a worker, a plugin, or another container.
  • The effective URL and port used by that process after environment-variable substitution.
  • Where the AI service runs and which Docker networks connect the two sides.
  • The host platform: Docker Desktop or Linux Docker Engine.

Do not infer the answer from a URL that works in a browser. A browser request originates on your workstation; an AI request usually originates inside a container.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
AI-service location Address pattern from the requester What to verify Important qualification
Another service in the same Compose network The AI service’s Compose service name and its container listening port Both services share a network, the name resolves inside the requester, and the service is listening on that port Use the container port, not a host-published port, when traffic stays inside the Compose network.
Docker host A platform-appropriate host gateway such as host.docker.internal, or host networking where documented Name resolution, route, host firewall, and the host service’s bind address Docker Desktop resolves host.docker.internal automatically; Linux Docker Engine requires the documented host-network or host-gateway approach.
Another machine An IP address or DNS name routable from the requester Routing, DNS, firewall policy, and exposure of the service port An address that works from the host may still be unreachable from the container network.

1. Identify the component making the failed request

Start with the application logs and the integration configuration. Look for the first component that records an AI URL, a connection attempt, or an HTTP error. In asynchronous systems, the web container may accept an upload while a worker later performs the AI call. In that case, testing from the web container can give a false result; test from the worker that owns the failed task.

List the running services and inspect the relevant logs. Replace the example service name with the actual Compose service that makes the request:

docker compose ps
docker compose logs --tail=200 <requesting-service>
docker compose exec <requesting-service> sh

Inside the container, inspect the environment or application configuration for the effective endpoint, taking care not to publish API keys or other secrets. If the URL is assembled from several variables, record the final hostname and port. A stale value in an override file, a different Compose project, or a worker-specific environment can leave the web interface showing one setting while the failing process uses another.

Rank #2
Sale
Brother DS-640 Compact Mobile Document Scanner, (Model: DS640)
  • FAST SPEEDS - Scans color and black and white documents a blazing speed up to 16ppm (1). Color scanning won’t slow you down as the color scan speed is the same as the black and white scan speed.
  • ULTRA COMPACT – At less than 1 foot in length and only about 1. 5lbs in weight you can fit this device virtually anywhere (a bag, a purse, even a pocket).
  • READY WHENEVER YOU ARE – The DS-640 mobile scanner is powered via an included micro USB 3. 0 cable allowing you to use it even where there is no outlet available. Plug it into you PC or laptop and you are ready to scan.
  • WORKS YOUR WAY – Use the Brother free iPrint&Scan desktop app for scanning to multiple “Scan-to” destinations like PC, Network, cloud services, Email and OCR. (2) Supports Windows, Mac and Linux and TWAIN/WIA for PC/ICA for Mac/SANE drivers. (3)
  • OPTIMIZE IMAGES AND TEXT – Automatic color detection/adjustment, image rotation (PC only), bleed through prevention/background removal, text enhancement, color drop to enhance scans. Software suite includes document management and OCR software. (4)

2. Test name resolution and the port from inside the requester

Run diagnostics in the same container network context as the failing process. First test the hostname, then the TCP port, and finally the application protocol if a suitable client is available. The exact utilities vary by image, so treat these as patterns rather than guaranteed commands:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker compose exec <requesting-service> getent hosts <ai-hostname>
docker compose exec <requesting-service> nc -vz <ai-hostname> <ai-port>
docker compose exec <requesting-service> curl -v http://<ai-hostname>:<ai-port>/

If the image has no getent, nc, or curl, use an equivalent diagnostic tool available in that image or attach a temporary diagnostic container to the same Docker network. The important detail is not the utility; it is that the test originates from the requesting network.

  • A name-resolution failure means the hostname is wrong, unavailable in that network, or dependent on a host-only DNS path.
  • A refused connection usually means the address is reachable but no process is listening on that port, or a firewall is actively rejecting it.
  • A timeout points to routing, firewall filtering, an incorrect address, or a service that is not responding.
  • An HTTP response proves that something answered, but it does not prove that the path, authentication, model, or API version required by the document application is correct.

Compare the port in the configured URL with the port on which the AI service actually listens. A published host port and an internal container port can differ. For traffic between containers on one network, use the service’s internal listening port; for traffic through the host, use the host-facing port documented by that service.

3. Put both services on a reachable network

AI service in the same Compose network

Configure the client with the AI service’s network-reachable service name, not an arbitrary container name or a host loopback address. Confirm that the requesting service and the AI service are attached to at least one common network. If you edited Compose networks, recreate the services so the change is applied:

docker compose config
docker compose up -d --force-recreate <requesting-service> <ai-service>

docker compose config is useful for seeing the merged configuration after overrides and variable substitution. Check the rendered networks and environment values rather than relying on the file you think Compose loaded.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AI service on another machine

Use a DNS name or IP address that the requester can route to. Check the remote machine’s firewall and the AI service’s port exposure. If the hostname resolves to an address available only on the host’s loopback interface, containers on another machine cannot use it. A private address may work only when the Docker host and container network have a route to that private segment.

Rank #3
Sale
Epson Workforce ES-400 II High-Speed Color Duplex Desktop Document Scanner | For Computers including PC and Mac with Auto Document Feeder and Image Adjustment Tools
  • FAST DOCUMENT SCANNING — Document scanner with feeder allows you to speed through stacks with a 50-sheet Auto Document Feeder (ADF); Efficient office scanner to help you scan more productively
  • INTUITIVE, HIGH-SPEED SOFTWARE — Quickly scan with this desktop document scanner; Epson ScanSmart Software lets you easily preview scans, email files, upload to the cloud, and more; Plus, automatic file naming saves even more time
  • SEAMLESS INTEGRATION — Easily incorporate your data into most document management software with the included TWAIN driver; Office document scanner integrates seamlessly with business workflows
  • EASY SHARING — Duplex scanner allows you to scan straight to email or popular cloud storage2 services like Dropbox, Evernote, Google Drive, and OneDrive for simple storage and sharing
  • SIMPLE FILE MANAGEMENT — Scanner allows the creation of searchable PDFs with Optical Character Recognition (OCR) and convert scans to editable Word or Excel files effortlessly; Designed for home and office document scanning

4. Verify that the AI service is listening on the right interface

Correct client-side addressing cannot fix a server that listens only on an inaccessible interface. Inspect the AI service’s startup output or host configuration to determine its bind address and port. A service bound to 127.0.0.1 accepts connections only from its own host namespace. It will not accept a connection arriving through a container bridge or another machine.

For the documented case of Ollama running on the host while Open WebUI runs in Docker, Open WebUI identifies a localhost-only Ollama listener as a likely cause and recommends configuring Ollama with OLLAMA_HOST=0.0.0.0, then restarting Ollama so the setting takes effect. Apply that remedy only to this arrangement and according to the Ollama installation method you use. Other AI servers have different variables and service managers.

Binding to all interfaces changes who can attempt to connect. Limit exposure with Docker network scope, host firewall rules, or a private interface where appropriate. Do not treat 0.0.0.0 as a universal security recommendation; it is the listener setting documented for the specific host-Ollama/Open-WebUI topology.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

5. Handle host access correctly on Docker Desktop and Linux

When the AI service runs directly on the Docker host, the requester needs a host gateway address. Docker’s Model Runner integration example sets OLLAMA_BASE_URL to http://host.docker.internal:12434 and adds the mapping host.docker.internal:host-gateway in Compose. The example is tied to that service and port; your AI server may listen elsewhere.

services:
  open-webui:
    environment:
      OLLAMA_BASE_URL: http://host.docker.internal:12434
    extra_hosts:
      - "host.docker.internal:host-gateway"

Docker Desktop resolves host.docker.internal automatically. Docker’s documentation presents host networking or a host-gateway address as alternatives for Linux Docker Engine. Verify which method your Linux installation supports, then test the resulting hostname and port from the requester. Do not assume that a hostname working on Docker Desktop will resolve identically on a native Linux engine.

After changing the environment, recreate the affected service. Restarting only the host AI process will not update an already-created container with a new URL, and editing a Compose file does not guarantee that a running container has adopted the change.

Rank #4
Canon Canoscan Lide 300 Scanner (PDF, AUTOSCAN, Copy, Send)
  • Scanner type: Document
  • Connectivity technology: USB
  • With Auto Scan Mode, the scanner automatically detects what you're scanning
  • Digitize documents and images

6. Use Open WebUI and Ollama as a concrete example

Open WebUI’s guidance is useful because it distinguishes backend connectivity from browser connectivity. If Open WebUI is containerized and Ollama is another Compose service, configure the backend URL with the Ollama service name and its internal port. If Ollama runs on the host, use the platform-appropriate host gateway pattern. If it runs elsewhere, use an internal IP or DNS name that is routable from the Open WebUI container.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check Ollama’s listener independently. A host service restricted to 127.0.0.1 can appear healthy when queried locally while remaining invisible to Open WebUI. For the host-Ollama arrangement, set OLLAMA_HOST=0.0.0.0 as documented, restart Ollama, and repeat the test from the Open WebUI container. If the connection then succeeds but model requests fail, move on to model availability, authentication, or API compatibility rather than continuing to change Docker networking.

7. Separate AI connectivity from document-processing queues

A document that remains pending or fails after upload does not automatically indicate an AI network error. Paperless-ngx documents a separate troubleshooting path: confirm that the broker and task processor are running, inspect application output, and open the administration interface to review failed tasks and their error details.

Use the task record to identify which component failed. A worker or broker outage can prevent the AI request from being attempted at all. Conversely, a task that contains a clear connection-refused or timeout error points back to endpoint, listener, or routing checks. Restarting the AI service will not repair a stopped broker, and repairing the broker will not make an unreachable AI host routable.

  1. Check the Compose status for the Paperless-ngx web, worker, and broker services used by your deployment.
  2. Inspect the worker and application logs around the task’s timestamp.
  3. Review failed-task details in the administration interface and copy the exact error class and endpoint, with secrets removed.
  4. Only after confirming that the worker is processing tasks should you diagnose the AI URL from that worker’s network context.

8. Read the error in context instead of guessing

Observed symptom Most useful next check What not to conclude yet
Hostname cannot be resolved Check the URL spelling, Compose service name, shared network, and host-gateway configuration. Do not conclude that the AI service is down; the request may never have reached it.
Connection refused Confirm the server process is running, the port is correct, and the service is bound to an interface reachable from the requester. Do not keep changing DNS when the address already resolves.
Connection timeout Check routing, firewall rules, remote exposure, and whether the configured address is valid from the container. Do not assume the application’s credentials are the cause until a TCP connection succeeds.
HTTP authentication or API error Verify the endpoint path, credentials, model or provider settings, and API compatibility. Do not treat an HTTP response as a Docker-network failure.
Paperless task never starts Check the broker, task processor, and failed-task records. Do not infer that the AI endpoint was contacted.

Capture the timestamp, requesting service, resolved hostname, destination port, and the first meaningful error line. This makes it possible to compare a client-side failure with the AI service’s own access or startup logs.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

9. Recreate only what changed

Apply the smallest change that matches the diagnosis. A URL or network edit normally requires recreating the requesting container. A listener-variable edit requires restarting the AI service. A Compose-network edit may require recreating both services so they join the same network.

Best Value
Sale
ScanSnap iX2500 Wireless or USB High-Speed Document Scanner, Black | Cloud Enabled | Photos & Receipts | Large Touchscreen | 100 page Auto Document Feeder | Mac or PC
  • OUR MOST ADVANCED SCANSNAP. Large touchscreen, fast 45ppm double-sided scanning, 100-sheet document feeder, Wi-Fi and USB connectivity, automatic optimizations, and support for cloud services. Upgraded replacement for the discontinued iX1600
  • CUSTOMIZABLE. SHARABLE. Select personalized profiles from the touchscreen. Send to PC, Mac, mobile devices, and clouds. QUICK MENU lets you quickly scan-drag-drop to your favorite computer apps
  • STABLE WIRELESS OR USB CONNECTION. Built-in Wi-Fi 6 for the fastest and most secure scanning. Connect to smart devices or cloud services without a computer. USB-C connection also available
  • PHOTO AND DOCUMENT ORGANIZATION MADE EFFORTLESS. Easily manage, edit, and use scanned data from documents, receipts, photos, and business cards. Automatically optimize, name, and sort files
  • AVOIDS PAPER JAMS AND DAMAGE. Features a brake roller system to feed paper smoothly, a multi-feed sensor that detects pages stuck together, and skew detection to prevent paper damage and data loss
docker compose up -d --force-recreate <requesting-service>
docker compose logs --tail=100 <requesting-service>

After recreation, repeat the test from inside the requester before retrying a large document batch. If the test still fails, compare the running container’s environment and network attachments with docker compose config; this catches overrides and stale deployments that a source-file inspection can miss.

10. Protect document data and account for hosted-AI costs

Network success does not answer the privacy or cost question. Paperless-ngx states that when a hosted OpenAI-compatible API is configured, document data is sent to the selected provider and usage charges may apply. Treat the endpoint choice as a data-governance decision as well as a connectivity setting.

  • Confirm which documents, pages, or extracted text leave your infrastructure.
  • Review the provider’s retention, processing, and access terms before enabling a hosted endpoint.
  • Estimate recurring usage charges and set any available limits or alerts.
  • Keep API credentials out of logs, screenshots, support tickets, and published Compose files.
  • Prefer a private network path and restrictive firewall rules when the service is intended for internal use.

If a local AI service is required for privacy, verify that the document container can reach its listener without exposing that listener to networks that do not need it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Practical recovery checklist

  • Identify the exact container or worker that originates the AI request.
  • Record its effective endpoint after Compose overrides and variable substitution.
  • Confirm whether the AI service is in the same Compose network, on the Docker host, or on another machine.
  • Test DNS or hostname resolution from the requester.
  • Test the destination TCP port from the requester.
  • Confirm that the AI service is running and listening on the configured port.
  • Replace host localhost with a service name or platform-appropriate host gateway when required.
  • For host Ollama with containerized Open WebUI, apply the documented OLLAMA_HOST=0.0.0.0 setting and restart Ollama if that topology matches.
  • On Docker Desktop, verify host.docker.internal; on Linux Docker Engine, follow the host-network or host-gateway approach documented for your setup.
  • For Paperless-ngx, verify the broker and task processor and inspect failed-task details before blaming the AI endpoint.
  • Recreate only the services whose environment or network configuration changed.
  • Re-test with a small document and review both client and AI-service logs.

When the generic fix is not enough

The title alone cannot determine a single correct URL. The final configuration depends on the document-management application, AI integration, provider, host operating system, service placement, Compose networks, and listener port. If you need case-specific help, collect the Compose service names, the endpoint setting with secrets removed, the host platform, the AI service location, and the exact error line. Those details identify whether the next action belongs in DNS, routing, listener configuration, authentication, or the document-processing queue.

The most dependable rule is simple: make the AI endpoint valid from the process that calls it, and make the AI service listen on an interface that process can reach. Everything else in this guide is a way to prove which side of that rule is failing.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.