Installing the Rocket.Chat Livechat widget on a website

Embed the Rocket.Chat Livechat widget on your site by placing the script, allowing the domain, matching Site URL and proxy names, and clearing CSP and storage errors.

On this page

What the Livechat widget does on your website and when to install it

A support team that wants visitors to reach agents directly from their own website needs the Livechat widget. The widget is a script from the Livechat Installation page in Rocket.Chat that loads a chat window on each page where it is placed. Visitors open the window, start a conversation, and that conversation is routed to an Omnichannel department and its agents. The widget does not create agents, queues or departments. Those already have to exist in the Rocket.Chat workspace before the script is worth adding, so the first decision is whether the department that will answer website chats is set up and staffed.

The widget only works when two conditions hold. First, the domain of the website must be listed in Livechat Allowed Domains, entered without the protocol or trailing slashes. Second, the Site URL in workspace settings must match the address visitors actually use, including the name a reverse proxy presents to them. If the Site URL points at an internal host name, or the public domain differs from the one in the script, the widget loads but fails in use. Before deployment, the team should confirm which public host names front the workspace, which pages will carry the script, and who owns the website's templates and content security policy, since those owners decide whether the script can load at all.

Install the widget when website chat is part of the customer service design for a department, and when the team can staff it during the hours it advertises. The widget is one part of Omnichannel, not the whole setup. Routing rules, SLA policies, business hours, contact records and any chatbot or messaging channel are configured separately, and they change how a chat is handled after the widget delivers it. Teams that plan to add those features should map them before go-live, so that the widget's placement, branding and allowed domains match the wider service model.

Widget configuration options and when each fits

This table compares the four configuration choices that shape a Livechat widget deployment: where the script lives, how many domains are allowed, how Site URL is set, and how the widget is branded. Read each row against your site setup, and treat the right-hand column as the point where the choice starts to matter.

DecisionOptionWhat it changesWhen it fits
Script placementStatic site templateThe script is added once to a shared footer or layout file, so every page loads the widgetA small, mostly static site where one team controls the template and deploys rarely
Script placementCMS or tag managerEditors can add or remove the widget without a code release, but the script may load on pages that should not show itMarketing-led sites with many authors, where page-level rules must be set and reviewed
Allowed domainsOne production domainOnly the live domain can load the widget, so any other origin triggers a CSP or domain errorSingle-brand sites with no staging environment or test traffic
Allowed domainsProduction plus stagingStaging and test hostnames are added without https:// or trailing slashes, which widens the set of origins you must maintainTeams that test widget changes before release and want the same script on both environments
Site URLDirect server addressSite URL matches the Rocket.Chat server the browser reaches, which is simple to verify but exposes the internal host nameTest environments or deployments without a reverse proxy in front of Rocket.Chat
Site URLReverse proxy nameSite URL must match the public name the proxy presents, and the script URL must use the same name, or the widget fails to loadProduction deployments behind a proxy that terminates TLS for a public hostname
BrandingDefault widget brandingThe widget uses standard colors, text and position, so there is less to maintain when Rocket.Chat is upgradedEarly rollouts or internal pilots where visual fit is secondary to speed
BrandingCustom branding through the Widget APIColors, text and layout follow your brand, but custom code must be retested after each Rocket.Chat upgradeCustomer-facing sites where the widget must match the brand and the team can own the upgrade checks

Set up the Livechat widget step by step

