Skip to content

General

How to Self-Host a Claude Chat Interface

Run your own Claude chat interface with an Anthropic API key: choosing an interface, Docker setup, HTTPS, users, costs, privacy, team use and fixes.

"Self-hosted Claude" usually means one thing: you run the chat interface yourself and send your messages to Claude through Anthropic's API with your own key. The model itself stays with Anthropic. Claude's weights are not published, so nobody can download and run Claude on their own hardware. What you control is everything around the model: where the interface lives, where your conversation history is stored, who can sign in, and how much you spend.

This guide explains how that works, which open-source interfaces you can host and how they differ, how to set one up step by step with Docker, HTTPS, users and backups, how to estimate and cap costs, what Anthropic still sees, how to run it for a team, and how to fix the errors people hit most. At the end it covers what MultitaskAI, which used to sell a self-hosted chat app, offers today.

What you control when you self-host

A self-hosted Claude setup has three parts:

  1. The interface. A web app you deploy on your own server, a static host or your laptop.
  2. Your API key. Created in the Anthropic Console. Requests are billed to your account per token, not as a monthly seat.
  3. Your data. Conversations are stored wherever the interface stores them: in your browser, in a database you run, or nowhere.

Requests still travel to Anthropic, so a self-hosted interface is not an offline setup. It does give you a few things the Claude apps do not: one interface for several providers, your own retention rules, access control that fits your team, and costs that follow actual use.

Three ways to reach Claude

The model always runs on infrastructure you do not own, but you can choose whose:

  • Anthropic's API directly. The simplest route: one account, one key, the newest features first.
  • A cloud platform. Claude is also offered through cloud providers such as Amazon Bedrock and Google Cloud Vertex AI. If your company already has agreements, billing and data residency settled with one of them, calling Claude through that account can make compliance easier. Feature availability can lag behind Anthropic's own API, so check before you rely on something new.
  • A gateway. Tools such as LiteLLM sit between your interface and several providers, translating requests and adding logging and budgets. Useful when you run many providers or interfaces; one more service to maintain when you do not.

What you give up

The Claude apps include features that live in Anthropic's products, not in the API: their projects, memory, desktop and mobile apps, and built-in integrations. A self-hosted interface may rebuild some of these, but not all, and not in the same way. You also become the operator: updates, backups and security are your job now. If you mainly want something other than Claude's own apps without running a server, our overview of Claude alternatives may fit better.

Choosing an interface

Several maintained open-source projects work with Claude. They differ mainly in how they talk to Anthropic, how heavy they are to run, and how much team management they offer. Check each project's documentation for its current provider list and licence before you deploy it for a team; licence terms in this space have changed over time.

LibreChat

LibreChat supports Anthropic, OpenAI, Google and other providers in one interface, with user accounts, conversation search and presets. It is usually deployed with Docker Compose.

  • Strengths: a native Anthropic endpoint, so Claude-specific options are handled properly; native endpoints for Amazon Bedrock and other providers; agents; a librechat.yaml file for custom endpoints and interface settings; single sign-on options; and support for MCP servers, both local and remote over Streamable HTTP.
  • Trade-offs: it runs several containers (the app, MongoDB, a search service and optional retrieval services), so there is more to back up and update.

LobeChat

LobeChat is a multi-provider chat app with a plugin system that can be deployed with Docker or on a serverless host.

  • Strengths: a polished interface, Anthropic among many supported providers, and a light deployment if you only need it for yourself.
  • Trade-offs: features depend on the deployment mode, for example whether history lives in the browser or in a server database. Read its deployment guide closely before using it for a team.

Open WebUI

Open WebUI focuses on local models through Ollama and on OpenAI-compatible APIs. It is a single container with user groups, per-model access and native MCP support over Streamable HTTP.

  • Reaching Claude: Anthropic offers an OpenAI SDK compatibility endpoint, so you can add it as an OpenAI-compatible connection. Anthropic positions that layer mainly for testing and comparison, and some features, such as prompt caching and extended thinking output, are not available through it. For daily use, a gateway in front of the native API or one of Open WebUI's community add-ons for Anthropic is more robust.
  • Best for: setups where local models are the main use and Claude is one option among several.

Build a small interface yourself

