Nodes/Comfy DV Nodes/Ollama Header — Basic Auth
ComfyUI Node

Ollama Header — Basic Auth

Username and password auth for your model server

By darth-veitcher·Created 2 years ago·Updated about a month ago· 2
Ollama Header — Basic Auth
  • headers
  • headers
username
password

Some model servers don't want a bearer token - they want plain HTTP Basic auth: a username and a password, sent as an Authorization: Basic ... header. Ollama Header - Basic Auth is the comfydv node that builds that header for you, so your graph can talk to a server that sits behind a login.

How it works

You give it a username and password. It base64-encodes the pair into the standard Basic scheme and merges the resulting Authorization header into the OLLAMA_HEADERS bundle - the same chained dictionary the other header nodes build. Wire that bundle into Ollama Client and every request your LLM nodes make carries the credentials.

That's the whole mechanism, and it's worth being precise about because the encoding trips people up: Basic auth is literally Authorization: Basic <base64("username:password")>. The node does that base64 step for you, which is why you should use it rather than hand-rolling the header with Ollama Header - Custom. Getting the encoding right by hand is a classic source of mysterious auth failures.

Inputs and output

  • username - required STRING.
  • password - required STRING. The node doesn't try to mask it in the widget, so treat the workflow as containing a secret.
  • headers (optional) - chain input, same as the other header nodes.
  • Output: headers - into Ollama Client, or on to the next header node.

Install

Via ComfyUI Manager (search "comfydv"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/darth-veitcher/comfydv.git

Restart. Like the other header nodes, it's only useful against a server that actually requires auth - a plain local Ollama install ignores it.

Gotchas

  • Credentials in plaintext in the workflow. Same rule as Bearer Token: whatever's in the widget is in the .json. Keep shared workflows free of real passwords, and spin up scoped credentials for anything you might export.
  • Basic vs. Bearer is a server-side choice, not yours. If the server expects a Bearer token and you send Basic, you'll get an auth error and spend a while wondering why. Check what your server or proxy actually wants - this node is only correct when the answer is "HTTP Basic."
  • One Authorization header per chain. This node, Bearer Token, and a custom Authorization header all target the same key. Chain exactly one of them; the last writer wins and silently overrides the rest.
Categorydv/ollama/headers

Inputs (3)

NameTypeDefaultDescription
usernameSTRING
passwordSTRING
headersoptOLLAMA_HEADERS

Outputs (1)

NameTypeDescription
headersOLLAMA_HEADERS