[GH-ISSUE #22257] issue: Cannot generate tokens via WebUI #35205

Closed
opened 2026-04-25 09:26:30 -05:00 by GiteaMirror · 15 comments
Owner

Originally created by @g4njawizard on GitHub (Mar 5, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22257

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.8.8

Ollama Version (if applicable)

No response

Operating System

Linux jetson 5.15.148-tegra

Browser (if applicable)

Firefox 148.0

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Generating Tokens as a user via OpenWebUI

Actual Behavior

I have activated the API Keys with the needed env: ENABLE_API_KEYS="true"

I see the API section from my user and I try to generate a token.
The default JWT token that is appearing doesn't seem to work for me. When I use the default JWT token, I get an 401 unauthorized message.

Generating a new token

Steps to Reproduce

  1. setup jetson orin
  2. install docker related packages

docker run -d --restart always -v /mnt/openwebui:/app/backend/data --network=host -e ENABLE_API_KEYS="true" -e CORS_ALLOW_ORIGIN="https://ai.example.org" --add-host=host.docker.internal:host-gateway ghcr.io/open-webui/open-webui:main

user@jetson:~$ docker inspect 69e
[
    {
        "Id": "69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71",
        "Created": "2026-03-03T05:20:57.650061797Z",
        "Path": "bash",
        "Args": [
            "start.sh"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 1200510,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2026-03-03T05:20:57.717546264Z",
            "FinishedAt": "0001-01-01T00:00:00Z",
            "Health": {
                "Status": "healthy",
                "FailingStreak": 0,
                "Log": [
                    {
                        "Start": "2026-03-05T08:12:06.375651338+01:00",
                        "End": "2026-03-05T08:12:06.490741113+01:00",
                        "ExitCode": 0,
                        "Output": "true\n"
                    },
                    {
                        "Start": "2026-03-05T08:12:36.492432936+01:00",
                        "End": "2026-03-05T08:12:36.595220742+01:00",
                        "ExitCode": 0,
                        "Output": "true\n"
                    },
                    {
                        "Start": "2026-03-05T08:13:06.596567465+01:00",
                        "End": "2026-03-05T08:13:06.700040927+01:00",
                        "ExitCode": 0,
                        "Output": "true\n"
                    },
                    {
                        "Start": "2026-03-05T08:13:36.701598898+01:00",
                        "End": "2026-03-05T08:13:36.805566255+01:00",
                        "ExitCode": 0,
                        "Output": "true\n"
                    },
                    {
                        "Start": "2026-03-05T08:14:06.806584611+01:00",
                        "End": "2026-03-05T08:14:06.905143072+01:00",
                        "ExitCode": 0,
                        "Output": "true\n"
                    }
                ]
            }
        },
        "Image": "sha256:bb3f0281554bf05a9d505ffb5a5f067ab53e13ac772eb4ea3077a92ddc64600e",
        "ResolvConfPath": "/opt/docker/containers/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71/resolv.conf",
        "HostnamePath": "/opt/docker/containers/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71/hostname",
        "HostsPath": "/opt/docker/containers/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71/hosts",
        "LogPath": "/opt/docker/containers/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71-json.log",
        "Name": "/trusting_borg",
        "RestartCount": 0,
        "Driver": "overlayfs",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/mnt/openwebui:/app/backend/data"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "host",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "always",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                25,
                202
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": [
                "host.docker.internal:host-gateway"
            ],
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "nvidia",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": [],
            "BlkioDeviceWriteBps": [],
            "BlkioDeviceReadIOps": [],
            "BlkioDeviceWriteIOps": [],
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": [],
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/acpi",
                "/proc/asound",
                "/proc/interrupts",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/sys/devices/virtual/powercap",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "Storage": {
            "RootFS": {
                "Snapshot": {
                    "Name": "overlayfs"
                }
            }
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/mnt/openwebui",
                "Destination": "/app/backend/data",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "jetson",
            "Domainname": "",
            "User": "0:0",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "CORS_ALLOW_ORIGIN=https://ai.example.org",
                "ENABLE_API_KEYS=true",
                "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANG=C.UTF-8",
                "GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D",
                "PYTHON_VERSION=3.11.14",
                "PYTHON_SHA256=8d3ed8ec5c88c1c95f5e558612a725450d2452813ddad5e58fdb1a53b1209b78",
                "PYTHONUNBUFFERED=1",
                "ENV=prod",
                "PORT=8080",
                "USE_OLLAMA_DOCKER=false",
                "USE_CUDA_DOCKER=false",
                "USE_SLIM_DOCKER=false",
                "USE_CUDA_DOCKER_VER=cu128",
                "USE_EMBEDDING_MODEL_DOCKER=sentence-transformers/all-MiniLM-L6-v2",
                "USE_RERANKING_MODEL_DOCKER=",
                "USE_AUXILIARY_EMBEDDING_MODEL_DOCKER=TaylorAI/bge-micro-v2",
                "OLLAMA_BASE_URL=/ollama",
                "OPENAI_API_BASE_URL=",
                "OPENAI_API_KEY=",
                "WEBUI_SECRET_KEY=",
                "SCARF_NO_ANALYTICS=true",
                "DO_NOT_TRACK=true",
                "ANONYMIZED_TELEMETRY=false",
                "WHISPER_MODEL=base",
                "WHISPER_MODEL_DIR=/app/backend/data/cache/whisper/models",
                "RAG_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2",
                "RAG_RERANKING_MODEL=",
                "AUXILIARY_EMBEDDING_MODEL=TaylorAI/bge-micro-v2",
                "SENTENCE_TRANSFORMERS_HOME=/app/backend/data/cache/embedding/models",
                "TIKTOKEN_ENCODING_NAME=cl100k_base",
                "TIKTOKEN_CACHE_DIR=/app/backend/data/cache/tiktoken",
                "HF_HOME=/app/backend/data/cache/embedding/models",
                "HOME=/root",
                "WEBUI_BUILD_VERSION=79f04379801622181ef9c591374a285eac4e1c4d",
                "DOCKER=true"
            ],
            "Cmd": [
                "bash",
                "start.sh"
            ],
            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "curl --silent --fail http://localhost:${PORT:-8080}/health | jq -ne 'input.status == true' || exit 1"
                ]
            },
            "Image": "ghcr.io/open-webui/open-webui:main",
            "Volumes": null,
            "WorkingDir": "/app/backend",
            "Entrypoint": null,
            "Labels": {
                "org.opencontainers.image.created": "2026-03-02T23:34:15.820Z",
                "org.opencontainers.image.description": "User-friendly AI Interface (Supports Ollama, OpenAI API, ...)",
                "org.opencontainers.image.licenses": "NOASSERTION",
                "org.opencontainers.image.revision": "79f04379801622181ef9c591374a285eac4e1c4d",
                "org.opencontainers.image.source": "https://github.com/open-webui/open-webui",
                "org.opencontainers.image.title": "open-webui",
                "org.opencontainers.image.url": "https://github.com/open-webui/open-webui",
                "org.opencontainers.image.version": "main"
            }
        },
        "NetworkSettings": {
            "SandboxID": "d8fbadde84cb81801b9ca609d264d73e28182920fc4c105f1a416f44a87bf68c",
            "SandboxKey": "/var/run/docker/netns/default",
            "Ports": {},
            "Networks": {
                "host": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [],
                    "DriverOpts": null,
                    "GwPriority": 0,
                    "NetworkID": "0eb5f1a19a6aa7e841b9d763b5db8b80f470585cfbe735a991047f27b1c27045",
                    "EndpointID": "6e2b6970bd088ae6a13ec21df5a29f8739876c7a1d9365f03e2f9eba3658824e",
                    "Gateway": "",
                    "IPAddress": "",
                    "MacAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "DNSNames": null
                }
            }
        },
        "ImageManifestDescriptor": {
            "mediaType": "application/vnd.oci.image.manifest.v1+json",
            "digest": "sha256:060ddb06c8816b214421fcbe41969ac1599c160213cd8b1daed09ec4599e346a",
            "size": 3712,
            "platform": {
                "architecture": "arm64",
                "os": "linux"
            }
        }
    }
]

