open-webui / open-webui/computer
bug: Connections (API keys) become permanently invalid after every `cptr run` restart due to JWT secret regeneration
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 569
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
Description
Every time cptr run is restarted, all previously configured Connections (including their encrypted API keys) become permanently unusable. Attempting to view, edit, verify, or even delete the affected connections triggers a 500 Internal Server Error, and the model list becomes empty ("沒有可用模型" / "No available models").
Steps to Reproduce
- Run
cptr runand complete initial setup. - Go to Settings → Connections, add a new connection (e.g. Ollama,
http://<host>:11434), fill in API key, verify successfully, save. - Confirm the model list populates correctly and the connection works as expected.
- Stop the process (Ctrl+C) and run
cptr runagain. - Open the same workspace. The model list is now empty.
- Open the previously working connection under Settings → Connections and click "Verify" or just reload the Connections page.
Expected Behavior
Connections and their encrypted credentials should persist across restarts, as long as the workspace directory (and its .cptr/ folder) has not been deleted.
Actual Behavior
- Model dropdown shows "No available models".
- Opening the connections list triggers backend errors.
- Server-side log shows:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the cptr run entry point and inspect how the JWT secret and workspace .cptr/ state are initialized across restarts. Reproduce the connection failure after restarting, then verify that existing connections, encrypted API keys, and the model list remain usable without deleting the workspace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100