If you only need a simple chat window, the Anthropic SDKs for TypeScript and Python make a minimal interface a small project: a page that sends the conversation to your own backend, and a backend that calls the Messages API with the key and streams the answer back. Keep the key on the server. A key shipped to the browser can be copied by anyone who opens the page.

How to decide

  • A team that wants Claude and other providers in one ChatGPT-like interface: LibreChat.
  • A personal setup with a clean look: LobeChat.
  • Local models first, Claude occasionally: Open WebUI with a gateway.
  • Full control over a narrow use case: your own small app on the SDK.

Step-by-step setup

The steps below use LibreChat as the example, because it talks to Anthropic natively. The same order applies to the other projects: key, host, containers, providers, users, HTTPS, backups, updates.

1. Create an Anthropic API key

  1. Sign up for the Anthropic Console and add billing. The API is paid for separately from Claude's consumer and team plans, usually with prepaid credits.
  2. Create a workspace for this interface, so its keys, usage and limits are kept apart from other projects.
  3. Create an API key in that workspace and store it in a password manager. You will not see it again in full.
  4. Set a spend limit for the workspace, and consider turning off automatic credit reloads until you know your usage.

Keys deserve the same care as passwords. Our guide to API key management covers storage, rotation and what to do when one leaks.

2. Pick where it runs

  • Your laptop is fine for trying it out or personal use.
  • A small Linux server with Docker is enough for a team, because Claude does the heavy lifting at Anthropic. LibreChat's database and search service want a few gigabytes of memory between them.
  • A managed host with a ready-made template saves server work. Check where it stores your database and volumes, and whether you can export them.

3. Install and start LibreChat

Install Docker and the Compose plugin, then follow LibreChat's quick start: clone its repository, copy .env.example to .env, and start the stack with docker compose up -d. The relevant part of .env looks like this:

Code
ANTHROPIC_API_KEY=sk-ant-your-key-here
DOMAIN_CLIENT=https://chat.example.com
DOMAIN_SERVER=https://chat.example.com
ALLOW_REGISTRATION=true
  • Replace the example secrets. The example file includes placeholder values for the keys LibreChat uses to sign sessions and encrypt stored credentials. Generate your own before anyone signs in, and keep them stable, or stored credentials and sessions stop working.
  • Do not edit the main compose file. LibreChat expects local changes in an override file, which keeps updates clean.
  • Bind the app to localhost in your override if the server is on the internet, so only the reverse proxy can reach it.

Open the interface, register your own account, and check that Claude models appear in the model menu and answer a test message.

4. Configure providers and models

LibreChat reads provider settings from .env and from librechat.yaml, which you mount into the container:

  • Anthropic. With ANTHROPIC_API_KEY set, the Anthropic endpoint appears. You can restrict which Claude models are listed, so people do not default to the most expensive one.
  • Other providers. Add keys for OpenAI or Google if you want them in the same interface, or set a provider's key to user_provided so each user enters their own.
  • Cloud platforms. If your company calls Claude through Amazon Bedrock, configure LibreChat's Bedrock endpoint with that account's credentials instead of an Anthropic key.
  • Custom endpoints. Gateways and local model servers that speak the OpenAI format go into librechat.yaml as custom endpoints.

Restart the stack after changing either file.

5. Users and authentication

  • Close registration. Once your account and any initial users exist, set ALLOW_REGISTRATION=false and restart. Otherwise anyone who finds the URL can sign up and spend your credits.
  • Use single sign-on for teams. LibreChat supports OAuth and OpenID Connect providers and LDAP. Access then follows your company accounts, and removing a leaver's account removes their access.
  • Limit admin rights. Only the people who maintain the instance need them.
  • Consider a private network. If it is only for your team, a VPN or a zero-trust access proxy in front of it removes most of the exposure.

6. HTTPS with a reverse proxy

Put a reverse proxy in front of the app to terminate TLS. Caddy obtains and renews certificates automatically. Point chat.example.com at your server, then:

Code
chat.example.com {
    reverse_proxy 127.0.0.1:3080
}

Use the port your LibreChat instance actually listens on; check your compose file. With nginx or Traefik, turn off response buffering for the app and raise the read timeout, because Claude's replies stream and long answers can take a while. Make sure DOMAIN_CLIENT and DOMAIN_SERVER match the public HTTPS address, or sign-in redirects will fail.

