[GH-ISSUE #11453] OLLAMA_API_TOKEN environment variable #7563

Closed
opened 2026-04-12 19:39:38 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @atol71 on GitHub (Jul 17, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11453

Hi,
Is it possible to have Ollama Docker started with:

export OLLAMA_API_TOKEN="your-generated-token-here"
ollama serve --auth-token $OLLAMA_API_TOKEN

In docker-compose.yml I can naturally add:

envronment:
...
  - OLLAMA_API_TOKEN="token-here"

Though I do not know if it starts with --auth-token setting?

Originally created by @atol71 on GitHub (Jul 17, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11453 Hi, Is it possible to have Ollama Docker started with: ``` export OLLAMA_API_TOKEN="your-generated-token-here" ollama serve --auth-token $OLLAMA_API_TOKEN ``` In docker-compose.yml I can naturally add: ``` envronment: ... - OLLAMA_API_TOKEN="token-here" ``` Though I do not know if it starts with `--auth-token` setting?
GiteaMirror added the feature request label 2026-04-12 19:39:38 -05:00
Author
Owner

@atol71 commented on GitHub (Jul 17, 2025):

command: --auth-token $OLLAMA_API_TOKEN

Answers: Error: unknown flag: --auth-token

<!-- gh-comment-id:3082636181 --> @atol71 commented on GitHub (Jul 17, 2025): `command: --auth-token $OLLAMA_API_TOKEN` Answers: `Error: unknown flag: --auth-token`
Author
Owner

@rick-github commented on GitHub (Jul 17, 2025):

#8536

<!-- gh-comment-id:3083756799 --> @rick-github commented on GitHub (Jul 17, 2025): #8536
Author
Owner

@atol71 commented on GitHub (Jul 27, 2025):

API can be accieved with Traefik and other reverse proxies. Eather naturally or with a plugin.

<!-- gh-comment-id:3124501974 --> @atol71 commented on GitHub (Jul 27, 2025): API can be accieved with Traefik and other reverse proxies. Eather naturally or with a plugin.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7563