To install LobeChat, create a lobehub folder, run the official setup script, and start the stack with docker compose up -d. Then open http://localhost:3210, create your account, and connect one model provider in App Settings. The self-hosted software has no licence fee for unmodified commercial use under the LobeHub Community License. LobeChat does not run models itself, so connect a cloud API key or a local Ollama server before your first chat.
You want one AI assistant workspace for your business. You do not want a different chat app for every model, and you do not want your team history locked inside someone else’s product.
LobeChat, now developed as LobeHub, gives you that workspace on a server you control. This guide shows how to install LobeChat self hosted AI assistant with Docker Compose, create your first account, connect a model provider or local Ollama, secure the setup, back it up, update it, and fix the errors that stop most first installs.
Quick Answer
To install LobeChat, create a lobehub folder, run the official setup script, and start the stack with docker compose up -d. Then open http://localhost:3210, create your account, and connect one model provider in App Settings. The self-hosted software has no licence fee for unmodified commercial use under the LobeHub Community License. LobeChat does not run models itself, so connect a cloud API key or a local Ollama server before your first chat.
In this article
- How we checked this guide
- What LobeChat replaces, and what it does not
- Docker Compose, one-click deploy, or local development
- Requirements before you install LobeChat
- Step 1: install LobeChat with Docker Compose
- Step 2: create your first account
- Step 3: connect a model provider and send your first chat
- Step 4: connect Ollama for local models
- First-run security steps you must not skip
- Make LobeChat useful for real work
- Backup and update routine
- Common errors and fixes
- Tips and tricks that save time
- The real cost maths: LobeChat versus ChatGPT Plus
- When not to self-host LobeChat
- Pros and cons
- Our verdict
- FAQ
- Strategic Pivot: price the whole stack before you switch
- Sources
How we checked this guide
We checked the install commands, deployment modes, ports, resource requirements, backup commands, and troubleshooting steps on the official LobeHub Docker Compose guide. We checked the self-hosting summary on the official LobeHub GitHub repository.
We checked the licence in the official LICENSE file in that repository. We checked provider setup, local Ollama support, and provider troubleshooting on the official LobeHub model providers guide. We checked account and registration controls on the official authentication guide. The paid comparison uses OpenAI’s official Help Center page. That page lists ChatGPT Plus at $20 a month, billed monthly. It also states that API usage is separate and billed independently.
What LobeChat replaces, and what it does not
LobeChat replaces the scattered chat windows. One workspace can hold your agents, conversations, and model choices, instead of a separate app for every model family. The official providers guide says you can choose a model provider for each Agent. You can also connect a local inference service.
The key limit is simple. LobeChat is the assistant workspace, not the model. The model still runs somewhere. It runs at a cloud provider through an API key, or on your own hardware through a local service such as Ollama, LM Studio, or vLLM. Do not judge LobeChat as if it were a model.
That split is the whole buying decision. LobeChat controls the workspace, agents, accounts, and model choices. The provider controls model quality, speed, and API billing. A local endpoint controls privacy and hardware cost. A local model also does not make the whole workflow private by itself, because cloud sync, search, and other connectors can still transmit data.
Best for: a small-business owner, freelancer, or team lead who wants a polished self-hosted assistant workspace with agents, several model providers, and the option to run routine work on local models. Skip if: you want a light desktop app with no server to maintain, or you need a plain permissive licence for distributing a modified product.
LobeChat sits in the middle of our local-AI series. Our guide to install Ollama on Ubuntu covers the local model runner LobeChat can connect to. Our guide to install Open WebUI with Ollama covers a different browser front end. Our guide to install llama.cpp for local LLM on CPU covers the engine layer.
Our guides to install GPT4All for private offline AI chat and install Jan AI desktop for local models cover friendlier desktop apps. Our guide to install LocalAI as a self hosted OpenAI alternative covers an API-first server. Our guide to install Text Generation WebUI for local LLMs covers a control-heavy local workspace. Our guide to install LibreChat self hosted AI chat covers a multi-user chat workspace. Choose LobeChat when agents, provider choice, and a polished assistant workspace matter most.
Docker Compose, one-click deploy, or local development
Docker Compose is the right first install for most readers. The official repository marks it as the recommended self-hosting route. It starts LobeHub with PostgreSQL, Redis, RustFS file storage, SearXNG search, and the agent gateway.