7. Backups

  • The database. LibreChat keeps users, conversations and settings in MongoDB. Back it up regularly with mongodump from the MongoDB container.
  • Configuration. Keep copies of .env, librechat.yaml and your override file. Without the encryption secrets in .env, stored user credentials in a restored database are unreadable.
  • Uploads. Back up the folders where uploaded files and images are stored.
  • Off-site, encrypted, tested. Copy backups to another location, encrypt them because they contain every conversation, and restore one to a test instance at least once.

8. Updates

  1. Read the release notes, especially before major versions; configuration options do change.
  2. Take a backup.
  3. Pull the repository, then run docker compose pull and docker compose up -d.
  4. Test sign-in, a Claude conversation and any connected tools.

Update regularly. An internet-facing app that is never updated collects known vulnerabilities.

What it costs

How Anthropic bills the API

You pay per token, with separate rates for input and output, and different rates per model. Larger, more capable models cost more per token than smaller, faster ones. The current rates are on Anthropic's pricing page; check them there, because they change.

Three things drive most of the bill:

  • Conversation length. The whole conversation is sent with every message, so the twentieth reply in a thread pays for the nineteen before it as input.
  • Attachments. Long PDFs, pasted code and images all count as input, every time the thread continues.
  • Model choice. Using the largest model for everything is the quickest way to overspend.

The API supports prompt caching, which makes repeated prompt prefixes cheaper on later requests. Whether you benefit depends on whether your interface uses it, which is one reason to prefer interfaces with a native Anthropic integration.

Estimating your usage

  1. Estimate messages per person per working day.
  2. Estimate average input per request, including history, system prompt and attachments, and average output.
  3. Multiply by people and days for a month, and by the per-token rates of the models you plan to use.
  4. Run a two-week trial with a spend limit and compare the Console's usage page with your estimate.

Token counts per word vary by language and content, so treat any characters-per-token rule of thumb as rough. The Console shows real token counts per request, which beats any estimate.

Capping spend

  • Spend limits in the Console per workspace stop a runaway month.
  • A cheaper default model for routine work, with the larger ones available on request.
  • Model restrictions in the interface, so the most expensive models are only listed for some users.
  • New chats for new topics, and summaries instead of endless threads.
  • One key per interface, so you can see and revoke each source of spend separately.

Privacy and compliance

What Anthropic still sees

Every message you send to Claude, including attachments, is processed by Anthropic or by the cloud platform you use.

  • Training. Anthropic's commercial terms state that it does not train models on API inputs and outputs by default. Read the current terms before you send sensitive data.
  • Retention. API data may be kept for a limited period, for example for safety and abuse monitoring, with different rules for flagged content. Zero data retention arrangements exist for eligible customers. Check the current data retention policy and your agreement rather than assuming.
  • Contracts. For personal data, review Anthropic's data processing terms, or the cloud platform's if you go through one, and list the provider as a processor.

What you now hold

  • History. Your database now holds every conversation. Decide on a retention period and delete old conversations on a schedule if your policy requires it.
  • Logs. Application, proxy and container logs can contain prompts at debug level. Keep production logs at normal levels and rotate them.
  • Keys and secrets. The Anthropic key and the interface's own secrets live on your server. Restrict who can log in to it.
  • Uploads and indexes. Uploaded files and any vector index built from them count as stored data too.

When data must stay inside your network

Claude is the wrong model for that requirement, because every request leaves your network. Open-weight models you run on your own hardware are the alternative, and many teams run both: a local model for restricted data and Claude for everything else. Our guide to local AI models compares the tools that run them, such as Ollama and LM Studio. For Google's models in a similar setup, see our self-hosted Gemini guide.

Running it for a team

  • Agree on what may be pasted. A short written policy beats guesswork: customer data, credentials and confidential documents either go to an approved model or nowhere.
  • Share good starting points. Presets and shared prompts with a sensible system prompt and default model give everyone consistent results.
  • Give the instance an owner who applies updates, watches the Console's usage page and handles access requests.
  • Keep a test instance with its own key for trying updates and new settings.
  • Review spend monthly by workspace and model, and adjust defaults when one model dominates the bill.

Troubleshooting common errors

401 authentication error

The key is missing, wrong or revoked. Check .env for stray spaces or quotes, confirm the variable name, restart the stack, and check in the Console that the key still exists and belongs to the workspace you expect.

