Skip to content

Disallowed Host - invalid host header - you may need to add ... to ALLOWED_HOSTS #291

Open
@gitwittidbit

Description

@gitwittidbit

Describe the bug
Fresh installation according to official docs (used pipx instead of pip)
running llmstack, the docker containers get downloaded, created and started
Then I get the command line output "Waiting for LLMStack server to be up..." about 20 times.
Then I get a motherload of warnings and error messages.
And when I try to access LLMStack on port 3000, I see an error message that the IP LLMStack is running on is disallowed and that I may need to add it to ALLOWED_HOSTS.
I have added it, restarted the api container and the whole VM but the error keeps coming back and I can't access LLMStack.

EDIT:
So I have investigated this a bit further and the issue seems to be that when I add my VM's IP to ALLOWED_HOSTS in settings.py, this does not get relayed into the docker container. I have tried creating an additional environment variable "ALLOWED_HOSTS" in docker-compose.yml, I have tried adding an .env file with this value, I have tried adding the IP to the .env file, I have tried hard coding the IP into docker-compose.yml, I have tried mounting the settings.py into the container. No matter what I do, ALLOWED_HOSTS inside the container always comes up as "localhost".

Am I the only one running llmstack via docker?

To Reproduce
Steps to reproduce the behavior:

See above

Expected behavior
Being able to access LLMStack in the browser

Version
Latest version per today.

Environment
Debian 12 VM, rootless docker, command: llmstack

Screenshots
n/a

Additional context
Add any other context about the problem here. Consider including relevant log messages from docker compose logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions