Guide

How to add live chat to your website

Adding live chat comes down to four steps: stand up a chat server, create a widget in the dashboard, paste one snippet into your pages, and answer your first conversation. With a self-hosted tool like DChat the server and the data are yours; the snippet on your site is the only public piece.

Step 1. Install the chat server

Download the package and install the server on the platform you already run: Windows with IIS, Linux with Nginx, or Docker. Run the included SQL scripts to create the database on your own SQL Server. The free localhost evaluation lets you do this on your own machine first, with no license and no public server required.

Step 2. Create your widget

Sign in to the dashboard and set up the widget: colors and greeting to match your brand, the pre-chat fields you want to collect, operating hours, and the department that new chats route to. If you want the AI chatbot to answer first, load a few knowledge-base articles and enable it here.

Step 3. Paste one snippet

The dashboard generates a small script snippet. Paste it into your site template just before the closing body tag so the launcher appears on every page. On WordPress, add it in your theme footer or a header-and-footer plugin; on a hand-built site, add it to the shared layout. No other page changes are needed.

Step 4. Test and go live

Open your site, click the launcher, and start a chat as a visitor. Answer it from the browser dashboard or the Windows desktop console, then confirm the transcript and satisfaction rating are stored in your database. Once that round trip works, you are live.

Try it on localhost

Practice the whole setup for free

The download is the free product itself, with no licence file, so you can install the server, build a widget, and answer a test chat entirely on your own machine before putting it on a live site.

Add chat to any site in three steps

The widget is a single script tag served by your own DChat server, so the integration is the same whatever your site is built with.

  1. 1. Copy the embed code from your dashboard

    Open Widget Builder in the DChat dashboard, set the accent colour, position and greeting, and copy the generated snippet. It already contains your server address.

    <script src="https://YOUR-SERVER/widget/zchat.iife.js"
            data-server-url="https://YOUR-SERVER"
            data-site-id="default"></script>
  2. 2. Paste it before the closing body tag

    Put it in your shared layout, template or footer include so it appears on every page, rather than pasting it page by page. Placement at the end of the body keeps it out of the render path; the script is async in any case.

  3. 3. Load a page and check the launcher

    The chat button should appear in the corner within a second. If it does not, open the browser console and confirm that /widget/zchat.iife.js returned 200 and that the page and the server URL share the same scheme.

    Then sign in to the dashboard, set yourself Online in Live Chat, and start a conversation from the widget to prove the round trip end to end.

Questions we get asked

Where exactly do I put the script tag?

Immediately before the closing body tag, on every page where you want chat available. If your site has a shared layout, footer include or template, put it there once rather than on each page.

Do I need a plugin or a package?

No. It is one script tag served from your own DChat server. There is nothing to install, no build step and no npm dependency.

Will it slow my pages down?

The bundle is roughly 29 KB gzipped and loads asynchronously, so it does not block rendering. It is served from your own server, which also means one fewer third-party domain on your critical path.

How do I check it is working?

Load a page with the tag and the launcher should appear in the corner. If nothing shows, check that /widget/zchat.iife.js returns 200 from your server and that the page and the server URL use the same scheme - a browser blocks an insecure script on a secure page.

Can I change the colour and position?

Yes, with attributes on the same tag: data-primary-color and data-position, plus data-greeting and data-offline-message. The dashboard's widget builder generates the whole snippet with a live preview.

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.