The one-click deploy route puts LobeChat on a cloud platform such as Vercel, Zeabur, Sealos, RepoCloud, or Alibaba Cloud. Vercel needs a PostgreSQL database, S3-compatible storage, and a few secrets before you deploy. One-click moves that work to cloud services.
Local development runs the code directly for contributors, using pnpm and Bun commands. Choose that route only when you plan to change LobeChat code.
| Route | Best for | What you manage | Main trade-off |
|---|---|---|---|
| Docker Compose | First install, small team, home server, or VPS | Docker, .env, database, storage, and updates | Several services run together |
| One-click deploy | Teams that prefer managed cloud hosting | Cloud database, S3 storage, and secrets | More external services to configure |
| Local development | Contributors changing the code | Node tooling, database, and dev services | Not a production rollout route |
Best for: Docker Compose fits a first business test and a small team rollout on a machine you control. Skip if: you want the vendor to run everything, or you need to modify and redistribute the product. Start with the route your team can maintain.
Requirements before you install LobeChat
Install Docker and Docker Compose first. The official guide supports Unix environments, meaning Linux and macOS. Windows users must run through WSL 2, in a Linux terminal.
Check the server size before you start. The official minimum is 2 CPU cores, 4 GB of RAM, and 20 GB of storage for light usage. Production use needs 4 or more cores, 8 GB or more of RAM, and 50 GB or more of storage, depending on file uploads.
Check the ports before you start. Ports 3210, 9000, 9001, 8787, and 8788 must be available. Port 3210 serves the app. The other ports serve file storage and the agent gateway.
Understand the three core services. The database version needs the LobeHub service itself, a PostgreSQL database with the PGVector plugin, and S3-protocol object storage. The Compose stack supplies these pieces together, with RustFS as the default local S3 storage. You still own the data inside them.
Prepare one model route before your first chat. LobeChat needs a provider API key or a local inference server. A cloud key is the fastest first test. A local Ollama server is the private route, and it needs hardware sized for the model. LobeChat itself does not need a GPU.
Step 1: install LobeChat with Docker Compose
Create a folder for the install and move into it. The official guide uses a lobehub directory to store configuration files and later database files:

mkdir lobehub && cd lobehubRun the official setup script in English:
bash <(curl -fsSL https://lobe.li/setup.sh) -l enRead the script prompts before you press Enter. Local Mode is the default. It is accessible only locally and suits a first test. Port Mode supports LAN or public HTTP access by server IP and port. Domain Mode supports LAN or public access with a reverse proxy.
Choose Local Mode for your first install. Press Enter to accept the default configuration where the guide tells you to continue with defaults. Move to Port Mode or Domain Mode after the first chat works. Do not stack public-access decisions on top of a first install.
Check the configuration generation report when the script finishes. It includes service URLs and passwords, including RustFS credentials and the Agent Gateway URL. Save it somewhere private. Never paste your .env file or generated passwords into a public issue, chat, or screenshot.
Start the stack:
docker compose up -dCheck the logs:
docker logs -f lobehubA successful start shows database migration messages, a migration pass message, and the app ready on port 3210. If the logs stop at a database error, fix that error before you touch provider settings. The app cannot save accounts or conversations without its database.
Open http://localhost:3210 in your browser. You should see the LobeChat sign-in or account screen. If the page does not load, check that the containers are running and port 3210 is free.
Step 2: create your first account
Create your own account first, before you invite anyone else. Use a real email address that you control. Password reset, magic link login, and email verification depend on a working mailbox.
LobeChat uses Better Auth for authentication. It supports email and password login, optional email verification, magic links, and OAuth or SSO providers such as Google and GitHub. For a first local test, email and password is enough. Add SSO later.
Set the required authentication values in .env. AUTH_SECRET is required. It encrypts session tokens, and the guide gives openssl rand -base64 32 as the generation command. APP_URL is also required. OAuth callbacks and trusted origins depend on it.
Restrict registration before other people can reach the server. AUTH_ALLOWED_EMAILS is a comma-separated list of allowed emails or domains. It restricts registration, but it does not verify email ownership. Combine it with AUTH_EMAIL_VERIFICATION=1 when ownership matters. Verification needs SMTP.
Test the account like a user. Sign out, sign back in, and confirm the workspace loads. Test password reset only if you configured email delivery. A login that works once is not a finished account system.
Step 3: connect a model provider and send your first chat
Open App Settings, then AI Providers. Select a provider and turn on its switch. Enter the credentials shown on the page. Most cloud providers use an API key. Some also need a region or endpoint.
Use the Check action before you chat. A failed check tells you the key, endpoint, or account access needs work before you blame the chat screen.
Enable a model in the model list. You can fetch or add models when those actions are available. Changes save automatically. Then select the provider and model in the Agent settings.
Keep the first test small. Ask for a one-sentence summary of a paragraph you paste in. Confirm the answer returns, the conversation saves, and a refresh keeps the history. That test proves the app, database, provider key, and model choice work together.
If the provider check fails, read the error plainly. The official troubleshooting section lists three common causes. A connection error or invalid key often means extra spaces in the key or the wrong key type. A missing model can mean your account tier excludes it or the provider retired it. A rate limit error means you reached the provider limit. Fix the named cause, then run Check again.
Step 4: connect Ollama for local models
Install Ollama first, then connect it as a local provider. Our guide to install Ollama on Ubuntu covers the runner setup. Pull one model that fits your hardware before you configure LobeChat.

Open App Settings, then AI Providers, and select Ollama. It sits under local and self-hosted inference, alongside LM Studio and vLLM. Turn the provider on, enter the Ollama server address, and run Check.
Enable the local model in the model list. Then select that provider and model in the Agent settings. Send the same short summary test you used for the cloud provider. Compare speed and quality on the same task.
Remember the privacy limit. Local inference usually avoids cloud model API charges, but hardware and operation still cost money. A local model also does not make the entire workflow private or offline. Cloud sync, search, and other connectors can still transmit data. Check each connector before you send sensitive business documents through it.
Use local and cloud models for different jobs. Put routine drafts, summaries, and internal notes on the local model when quality passes your test. Keep hard reasoning or customer-facing work on the stronger hosted model when the local answer is not good enough.
First-run security steps you must not skip
Keep the first install in Local Mode until the basics pass. Move to Port Mode or Domain Mode only after accounts, providers, backups, and updates work. Public access is a separate project.
Regenerate secure keys for Port Mode and Domain Mode. The official guide highly recommends it in both modes. If your deployment still carries an example key value, replace it before public use.
Replace the example JWKS_KEY if your .env still holds it. The upgrade section warns that the old example value lets anyone forge tokens your deployment accepts. Generate a new key pair and replace both JWKS_KEY and JWKS_PUBLIC_KEY. Desktop and CLI clients may need to sign in again afterwards.
Set INTERNAL_APP_URL for Docker Compose deployments. It is required. Async features, such as AI image generation, need the container to reach itself internally. Without it, a host IP address can make async features fail silently. Use http://localhost:3210.
Configure file storage for browsers, not only for containers. S3_ENDPOINT=http://rustfs:9000 breaks conversation image uploads, because browsers cannot resolve container names. Set a browser-reachable S3 address. The server reaches RustFS internally through S3_INTERNAL_ENDPOINT.
Put HTTPS in front of a public install. Domain Mode needs reverse-proxy mappings for the app on 3210, S3 on 9000, and the gateway on 8787. The gateway proxy must allow WebSocket upgrades. Use a valid certificate.
Close the registration door before you share the address. Set AUTH_ALLOWED_EMAILS to your team domains or named addresses. Turn on email verification when ownership matters. Keep the RustFS admin password and generated secrets out of screenshots.
Make LobeChat useful for real work
Create one Agent per job, not one Agent for everything. A drafting Agent can use a fast local model. A research Agent can use a stronger hosted model. A support-draft Agent can use the model that follows your tone best.
Test each Agent on real work before the team depends on it. Use a real product description, a real customer question, and a real internal note. Score the answers for accuracy, tone, and editing time. An Agent that creates correction work does not earn its place.
Compare providers on cost, latency, and quality. Run the same task through two configured providers and record the result. Choose the cheaper provider only when answer quality holds. Cheap and wrong is still wrong.
Add marketplace tools one at a time. Add one tool, test it on a low-risk task, and check what data it can reach. A tool that can read files or call external services changes your risk. Treat each addition as a small deployment.
Keep a simple operating note for your team. Write down which Agent to use for each job, which model it runs, and what data must never go into it. Update that note when you change a provider.
Backup and update routine
Back up three things: the database, the file storage, and the configuration. The database holds accounts and conversations. RustFS holds uploaded files. The .env file and docker-compose.yml hold the settings and secrets. A backup that misses one is partial.
Back up the PostgreSQL database with the official command:
docker compose exec postgresql pg_dump -U postgres lobechat > backup.sqlCheck the database name in your own Compose file before you restore. The official restore command sends the backup back through psql:
docker compose exec -T postgresql psql -U postgres lobechat < backup.sqlBack up RustFS file storage with the official archive steps:
docker compose exec rustfs tar czf /tmp/backup.tar.gz /data
docker cp lobe-rustfs:/tmp/backup.tar.gz ./rustfs-backup.tar.gzCopy .env and docker-compose.yml to the same backup folder. Store the backup outside the server, and keep the .env copy private. Test the restore path before you need it during an outage.
Update with the official management commands:
docker compose pull && docker compose up -dBack up before every update. The official images run database schema migration automatically before starting. Automatic migration is helpful, and it is still a change to your only copy of team data if you skip the backup.
Follow the upgrade section when you move to a newer Compose file. Back up .env, download the new file, and add the gateway variables before you start. Until then, the gateway keeps restarting and logs print ACTION REQUIRED. Recreate the stack afterwards:
docker compose up -d --force-recreateKeep a short update log. Write the date, the backup file name, and whether the first chat test passed after the update.
Common errors and fixes
A service will not start
Check service status and logs first:
docker compose ps
docker compose logsThe official troubleshooting section lists three common causes. A port is already in use, the disk is full, or the database connection failed. For a port clash, the guide points to the LOBE_PORT value in .env. Fix the named cause, then start the stack again.
The database connection fails
Verify PostgreSQL health directly:
docker compose exec postgresql pg_isready -U postgresIf PostgreSQL is unhealthy, read its logs with docker compose logs postgresql. Do not delete database files as a first fix. The migration FAQ gives a force-remove path for table creation trouble, and that path removes mounted database data. Use it only on a fresh test install with no data worth keeping.
File uploads fail
Check the RustFS services:
docker compose logs rustfs
docker compose logs rustfs-initThe guide says rustfs-init applies the bucket CORS rule that browser uploads need. If browser uploads fail with a network error, recreate that init service:
docker compose up -d --force-recreate rustfs-initAlso check your S3_ENDPOINT value. A container-internal address breaks conversation image uploads, because the browser cannot resolve it. Set a browser-reachable S3 address, then test an upload again.
Async features fail silently
Check INTERNAL_APP_URL. The guide says async features such as AI image generation need the container to make HTTP requests to itself. When APP_URL is a host IP address, the container may not reach it internally, and image generation can fail without a clear error. Set INTERNAL_APP_URL=http://localhost:3210 for the standard Compose path.
The gateway keeps restarting
Read the upgrade section before you restart containers at random. A newer Compose file adds a gateway service that needs new .env values. Until they are set, the gateway keeps restarting, agent runs fall back to the browser, and the logs print an ACTION REQUIRED warning. Add the gateway variables, replace any example JWKS_KEY, and recreate the stack.
A provider check fails
Check the API key for extra spaces. Confirm the key type matches the provider. Confirm the model is available to your account tier, because providers retire models and limit access by tier. If the error is a rate limit, reduce the request rate, use another configured provider, or review the provider upgrade options.
The disk fills up
Check Docker disk usage with docker system df. Back up the database, RustFS files, and .env before you clean anything. The guide gives a prune command for unused resources, and it warns you to back up first. Treat volume cleanup as a destructive action, not housekeeping.
Tips and tricks that save time
Start in Local Mode, even when the final goal is a team domain. Move to Domain Mode after accounts, providers, uploads, and backups pass. Each move then changes one layer at a time.
Connect one provider first. Run Check, enable one model, and send one short test. Add Ollama or a second cloud provider only after that path works. A second provider added during a failure gives you two unknowns instead of one.
Use per-Agent models on purpose. Put cheap routine work on a local or low-cost model. Put hard work on the model that passes your quality test. Review the split monthly.
Name Agents by the job they do. A name like “Product description draft” tells a new team member more than a clever persona name. Keep the model choice and the data rule in the Agent description.
Back up before updates, and test after updates. Run the same short summary test after every update. Check one upload and one saved conversation. A stack that starts is not the same as a workspace that works.
The real cost maths: LobeChat versus ChatGPT Plus
The self-hosted LobeChat software has no licence fee for unmodified commercial use under the LobeHub Community License. ChatGPT Plus costs $20 a month, billed monthly, on OpenAI’s official Help Center page. That is $240 a year for one person.

Use a realistic solo scenario first. You already own a machine that meets the LobeChat requirements. You connect a local Ollama model, and your own test shows it handles routine drafts, summaries, and internal notes well enough to replace one ChatGPT Plus subscription.
| Choice | Software cost per year | What the number leaves out |
|---|---|---|
| LobeChat with local Ollama on a machine you already own | $0 | Electricity, hardware limits, update time, and model quality |
| One ChatGPT Plus subscription | $240 | Hosted model access and OpenAI’s service operation |
| Software saving | $240 | Only real if the local workflow replaces the paid work |
The maths is plain. One seat at $20 a month costs $240 a year. LobeChat software costs $0 in licence fees in that scenario. The solo software saving is $240 a year, before electricity, hardware wear, and your time.
The team maths is larger, and the condition is stricter. Five ChatGPT Plus seats cost $100 a month, which is $1,200 a year. LobeChat software still costs $0 in licence fees. The $1,200 saving is real only when your local workflow replaces the work those five subscriptions were doing. Test the team workflow before you cancel anything.
The saving shrinks when cloud APIs enter the picture. OpenAI states that API usage is separate from ChatGPT Plus and billed independently. If your team still needs hosted frontier models through an API, LobeChat becomes the workspace and the API becomes the bill. That can still be the right choice. It is not a $240 or $1,200 saving until your usage proves it.
Server cost decides many real cases. If you must rent a server, subtract your actual server quote from the software saving. If you already own a suitable machine, the software saving stands, and electricity and maintenance time become the honest costs.
The licence needs plain words. The LobeHub Community License is based on Apache License 2.0, with added conditions. It allows commercial use, including as a frontend and backend service, without modifying the source code. Developing and distributing a derivative work based on LobeChat needs a commercial licence from the producer. That is not the same as a plain MIT licence. Read the licence of each model and provider you connect as well. This guide is not legal advice.
When not to self-host LobeChat
Do not self-host LobeChat when nobody on the team will maintain it. PostgreSQL, RustFS storage, the gateway, provider keys, backups, and updates need an owner. A hosted subscription is the better buy when the honest answer is “no one will look after the server.”
Do not choose LobeChat when you want a model included. LobeChat is the workspace, not the model. If you want an offline desktop app with models inside one installer, start with GPT4All or Jan instead.
Do not choose LobeChat when your plan depends on distributing a modified version. The Community License requires a commercial licence for developing and distributing a derivative work. If that is your business model, get the licence question settled before you build on the code.
Do not expose LobeChat to the internet as a casual experiment. Public access needs HTTPS, restricted registration, strong secrets, correct S3 and gateway domains, updates, and a plan for abuse. If you cannot maintain those pieces, keep the install local.
Do not ignore model quality. A private wrong answer is still a wrong answer. Test LobeChat on your real tasks, with your real documents, before you move customer work, legal work, medical work, or financial work to a local model.
Pros and cons
Pros: No licence fee for unmodified commercial use under the Community License; Docker Compose bundles PostgreSQL, Redis, RustFS, SearXNG, and the agent gateway; one workspace for cloud providers and local Ollama, LM Studio, or vLLM models; per-Agent model choice for different jobs; Better Auth email login with optional SSO and registration restrictions; official backup, update, and troubleshooting commands.
Cons: LobeChat does not run models, so provider or local endpoint setup is required; the stack is heavier than a desktop app, with a database, S3-style storage, and gateway to maintain; cloud API usage bills separately from subscriptions; the Community License is not a plain MIT licence, and distributing a derivative needs a commercial licence; public deployment needs correct APP_URL, S3, gateway, and HTTPS configuration; model quality depends on the provider or local model you connect.
Our verdict
Install LobeChat if you want a polished self-hosted assistant workspace with agents and several model providers, and you are willing to own the server behind it. Start with Docker Compose in Local Mode, one account, restricted registration, and one provider. Add Ollama after the first chat works. Move the team over only when your own tasks prove the workflow saves money or time.
FAQ
Is LobeChat free for business use?
The self-hosted software has no licence fee for commercial use without modifying the source code, under the LobeHub Community License. Developing and distributing a derivative work needs a commercial licence from the producer. Cloud API usage and server costs still bill separately.
Does LobeChat need a GPU?
No. LobeChat does not run AI models itself, so it does not need a GPU. The official minimum is 2 CPU cores, 4 GB of RAM, and 20 GB of storage. If you connect a local model through Ollama, size the hardware for that model instead.
How do I install LobeChat with Docker Compose?
Create a lobehub folder, run the official setup script, and start the stack with docker compose up -d. Open http://localhost:3210, create your account, and connect a model provider or local Ollama server in App Settings.
Why do my file uploads fail?
Check the RustFS services and the rustfs-init logs. The init service applies the bucket CORS rule browser uploads need. Also check S3_ENDPOINT. A container-internal address breaks conversation image uploads, because browsers cannot resolve container names.
Is LobeChat safe to expose on the internet?
Not by default. Keep the first install local. For public use, regenerate secure keys, replace any example JWKS_KEY, restrict registration, serve the app over HTTPS, and configure the S3 and gateway domains correctly. Test backups and updates before the team depends on it.
Strategic Pivot: price the whole stack before you switch
LobeChat can remove duplicate chat subscriptions from a team workflow. It does not price the rest of your AI stack, and the rest is where small businesses quietly overspend. Before you cancel or renew any plan, put the tools, seats, and monthly prices you actually use into our AI Cost Calculator and look at the yearly total.
Then decide with the number in front of you. Move steady assistant work to LobeChat when your own test proves the workflow works. Keep the hosted plan that earns its cost. Cancel the line that survives only because nobody added it up.
Sources
- LobeHub official GitHub repository
- LobeHub official Docker Compose guide
- LobeHub official model providers guide
- LobeHub official authentication guide
- OpenAI Help Center: What is ChatGPT Plus?
Price note — updated 1 December 2026: Prices in this post were checked on 1 December 2026. When you are reading this, the price may be lower or higher — always check the official pricing page before you buy.
Pros
- No licence fee for unmodified commercial use under the Community License
- Docker Compose bundles PostgreSQL, Redis, RustFS, SearXNG, and the agent gateway
- One workspace for cloud providers and local Ollama, LM Studio, or vLLM models
- Per-Agent model choice for different jobs
- Better Auth email login with optional SSO and registration restrictions
- Official backup, update, and troubleshooting commands
Cons
- LobeChat does not run models, so provider or local endpoint setup is required
- The stack is heavier than a desktop app, with a database, S3-style storage, and gateway to maintain
- Cloud API usage bills separately from subscriptions
- The Community License is not a plain MIT licence, and distributing a derivative needs a commercial licence
- Public deployment needs correct APP_URL, S3, gateway, and HTTPS configuration
- Model quality depends on the provider or local model you connect
Install LobeChat if you want a polished self-hosted assistant workspace with agents and several model providers, and you are willing to own the server behind it. Start with Docker Compose in Local Mode, one account, restricted registration, and one provider. Add Ollama after the first chat works.
