--- title: "Rocket Chat CDN Setup for Faster Secure Messaging" slug: "cdn" description: "Configure a CDN for Rocket Chat to deliver faster, secure messaging. Improve resilience, performance, and mission-critical collaboration across global deployments." updated: 2026-05-28T01:22:48Z published: 2026-05-28T01:22:48Z canonical: "docs.rocket.chat/cdn" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # CDN Content Delivery Networks (CDNs) are an essential tool for efficiently delivering static assets such as JavaScript, CSS, and images to users. Rocket.Chat supports CDN to serve static assets to its workspace. This guide will provide a detailed overview of how to set up a CDN in Rocket.Chat and troubleshoot any issues that may arise. > [!WARNING] > If an incorrect or non-functional CDN prefix is configured, your Rocket.Chat workspace may become inaccessible because required frontend assets will fail to load. ## Configure CDN settings To configure CDN in Rocket.Chat: 1. Go to **Manage** ![Screenshot 2025-12-23 130522.png](https://cdn.us.document360.io/6ae79a05-7252-45d0-96e8-8f375e07b1b2/Images/Documentation/Screenshot%202025-12-23%20130522.png) **> Workspace > Settings > General.** 2. Update these settings as required: | Settings | Description | | --- | --- | | CDN prefix | The CDN prefix defines the base path used to load static assets. The value you set will determine how asset URLs are generated. For example: - **cdn**: /cdn/example-asset.js - **http://cdn.domain.com**: http://cdn.domain.com/example-asset.js - **https://cdn.domain.com**: https://cdn.domain.com/example-asset.js | | Use CDN prefix for all assets | Enable this setting to serve all static assets (including JS, CSS, and images) through the configured CDN. | | CDN Prefix for JS/CSS | Apply a CDN prefix only to JavaScript and CSS assets. It uses the same format as the **CDN Prefix setting** but is limited to JS and CSS files. | ## Troubleshooting If an incorrect CDN configuration prevents your workspace from loading, you may lose access to the Administration UI. In such cases, you can recover access using one of the following methods. ### Option 1: Reset via database You can directly update the MongoDB database to clear the CDN configuration and restore default values. Run the following commands: ```bash db.rocketchat_settings.update({_id:"CDN_PREFIX"},{$set:{"value":""}}) db.rocketchat_settings.update({_id:"CDN_JSCSS_PREFIX"},{$set:{"value":""}}) ``` This resets both the CDN prefix and the JS/CSS prefix to their default empty values, restoring normal asset delivery. ### Option 2: Use a URL rewrite browser extension If database access is not immediately possible, a browser extension can be used to rewrite CDN URLs back to the original Rocket.Chat server URL. Use this approach with caution and ensure the extension is trusted and secure.