"Your credit balance is too low"

The account has run out of prepaid credits. Add credits in the Console's billing settings, or enable automatic reloads with a limit you are comfortable with.

429 rate limit error

You are sending more requests or tokens per minute than your account's limits allow, or a spend limit has been reached. Retry after a short wait, spread heavy jobs out, and check your limits in the Console. Limits usually increase as an account's usage history grows.

529 overloaded error

Anthropic's API is temporarily overloaded. This is on the provider side; retry after a moment. Interfaces with automatic retries handle it for you.

Answers stop halfway or arrive all at once

The reverse proxy is buffering or timing out the streamed response. Turn off buffering and raise the read timeout.

Sign-in loops or redirects to the wrong address

DOMAIN_CLIENT and DOMAIN_SERVER do not match the public URL, or the proxy does not pass the original host and protocol. Fix the values and restart.

"Prompt is too long"

The conversation and attachments exceed what the model accepts. Start a new chat, or summarise the thread and continue from the summary.

Claude models missing from the menu

The Anthropic key is not set, the model list in your configuration excludes them, or a model name changed. Check .env and librechat.yaml against the current model names in Anthropic's documentation.

What happened to MultitaskAI's self-hosted app

MultitaskAI used to be a chat interface that ran entirely in the browser. You brought your own API keys for OpenAI, Anthropic and Google, bought a licence once, and could download the app as a ZIP file and host it on any static host. Your chats stayed in the browser's IndexedDB storage, and requests went straight to the provider.

That app is retired. MultitaskAI is now a remote MCP server: one endpoint that gives AI agents 166 exact tools, such as DNS, WHOIS and SSL lookups, JSON repair, regex testing, conversions and image resizing, that they can call while they work. You do not host it yourself. You add it to the AI client you already use. New to MCP? Start with what an MCP server is, or browse the tools.

Give Claude tools with MultitaskAI

Claude supports the Model Context Protocol (MCP), the open standard for connecting assistants to tools. Once you add MultitaskAI as a connector, Claude can call its tools in a conversation, for example to check a domain's DNS records or convert a file, instead of guessing.

  • In the Claude apps, follow Connect MultitaskAI to Claude. Connectors sign in with OAuth.
  • In the terminal, follow Connect MultitaskAI to Claude Code. Editors and CLIs use an API key.
  • In your self-hosted interface. LibreChat and Open WebUI both support remote MCP servers over Streamable HTTP, so you can add MultitaskAI to your own instance and give Claude the same tools there. See the docs for the endpoint and other clients for the general setup.

Every signed-in account gets 100 free requests a day, reset at midnight UTC. MultitaskAI Pro removes the limit for €9 a month. Pricing has the details.

Frequently asked questions

Can I run Claude on my own server?

No. Anthropic does not release Claude's weights, so Claude only runs on Anthropic's infrastructure and through cloud platforms that offer it. You can self-host the interface, not the model.

Do I need a Claude subscription to self-host an interface?

No. The API is billed separately from Claude's consumer and team plans. You need an Anthropic Console account with billing set up and an API key.

Is a self-hosted interface more private than the Claude apps?

It changes where your history is stored and who can reach the interface. Your messages are still processed by Anthropic, under the API terms rather than the consumer terms.

Which open-source interface works best with Claude?

One with a native Anthropic integration, such as LibreChat or LobeChat, handles Claude-specific features better than a generic OpenAI-compatible connection. Open WebUI works well if local models are your main use and you reach Claude through a gateway.

Is the API cheaper than a Claude plan?

It depends on use. Light or irregular use often costs less on the API; heavy daily use with long conversations and large models can cost more. Run a trial month with a spend limit and compare.

Can I use Claude through AWS or Google Cloud instead?

Yes. Claude is available through Amazon Bedrock and Google Cloud Vertex AI, among others, and interfaces such as LibreChat can connect to Bedrock. This can help when your company's contracts and data residency are already settled with that cloud.

Do I need a GPU?

No. Claude runs at Anthropic, so the server only hosts the interface and its database. You need a GPU only if you also run local models.

Is the old MultitaskAI app still sold?

No. The browser app is retired and no longer sold or developed. MultitaskAI now provides tools for agents through MCP.

Give your agent 433 tools in a minute

Connect MultitaskAI to your MCP client and ask in plain words. 100 requests a day are free.