This sequence takes the Livechat script from Rocket.Chat's admin area to a working widget on a live page. Each step ends with a check, so a failure is caught at the point where it was introduced rather than during go-live.

  1. Confirm Omnichannel access and copy the script

    An administrator with Omnichannel permissions opens Manage > Omnichannel > Livechat Installation in the Rocket.Chat workspace and copies the Livechat script shown there. Do not edit or retype it, because a single altered character will stop the widget from loading. Confirm that the script references your workspace's own host name, not a generic placeholder. Done means the full script is saved in your change record or ticket, ready to paste into the website template.

  2. Place the script before the closing body tag

    A web developer or the team that owns the site template pastes the script immediately before the closing body tag on the pages where the widget should appear. Placing it in the head or in a page-specific component can work, but the documented location is the one to test first. Check that the script is present once on each page, since duplicates can cause the widget to load twice. Done means the page source shows the script exactly once, directly before the closing body tag.

  3. Add the site domain to allowed domains

    In the same Livechat settings, the administrator adds the site's domain to Livechat Allowed Domains. Enter the bare domain only, such as the host name visitors type, without https:// and without a trailing slash. Add each host the widget must run on, including staging hosts if they will be tested. Done means the domain appears in the allowed list exactly as the browser reports it in the address bar.

  4. Match Site URL to the script or proxy name

    The administrator checks that the Site URL setting in the workspace matches the host name used by the script, including any reverse proxy name that visitors reach. A mismatch between these values is a common cause of a widget that loads but cannot connect. If a reverse proxy rewrites the host, confirm the public name is the one set as Site URL. Done means the Site URL, script URL and public proxy name are identical, with the same scheme and host.

  5. Load a live page and watch the console

    A tester opens the live page in a current browser and checks that the chat launcher appears. The browser developer console should show no content security policy violations, no blocked script errors and no third-party storage warnings. If a violation names a domain that is not in the allowed list, return to the previous step and correct the entry. Done means the widget renders on the page and the console is clean for the full load.

  6. Test a conversation from a visitor session

    The tester opens the widget in a private browsing window, starts a conversation and sends a message. An available agent should receive it in the Omnichannel queue, and the reply should appear in the widget. Repeat the test in a second browser, since storage behavior differs between browsers and privacy modes. Done means a message travels from visitor to agent and back, and the chat is visible in the workspace.

  7. Retest after changes to hosts or proxies

    Whenever a domain, proxy, certificate or Site URL changes, the administrator repeats the console check and the conversation test on each affected host. Record the results in the same change record as the original installation. Confirm the test with your security team if your site policy restricts which script sources can run. Done means every host in the allowed list has a dated, passing result on file.

How Site URL and reverse proxy names must match the script

A mismatch between the Site URL, the script URL and the public proxy name is one of the most common reasons a Livechat widget fails to load. The fix is rarely in the page itself. Start by writing down three values: the Site URL set in Rocket.Chat under workspace settings, the host name in the src attribute of the script you pasted before the closing body tag, and the host name that visitors actually see in their browser address bar when they reach the workspace. All three should resolve to the same public host name, with the same scheme and no path prefix that the other two lack. If the script points at an internal address, a container name or an old host name, visitors will request resources from a location that does not answer.

Reverse proxies and ingress controllers are the usual source of drift. A load balancer that terminates TLS and forwards requests to Rocket.Chat over plain HTTP can pass the internal host name upstream, and some setups rewrite the Host header or add forwarding headers that change what the application believes its own address is. A host name change during a migration, a new certificate with a different name, or a path rewrite added for another application can all break the match without any visible error on the server. After any change to the load balancer or ingress, reload the page in a private browser window, open the browser developer tools, and confirm that the script and widget requests go to the public host name and return successfully.

Confirm these points with the team that owns the load balancer or ingress before you change Rocket.Chat settings: which public host name and scheme are served, whether the Host header and forwarding headers reach the application unchanged, and whether any rewrite or redirect applies to the Rocket.Chat path. Ask them to name the owner of each change and to record it in the same change ticket as the Site URL update. If the proxy host name will change later, plan the Site URL and script update as one step and retest the widget on every page that embeds it, because a stale script on a single site will fail while the rest work.

Fixing CSP and third-party storage errors

Most Livechat widget failures that appear after installation fall into three families: blocked third-party storage, a Site URL that does not match the address the script loads from, and Content Security Policy violations. Each leaves a different trail in the browser console, so check the console message before changing any setting.

Blocked third-party storage

The widget may load but fail to remember the visitor or restore an open chat. The browser console often reports that storage or cookies were blocked for a third-party context. This happens when the visitor's browser or privacy settings block cross-site storage, which the widget relies on. Check whether the failure appears only in certain browsers or privacy modes, and test with a normal profile to confirm the cause. The fix is usually on the visitor side or in how the widget is embedded, so confirm the exact behavior with the vendor's current guidance before promising a change to the site.

Livechat widget docs

Site URL mismatch

The widget can fail when the Site URL in workspace settings does not match the address the script is served from, including a reverse proxy hostname. The console may show requests to an unexpected host or a failed connection to the workspace. Compare the Site URL, the host in the script tag, and the external name your reverse proxy presents to users. Make all three agree, including the scheme and port, then reload the page and retest from a clean session.

CSP blocks from a missing domain

A Content Security Policy on the website can block the widget's scripts, frames or connections. The console shows a violation message naming the blocked resource and the directive involved. The usual cause is that the workspace's address is not allowed in the site's policy, or that the domain is missing from Livechat Allowed Domains. Add the site's domain to Livechat Allowed Domains without https:// or a trailing slash, then update the site's policy with the host the console names. Ask your web team to review the header values, since they vary by site.

Reading the console first

Open the browser developer tools before changing configuration, and record the first error that appears on page load. Storage errors, host mismatches and CSP violations look similar in a support ticket but point to different owners. Note the exact URL, directive and message, then test in a private window and a second browser. This evidence tells your team whether the fix belongs in the workspace, the proxy, or the website.

Changes that need retesting

Each fix touches a different layer: workspace settings, the proxy configuration, or the website's headers and tag placement. A change in one layer can expose a problem in another, so retest after every change rather than batching several. Keep a short change log with the setting, the date and the observed result. Confirm with your own security team that any policy change is reviewed before it reaches production.

Questions teams ask before installing the Livechat widget

What does the internal team need to provide for a Livechat widget install?

The team needs someone who controls the Rocket.Chat workspace administration settings, someone who can edit the templates or tag manager that serve each website, and someone who knows the public address Rocket.Chat is reached at, including any reverse proxy name. The Livechat script goes into the site's pages just before the closing body tag, and the site's domain must be added to Livechat Allowed Domains without https:// or trailing slashes. Confirm with your web and security owners who can change those pages and approve the domain list before work starts, because those approvals often take longer than the configuration itself.

Can a website owner install the Livechat widget alone?

A website owner with admin rights to the Rocket.Chat workspace and edit access to the site can usually complete a basic install alone, since the work is copying a script, listing the domain and testing a chat. It becomes harder when the owner cannot reach the Rocket.Chat administration area, when pages are generated by a platform with its own release process, or when the site sits behind several proxies. Confirm who holds the administrator role and whether a change window or code review applies before deciding to do it in-house.

What makes the widget install take more effort?

Effort rises with the number of sites, the number of different page templates, how strict the content security policy (CSP) is on each site, how many proxy layers sit between visitors and Rocket.Chat, and how much custom branding the widget needs. Each site with its own domain needs its own Allowed Domains entry and its own test pass. A strict CSP can block the widget until the right domain is permitted, and a Site URL that does not match the script URL or reverse proxy name is a common cause of failures. Ask any partner to list each site, template, proxy hop and branding requirement in the written scope.

How long does testing the Livechat widget usually take?

Testing time depends on the environment, so confirm it with your own team and any partner before committing a date. The main variables are the number of sites and browsers to check, how many policy and proxy changes are needed, and whether your security team needs to review the CSP and third-party storage settings first. Ask for the test plan to name the browsers, devices, pages and visitor paths covered, and ask who signs off each stage.

What should a partner quote for a Livechat widget install include?

A written quote should follow from a written scope and list each site and domain in scope, the Rocket.Chat version and hosting model, the reverse proxy and Site URL configuration, CSP changes that need review, branding and Widget API work if requested, and a test plan with defined acceptance checks. It should also say what the client provides, such as access, change approvals and site owners, and what happens if a site template differs from the others. Ask whether the quote covers any follow-up fixes after go-live and whether ongoing support is a separate retainer. DeployOpen does not publish a price list, and its quotes follow from the written scope.

Does the Livechat widget require a paid Rocket.Chat plan?

The widget install itself is part of the Omnichannel feature set, so confirm on the Rocket.Chat plans page whether your plan and workspace include Omnichannel before you start. The free Starter plan allows up to 50 users and the free Community workspace allows up to 100 concurrent users with core messaging, but those plan pages should be checked for Omnichannel availability and your user count. Paid plans are priced by quote, so ask Rocket.Chat directly for the plan that matches your user numbers and deployment model.

What checks should the engineering team run after installing the widget?

Engineers should confirm that the widget loads on every listed domain, that the Site URL matches the script URL and the reverse proxy name, that the browser console shows no CSP violations, and that a chat starts and reaches an agent. Test in browsers that block third-party storage, because blocked storage is a common reason the widget fails to persist sessions. Review the Rocket.Chat Livechat widget installation guide for the exact settings and keep a record of each domain and proxy setting for the next change.

Limits and what to confirm in your environment

The Livechat widget depends on the Rocket.Chat version, the plan you run, where the widget is served from, and how browsers treat third-party storage. Confirm each item against vendor documentation and your own test pages before you add the script to production sites.

Version and docs match

Confirm that the Livechat widget documentation you follow matches the Rocket.Chat version you run. Installation steps, admin menu paths and Widget API options can shift between release lines, and a 7.x guide may not describe 8.x screens. Check the version in your administration panel, then read the Livechat widget page for that line. Because standard releases are supported for 6 months and LTS releases for 12 months, a widget built on an unsupported version may also stop working with cloud services, so confirm the support window first.

Livechat widget docs

Omnichannel availability on your plan

Confirm that Omnichannel, and the Livechat features you plan to use, are included in the plan you hold. The free Starter and Community tiers list their included features, and paid plans are priced by quote, so a widget that works in a test workspace may not match what your production plan allows. Ask the vendor in writing which Omnichannel capabilities your plan includes before you promise the widget to a customer service team.

Rocket.Chat plans

Self-hosted widget origin

Identify where the widget script is served from. A self-hosted Rocket.Chat instance serves its own script URL, which must match the Site URL setting and any reverse proxy hostname. If your deployment sits in an air-gapped network or behind a proxy that rewrites hostnames, test the script load from each real site, because a mismatch fails silently for visitors. Record the exact origin in your change ticket so the CSP and allowed domain entries stay aligned.

Third-party storage in target browsers

Test the widget in every browser your visitors use, with default privacy settings and with the strictest setting your security team permits. Browsers that block third-party storage can stop the widget from keeping a visitor session, which looks like a broken chat rather than a clear error. Run the test on a page under the same domain your customers see, and note which browsers need a documented workaround before you roll out the script across the site.

Widget troubleshooting

Widget API branding options

Confirm which branding and behavior options the Widget API exposes in your Rocket.Chat version before you plan the visual work. Colors, launcher text, greeting messages and visitor fields may be set through settings or through API calls, and not every option is available on every release. Ask your web team to build a test page that uses only the documented calls, and keep custom scripts in your own repository so updates to the widget do not break them.

Content Security Policy scope

Confirm the CSP directives your sites already enforce, and list every domain the widget must load scripts, styles, frames and connections from. A missing allowed domain in your policy produces violations that appear only in the browser console, so the test pages should be checked with developer tools open. Share the list with your security team so the policy change goes through the same review as the rest of your web configuration.

How a visitor's browser loads the widget and reaches an Omnichannel department

The flow starts when a visitor opens a page that carries the Livechat script just before the closing body tag. The browser requests the script from the Rocket.Chat server through the reverse proxy, and the site's domain must already be listed in Livechat Allowed Domains for the page's content security policy to permit the connection. Once the widget runs, it opens a connection back to the Rocket.Chat server, where Omnichannel routes the chat to a department. Check each hand-off, because a mismatched Site URL or a blocked storage path breaks the flow at that point.

Visitor page, reverse proxy and Rocket.Chat hand-offs when the Livechat widget loads.

How DeployOpen scopes and delivers Livechat widget installs

DeployOpen plans and delivers the Livechat widget installation as a fixed-scope piece of work inside your own infrastructure. We agree the domains, Site URL, reverse proxy layout and browser test cases in writing before any change is made to your Rocket.Chat workspace or websites.

How we scope

  • We list every website and subdomain that will load the widget, along with the Rocket.Chat Site URL it must match.
  • We confirm the reverse proxy names, TLS hostnames and any content security policy headers that the widget requests will pass through.
  • We agree in writing which pages, browsers and consent or storage conditions are in scope for testing and handover.

How we build

  • We configure Livechat Allowed Domains and the Livechat Installation script on the workspace and check each site against the documented rules.
  • We test the widget in common browsers with third-party storage both allowed and blocked, and record any CSP violations we find.
  • Where branding or the Widget API is in scope, we build those changes in a staging environment and review them before production.

How we hand over

  • We deliver a written record of the domains, Site URL values, script placement and proxy settings that were applied.
  • We document the test results, known limits such as blocked storage behavior, and the steps your team should repeat after a change.
  • We walk your administrators through the runbook so the widget can be updated, rolled back and checked without us.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer, which covers widget checks after Rocket.Chat upgrades.
  • We recommend retesting the widget after any change to the Site URL, reverse proxy, domain names or content security policy.
  • Ask for a quote built from the written scope, which should name the sites, browsers, branding work and support period.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.