Logs & Screenshots

Image Image

Firefox console log when pressing the generate button:

XHR
POST
https://ai.example.org/api/v1/auths/api_key
[HTTP/2 403  20ms]

Uncaught (in promise) API key creation is not allowed in the environment. Account.svelte:84:18
    ue Account.svelte:84
    AsyncFunctionThrow self-hosted:784
    (Async: async)
    Nt Account.svelte:412
    s events.js:61
    Mt shared.js:44
    s events.js:60

Additional Information

The docker logs itself dont show information related to the interaction with the generate token button.

Originally created by @g4njawizard on GitHub (Mar 5, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22257 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.8.8 ### Ollama Version (if applicable) _No response_ ### Operating System Linux jetson 5.15.148-tegra ### Browser (if applicable) Firefox 148.0 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Generating Tokens as a user via OpenWebUI ### Actual Behavior I have activated the API Keys with the needed env: `ENABLE_API_KEYS="true"` I see the API section from my user and I try to generate a token. The default JWT token that is appearing doesn't seem to work for me. When I use the default JWT token, I get an 401 unauthorized message. Generating a new token ### Steps to Reproduce 1. setup jetson orin 2. install docker related packages 3. docker run -d --restart always -v /mnt/openwebui:/app/backend/data --network=host -e ENABLE_API_KEYS="true" -e CORS_ALLOW_ORIGIN="https://ai.example.org" --add-host=host.docker.internal:host-gateway ghcr.io/open-webui/open-webui:main ``` user@jetson:~$ docker inspect 69e [ { "Id": "69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71", "Created": "2026-03-03T05:20:57.650061797Z", "Path": "bash", "Args": [ "start.sh" ], "State": { "Status": "running", "Running": true, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 1200510, "ExitCode": 0, "Error": "", "StartedAt": "2026-03-03T05:20:57.717546264Z", "FinishedAt": "0001-01-01T00:00:00Z", "Health": { "Status": "healthy", "FailingStreak": 0, "Log": [ { "Start": "2026-03-05T08:12:06.375651338+01:00", "End": "2026-03-05T08:12:06.490741113+01:00", "ExitCode": 0, "Output": "true\n" }, { "Start": "2026-03-05T08:12:36.492432936+01:00", "End": "2026-03-05T08:12:36.595220742+01:00", "ExitCode": 0, "Output": "true\n" }, { "Start": "2026-03-05T08:13:06.596567465+01:00", "End": "2026-03-05T08:13:06.700040927+01:00", "ExitCode": 0, "Output": "true\n" }, { "Start": "2026-03-05T08:13:36.701598898+01:00", "End": "2026-03-05T08:13:36.805566255+01:00", "ExitCode": 0, "Output": "true\n" }, { "Start": "2026-03-05T08:14:06.806584611+01:00", "End": "2026-03-05T08:14:06.905143072+01:00", "ExitCode": 0, "Output": "true\n" } ] } }, "Image": "sha256:bb3f0281554bf05a9d505ffb5a5f067ab53e13ac772eb4ea3077a92ddc64600e", "ResolvConfPath": "/opt/docker/containers/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71/resolv.conf", "HostnamePath": "/opt/docker/containers/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71/hostname", "HostsPath": "/opt/docker/containers/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71/hosts", "LogPath": "/opt/docker/containers/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71/69e8db52ee515927f3329f508edeb207272d096cdc9e8c745e4ec4e8b50b2a71-json.log", "Name": "/trusting_borg", "RestartCount": 0, "Driver": "overlayfs", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": [ "/mnt/openwebui:/app/backend/data" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "host", "PortBindings": {}, "RestartPolicy": { "Name": "always", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 25, 202 ], "CapAdd": null, "CapDrop": null, "CgroupnsMode": "private", "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": [ "host.docker.internal:host-gateway" ], "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "nvidia", "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": [], "BlkioDeviceReadBps": [], "BlkioDeviceWriteBps": [], "BlkioDeviceReadIOps": [], "BlkioDeviceWriteIOps": [], "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DeviceCgroupRules": null, "DeviceRequests": null, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": null, "PidsLimit": null, "Ulimits": [], "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0, "MaskedPaths": [ "/proc/acpi", "/proc/asound", "/proc/interrupts", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/sched_debug", "/proc/scsi", "/proc/timer_list", "/proc/timer_stats", "/sys/devices/virtual/powercap", "/sys/firmware" ], "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ] }, "Storage": { "RootFS": { "Snapshot": { "Name": "overlayfs" } } }, "Mounts": [ { "Type": "bind", "Source": "/mnt/openwebui", "Destination": "/app/backend/data", "Mode": "", "RW": true, "Propagation": "rprivate" } ], "Config": { "Hostname": "jetson", "Domainname": "", "User": "0:0", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "8080/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "CORS_ALLOW_ORIGIN=https://ai.example.org", "ENABLE_API_KEYS=true", "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=C.UTF-8", "GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D", "PYTHON_VERSION=3.11.14", "PYTHON_SHA256=8d3ed8ec5c88c1c95f5e558612a725450d2452813ddad5e58fdb1a53b1209b78", "PYTHONUNBUFFERED=1", "ENV=prod", "PORT=8080", "USE_OLLAMA_DOCKER=false", "USE_CUDA_DOCKER=false", "USE_SLIM_DOCKER=false", "USE_CUDA_DOCKER_VER=cu128", "USE_EMBEDDING_MODEL_DOCKER=sentence-transformers/all-MiniLM-L6-v2", "USE_RERANKING_MODEL_DOCKER=", "USE_AUXILIARY_EMBEDDING_MODEL_DOCKER=TaylorAI/bge-micro-v2", "OLLAMA_BASE_URL=/ollama", "OPENAI_API_BASE_URL=", "OPENAI_API_KEY=", "WEBUI_SECRET_KEY=", "SCARF_NO_ANALYTICS=true", "DO_NOT_TRACK=true", "ANONYMIZED_TELEMETRY=false", "WHISPER_MODEL=base", "WHISPER_MODEL_DIR=/app/backend/data/cache/whisper/models", "RAG_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2", "RAG_RERANKING_MODEL=", "AUXILIARY_EMBEDDING_MODEL=TaylorAI/bge-micro-v2", "SENTENCE_TRANSFORMERS_HOME=/app/backend/data/cache/embedding/models", "TIKTOKEN_ENCODING_NAME=cl100k_base", "TIKTOKEN_CACHE_DIR=/app/backend/data/cache/tiktoken", "HF_HOME=/app/backend/data/cache/embedding/models", "HOME=/root", "WEBUI_BUILD_VERSION=79f04379801622181ef9c591374a285eac4e1c4d", "DOCKER=true" ], "Cmd": [ "bash", "start.sh" ], "Healthcheck": { "Test": [ "CMD-SHELL", "curl --silent --fail http://localhost:${PORT:-8080}/health | jq -ne 'input.status == true' || exit 1" ] }, "Image": "ghcr.io/open-webui/open-webui:main", "Volumes": null, "WorkingDir": "/app/backend", "Entrypoint": null, "Labels": { "org.opencontainers.image.created": "2026-03-02T23:34:15.820Z", "org.opencontainers.image.description": "User-friendly AI Interface (Supports Ollama, OpenAI API, ...)", "org.opencontainers.image.licenses": "NOASSERTION", "org.opencontainers.image.revision": "79f04379801622181ef9c591374a285eac4e1c4d", "org.opencontainers.image.source": "https://github.com/open-webui/open-webui", "org.opencontainers.image.title": "open-webui", "org.opencontainers.image.url": "https://github.com/open-webui/open-webui", "org.opencontainers.image.version": "main" } }, "NetworkSettings": { "SandboxID": "d8fbadde84cb81801b9ca609d264d73e28182920fc4c105f1a416f44a87bf68c", "SandboxKey": "/var/run/docker/netns/default", "Ports": {}, "Networks": { "host": { "IPAMConfig": null, "Links": null, "Aliases": [], "DriverOpts": null, "GwPriority": 0, "NetworkID": "0eb5f1a19a6aa7e841b9d763b5db8b80f470585cfbe735a991047f27b1c27045", "EndpointID": "6e2b6970bd088ae6a13ec21df5a29f8739876c7a1d9365f03e2f9eba3658824e", "Gateway": "", "IPAddress": "", "MacAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "DNSNames": null } } }, "ImageManifestDescriptor": { "mediaType": "application/vnd.oci.image.manifest.v1+json", "digest": "sha256:060ddb06c8816b214421fcbe41969ac1599c160213cd8b1daed09ec4599e346a", "size": 3712, "platform": { "architecture": "arm64", "os": "linux" } } } ] ``` ### Logs & Screenshots <img width="1413" height="75" alt="Image" src="https://github.com/user-attachments/assets/a564af13-a2d3-4a81-bf99-6dabb1aa101c" /> <img width="1242" height="353" alt="Image" src="https://github.com/user-attachments/assets/4c23eee4-054a-451a-88f1-984084b666ab" /> Firefox console log when pressing the generate button: ``` XHR POST https://ai.example.org/api/v1/auths/api_key [HTTP/2 403 20ms] Uncaught (in promise) API key creation is not allowed in the environment. Account.svelte:84:18 ue Account.svelte:84 AsyncFunctionThrow self-hosted:784 (Async: async) Nt Account.svelte:412 s events.js:61 Mt shared.js:44 s events.js:60 ``` ### Additional Information The docker logs itself dont show information related to the interaction with the generate token button.
GiteaMirror added the bug label 2026-04-25 09:26:30 -05:00
Author
Owner

@Classic298 commented on GitHub (Mar 5, 2026):

Can't reproduce. Mind sharing a small sample snippet of an API call with your admin jwt that doesn't work? I suspect a syntax issue in your api call.

<!-- gh-comment-id:4002948563 --> @Classic298 commented on GitHub (Mar 5, 2026): Can't reproduce. Mind sharing a small sample snippet of an API call with your admin jwt that doesn't work? I suspect a syntax issue in your api call.
Author
Owner

@g4njawizard commented on GitHub (Mar 5, 2026):

Shouldn't I be able to nevertheless generate new tokens if necessary?

DEBUG 2026-03-05T07:24:45 - HTTP Response: POST https://openwebui.example.org/api/chat/completions "401 Unauthorized" Headers({'alt-svc': 'h3=":8433"; ma=2592000', 'content-length': '29', 'content-type': 'application/json', 'date': 'Thu, 05 Mar 2026 06:24:45 GMT', 'server': 'uvicorn', 'via': '1.1 Caddy', 'x-process-time': '0'})

It's an application called mealie. I dont have a proper curl command at hand.

<!-- gh-comment-id:4002976316 --> @g4njawizard commented on GitHub (Mar 5, 2026): Shouldn't I be able to nevertheless generate new tokens if necessary? `DEBUG 2026-03-05T07:24:45 - HTTP Response: POST https://openwebui.example.org/api/chat/completions "401 Unauthorized" Headers({'alt-svc': 'h3=":8433"; ma=2592000', 'content-length': '29', 'content-type': 'application/json', 'date': 'Thu, 05 Mar 2026 06:24:45 GMT', 'server': 'uvicorn', 'via': '1.1 Caddy', 'x-process-time': '0'})` It's an application called mealie. I dont have a proper curl command at hand.
Author
Owner

@g4njawizard commented on GitHub (Mar 5, 2026):

I used the example curl from the docs:

user@jetson:~$ curl -X POST https://openwebui.example.org/api/v1/chat/completions \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijk3ZDdkZDI5LWU4YTAtNDE2ZC1iNTA0LTkzNDhjZTFjZmZmYiIsImV4cCI6MTc3NDI3NTQyOCwianR....tOTEzMjM0ZTgyMjkyIn0.jQ7UrDWxldjN2R3rX06VuFrTi0NrMP-_ry8eAk3YUQU" \
  -H "Content-Type: application/json" \
  -d '{                       
    "model": "ministral-3:3b",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
{"detail":"401 Unauthorized"}
<!-- gh-comment-id:4003013149 --> @g4njawizard commented on GitHub (Mar 5, 2026): I used the example curl from the docs: ``` user@jetson:~$ curl -X POST https://openwebui.example.org/api/v1/chat/completions \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijk3ZDdkZDI5LWU4YTAtNDE2ZC1iNTA0LTkzNDhjZTFjZmZmYiIsImV4cCI6MTc3NDI3NTQyOCwianR....tOTEzMjM0ZTgyMjkyIn0.jQ7UrDWxldjN2R3rX06VuFrTi0NrMP-_ry8eAk3YUQU" \ -H "Content-Type: application/json" \ -d '{ "model": "ministral-3:3b", "messages": [{"role": "user", "content": "Hello!"}] }' {"detail":"401 Unauthorized"} ```
Author
Owner

@Classic298 commented on GitHub (Mar 5, 2026):

I am very sure this will just work. Let me try myself real quick. Chances are you got silently logged out and your JWT is now invalid (hence unauthorized)

<!-- gh-comment-id:4003055154 --> @Classic298 commented on GitHub (Mar 5, 2026): I am very sure this will just work. Let me try myself real quick. Chances are you got silently logged out and your JWT is now invalid (hence unauthorized)
Author
Owner

@g4njawizard commented on GitHub (Mar 5, 2026):

And how am I able to revalidate my token if I am unable to generate a new one?

<!-- gh-comment-id:4003081022 --> @g4njawizard commented on GitHub (Mar 5, 2026): And how am I able to revalidate my token if I am unable to generate a new one?
Author
Owner

@Classic298 commented on GitHub (Mar 5, 2026):

by going to the auth and login endpoints and authenticating there, either with email/password if you configured that or SSO/Oauth

<!-- gh-comment-id:4003095847 --> @Classic298 commented on GitHub (Mar 5, 2026): by going to the auth and login endpoints and authenticating there, either with email/password if you configured that or SSO/Oauth
Author
Owner

@Classic298 commented on GitHub (Mar 5, 2026):

Ok i just ran the same checks, and 5 more, with my Json Web Token, and it just worked.

So your JWT has run out of validity.

<!-- gh-comment-id:4003122702 --> @Classic298 commented on GitHub (Mar 5, 2026): Ok i just ran the same checks, and 5 more, with my Json Web Token, and it just worked. So your JWT has run out of validity.
Author
Owner

@Classic298 commented on GitHub (Mar 5, 2026):

using the JWT for programmatical access is not recommended, use an API Key instead

<!-- gh-comment-id:4003132270 --> @Classic298 commented on GitHub (Mar 5, 2026): using the JWT for programmatical access is not recommended, use an API Key instead
Author
Owner

@Classic298 commented on GitHub (Mar 5, 2026):

Right here in your own screenshot

Image
<!-- gh-comment-id:4003135129 --> @Classic298 commented on GitHub (Mar 5, 2026): Right here in your own screenshot <img width="1166" height="343" alt="Image" src="https://github.com/user-attachments/assets/6086c3c8-24ba-4b5b-9bfb-2b6d0cae7323" />
Author
Owner

@Classic298 commented on GitHub (Mar 5, 2026):

And if you get an error while generating, you need to enable the api keys feature in admin panel > settings > general AND in your default user permissions in admin panel > users > groups

<!-- gh-comment-id:4003139196 --> @Classic298 commented on GitHub (Mar 5, 2026): And if you get an error while generating, you need to enable the api keys feature in admin panel > settings > general **AND** in your default user permissions in admin panel > users > groups
Author
Owner

@g4njawizard commented on GitHub (Mar 5, 2026):

As the doc suggest:
"This system allows users to generate API keys that can authenticate API requests without requiring interactive login sessions"

I dont get why I should not be able to generate tokens for my user, but revalidating my existing single token instead.

As i initially stated, the button u just marked, isn't working for me.

See this console log;

XHR
POST
https://ai.example.org/api/v1/auths/api_key
[HTTP/2 403  20ms]

Uncaught (in promise) API key creation is not allowed in the environment. Account.svelte:84:18
    ue Account.svelte:84
    AsyncFunctionThrow self-hosted:784
    (Async: async)
    Nt Account.svelte:412
    s events.js:61
    Mt shared.js:44
    s events.js:60


<!-- gh-comment-id:4003142412 --> @g4njawizard commented on GitHub (Mar 5, 2026): As the doc suggest: "This system allows users to generate API keys that can authenticate API requests without requiring interactive login sessions" I dont get why I should not be able to generate tokens for my user, but revalidating my existing single token instead. As i initially stated, the button u just marked, isn't working for me. See this console log; ``` XHR POST https://ai.example.org/api/v1/auths/api_key [HTTP/2 403 20ms] Uncaught (in promise) API key creation is not allowed in the environment. Account.svelte:84:18 ue Account.svelte:84 AsyncFunctionThrow self-hosted:784 (Async: async) Nt Account.svelte:412 s events.js:61 Mt shared.js:44 s events.js:60 ```
Author
Owner
<!-- gh-comment-id:4003146476 --> @Classic298 commented on GitHub (Mar 5, 2026): Docs say it here: https://docs.openwebui.com/reference/env-configuration#enable_api_keys https://docs.openwebui.com/reference/monitoring/#authentication-setup-for-api-key- <- here is the full tutorial which you should read https://docs.openwebui.com/reference/env-configuration#user_permissions_features_api_keys
Author
Owner

@Classic298 commented on GitHub (Mar 5, 2026):

@g4njawizard as i said you should follow the tutorial in the docs if you get an issue while generating the api key. Chances are high you misconfigured your open webui or didnt enable the api keys to begin with

"API key creation is not allowed in the environment"

The error message literally says you didn't enable it as per the tutorial and guidance in the docs

<!-- gh-comment-id:4003160079 --> @Classic298 commented on GitHub (Mar 5, 2026): @g4njawizard as i said you should follow the tutorial in the docs if you get an issue while generating the api key. Chances are high you misconfigured your open webui or didnt enable the api keys to begin with > "API key creation is not allowed in the environment" The error message literally says you didn't enable it as per the tutorial and guidance in the docs
Author
Owner

@g4njawizard commented on GitHub (Mar 5, 2026):

Sorry. seems that I have missed step 2 by explicitly granting the default user group api permission. I thought that would be managed by the main system setting.

<!-- gh-comment-id:4003187002 --> @g4njawizard commented on GitHub (Mar 5, 2026): Sorry. seems that I have missed step 2 by explicitly granting the default user group api permission. I thought that would be managed by the main system setting.
Author
Owner

@Classic298 commented on GitHub (Mar 5, 2026):

Glad it's solved!

<!-- gh-comment-id:4003191217 --> @Classic298 commented on GitHub (Mar 5, 2026): Glad it's solved!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35205