App template
LobeChat
A chatbot interface that keeps chats in each browser, behind an access code.
- Memory when idle
- about 180 MiB
- CI measures it once the app is ready and before any traffic. Leave room for more.
- Tested on
- x86 servers
Introduction
LobeChat is a chat interface for AI models. It keeps each person’s chats in their own browser.
This template runs LobeChat behind your domain. An access code protects the page, and the server uses the OpenAI API key you chose in the install form. There are no user accounts.
Values you provide
OpenAI API key secretRequired
Pre-existing Secret with key api-key for the OpenAI provider.
Made for you
These values are generated at deploy and kept in a Kubernetes Secret, shown as Secret/key.
- lobechat-secrets/access-code
Getting started
-
In Zeabur OSS, open the
lobechatservice. When Overview shows its replica as ready, the service is up. Its domain is on the Networking tab under Public domains, for examplechat.example.com. -
When LobeChat asks for the access code, enter it. To read it, open Variables, click
lobechat-secretsunder From config files and secrets, and click the eye icon next toaccess-code. Without Zeabur OSS, read Secretlobechat-secrets, keyaccess-code, with kubectl:kubectl -n <namespace> get secret lobechat-secrets -o jsonpath='{.data.access-code}' | base64 -d -
Start a chat. The chats use the OpenAI key from the Secret you chose in the install form, key
api-key. Each person’s chat history stays in their own browser.
Configuration
Change the access code
On the service’s Variables tab, click lobechat-secrets, enter a new value for access-code, then review and apply. The running replica keeps the old code until you click Restart at the top of the service page. Tell everyone who uses the page the new code. See ACCESS_CODE.
Change the OpenAI API key
On the service’s Variables tab, click the Secret you chose in the install form, enter a new value for api-key, then review and apply. Click Restart at the top of the service page so the replica reads it.
See OPENAI_API_KEY.
Troubleshooting
The page shows 502 or does not load
Open the lobechat service in Zeabur OSS. Check that Overview shows its replica as ready, then read the Logs tab. If the replica is not ready, open Deployments and switch to Events. If Events show OOMKilled, the service ran out of memory. Raise Maximum memory under Settings → Compute. If the domain or the certificate stays pending, see Troubleshooting on the domains page.
Without Zeabur OSS, read the logs with kubectl -n <namespace> logs deployment/lobechat and the events with kubectl -n <namespace> get events --sort-by=.lastTimestamp.
See Adjust replicas, resources, and health checks and View logs, events, and usage, and open a terminal in the Zeabur OSS docs.
A chat fails with a model provider error
The server sends chats to OpenAI with the key api-key from the Secret you chose in the install form. When a chat fails, read the Logs tab of the lobechat service, then check three things. The key must be valid. The model you picked must be available to that key. And your account must not be over its rate limit or quota at OpenAI. See OPENAI_API_KEY in the LobeChat docs.
Resources
Each service is guaranteed the first amount and can use up to the second.
lobechat
Ports
3210
CPU
0.1 cores to 2 cores
Memory
256 MiB to 2 GiB
Technical details
This release
- Version
- 1.143.3
- Licence
- LicenseRef-LobeHub-Community
- Homepage
- github.com
- Source file
- templates/lobechat/template.yaml @ v0.6.3
Tested in CI
CI installs these exact files on a new cluster, waits until they are ready, then records the idle memory.
| Distribution | Platform | Kubernetes | Passed | Idle memory |
|---|---|---|---|---|
| kind | linux/amd64 | v1.37.0 | 175 MiB |
Security
LobeChat runs as non-root with a read-only root filesystem and the restricted Pod Security level. It has no Kubernetes token, and ingress uses TLS. Outbound traffic is not limited.
Known risks
Risk
The LobeHub Community License limits how you may distribute derivative works.
How it is handled
The template description names the license. The template runs the unmodified image with its notices intact. Get commercial permission before you distribute a derivative.
Risk
Everyone who knows the shared access code uses the same instance and the same model key, and the server pays for it.
How it is handled
Share a deployment only with users who trust each other. The code is generated with high entropy, the upstream sign-in protection is on, and ingress allows TLS only.
What the cluster needs
Zeabur OSS suggests the components a cluster is missing. Without it, install them first.