License

GitHubEdit on GitHub

Overview

The complete Univer advanced features require a license to be fully functional. You can activate the paid plan by adding a license to your project, or you can upgrade to a higher plan by updating your license. This page will guide you on how to obtain, configure, and verify your license.

Prerequisites

Before you begin, please ensure that you:

Download License

  1. Visit the License Page and log in to your account

  2. Download the license file Download License

Free Trial License

If you don't have a license yet or are unsure about purchasing one, we offer a 30-day trial license for you to fully experience all the advanced features of Univer.

  1. Visit the License Page and log

  2. Click the "Get Trial License" button Get License

Add or Update License

Unzip the downloaded license file license-univer.zip, and you will obtain license.txt and licenseKey.txt files. Please keep these two files safe and ensure that you do not modify their format and content.

Use License in Client

In Preset Mode

import { UniverSheetsAdvancedPreset } from '@univerjs/preset-sheets-advanced'

const { univerAPI } = createUniver({
  presets: [
    UniverSheetsAdvancedPreset({
      license: `Paste the content from your license.txt here`,
    }),
  ],
})

In Plugin Mode

First, you need to install the @univerjs-pro/license plugin:

npm install @univerjs-pro/license

Then, register the UniverLicensePlugin. Make sure this plugin is registered immediately after the Univer instance is created. Paste the content from your license.txt into the license parameter of the plugin.

import { UniverLicensePlugin } from '@univerjs-pro/license'

univer.registerPlugin(UniverLicensePlugin, {
  license: `Paste the content from your license.txt here`,
})

Use License in Server

  1. Copy the license.txt and licenseKey.txt files to the /univer-server/configs/ directory.
  2. Run the service script bash run.sh in the univer-server directory to restart the universer service.
  1. Execute the following command
helm upgrade --install -n univer --create-namespace \
--set global.istioNamespace="univer" \
--set-file universer.license.licenseV2=$(YOUR_LICENSE_TXT_PATH) \
--set-file universer.license.licenseKeyV2=$(YOUR_LICENSE_KEY_TXT_PATH) \
univer-stack oci://univer-acr-registry.cn-shenzhen.cr.aliyuncs.com/helm-charts/univer-stack

Verify License

Verify License in JavaScript/TypeScript Project

  1. After injecting the license into the frontend, start the project to verify whether the license is valid and correctly used. Note: If the license is not entered or the entered license is invalid (e.g., expired or incorrect content), some features will be restricted, and a watermark will be displayed on the page. Frontend License Verification Failed

  2. When a valid license is entered, the project will run normally without any restrictions. Frontend License Verification Successful

Verify License in Univer Server

Access host:8000/universer-api/license/key to view the license entitlement information. For example, if your service is running locally, visit http://localhost:8000/universer-api/license/key.

{
  "verify": "true", // License verification result
  "release_type": "COMMERCIAL" // License type
}

Backend License Verification

Common Issues

  1. If the license verification fails, please check:
    • Whether the license file is complete and has not been modified
    • Whether the license has expired
    • Whether the service has been restarted correctly
  2. If you encounter other issues, please contact our technical support