Guide

How to set up an AI chatbot with Ollama

You can run the DChat AI agent on a local model with Ollama, so both your chat data and your AI inference stay on your own hardware. This guide covers installing a model, connecting it, grounding it in your knowledge base, and handing off to a human, five steps to a private support bot.

How it ships: the visitor-facing assistant sits behind its own setting, separate from the chatbot itself - both off by default. Enable both and the widget offers the assistant whenever no agent is available; the engine is also exposed as an API for custom placements. The same model powers agent reply suggestions with no extra wiring.

Step 1. Install Ollama and a model

Install Ollama on a machine your chat server can reach, on the same box or elsewhere on your network, and pull a local model. Because inference runs on your own hardware, no customer message is sent to an outside AI service, which is the point of running the bot locally.

Step 2. Connect it to the chat server

In the dashboard, choose Ollama as the AI provider and point it at your Ollama endpoint and model name. Prefer a hosted model instead? The same setting also supports your own OpenAI or Anthropic keys, so you can switch providers without changing anything else.

Step 3. Ground it in your knowledge base

Add knowledge-base articles covering your product, policies, and common questions. The chatbot answers from that content rather than guessing, so its responses match how your team actually answers.

Step 4. Set human handoff

Decide when the bot should escalate to a person, for example when a visitor asks for a human or the question falls outside the knowledge base. On handoff the full transcript goes to the agent, so the customer never has to repeat themselves.

Step 5. Test and enable

Ask the bot several real questions, confirm the answers are accurate and the handoff works, then enable it on your live widget. The bot is optional and off by default, so nothing goes live until you switch it on.

Private by design

Keep the whole conversation in-house

With Ollama the model runs on your hardware and the chat server runs on your infrastructure, so a support conversation, and the AI that handles it, never leaves your control. Try the whole setup free on localhost first.

Running the assistant on your own hardware

Ollama runs a language model on a machine you control. Pointing DChat at it gives you an AI first responder whose conversations never leave your network.

  1. 1. Install Ollama and pull a model

    Install Ollama on the DChat server or another machine it can reach, then pull a model. A mid-sized instruction model is usually the right starting point: large enough to answer support questions from your documentation, small enough to respond quickly on CPU or a modest GPU.

    ollama pull llama3.1
    ollama serve
  2. 2. Point DChat at it

    In the dashboard open AI Chatbot, choose the Ollama provider, and give it the address Ollama is listening on and the model name you pulled. Save.

  3. 3. Write the knowledge base

    Open Knowledge Base and add Markdown articles covering what customers actually ask - pricing, installation, requirements, common errors. The assistant answers from these, so this step decides whether it is useful or vague.

    Changes are picked up without restarting the server.

  4. 4. Decide when it hands over

    Configure when the bot should stop and fetch a human. The conversation context transfers with the handoff, so the agent sees what was already said and the visitor does not start over.

  5. 5. Turn it on and test it

    Enable the assistant, then open the widget and ask it something your knowledge base covers, and something it does not. The second case matters more: confirm it hands over cleanly instead of inventing an answer.

Questions we get asked

Is the AI chatbot enabled by default?

No. It is disabled until you enable it and choose a provider, so a fresh install never sends anything to a model.

Why run the model locally instead of using a hosted API?

Because the conversation never leaves your network. With Ollama on your own hardware there is no third-party API call, no per-token bill, and no vendor holding your customers' support conversations - which is usually the reason self-hosted teams rule out AI chat entirely.

What does the assistant answer from?

A knowledge base you maintain in the dashboard as Markdown files. The assistant answers from that content, so its accuracy is a function of what you write rather than of what a model happens to know about your product.

What happens when the bot cannot answer?

It hands the conversation to a human and carries the context across, so the visitor does not repeat themselves. You can also let visitors ask for a person at any point.

Can I use a hosted model instead?

Yes. OpenAI and Anthropic providers are supported as well, and you bring your own account - there is no DChat AI subscription in between. The trade-off is the one above: convenience versus conversations leaving your network.

Self-hosted customer support software

Deploy live chat on your own terms, not on someone else's pricing model.

DChat gives you the installable server, web dashboard, website widget, and desktop agent tools in one self-hosted product, with live chat free to run, and an AI agent that answers, acts with the approvals you set and hands off to your team when you want one. Run it on infrastructure you trust, on the model you choose.

Deployment

Install on Windows or Linux, behind IIS or Nginx, in a VM, or in Docker if that fits your stack.

Commercial model

Live chat is free with unlimited agents. Premium, with the AI agent, is billed per agent per month, never per conversation.

AI Flexibility

Run the AI agent on a local Ollama model, or connect OpenAI and Anthropic with your own provider accounts.