On-premise reference docs
If you require Redocly API reference docs to be deployed on-premise, such as due to specific security constraints, you are available to do that on our Enterprise plan via 3 mechanisms:
- Using a JavaScript CDN link (easiest)
- Using a CLI tool to build static documentation (medium)
- Using Docker (more difficult and not recommended)
You will need these services:
- Web server or CDN (for the JavaScript library or to host the static files generated by the CLI).
- Node v12 or higher (to build static files for the CLI).
Local development server
If you want to run the development server, you may do so with the Starter plan or greater as part of our openapi-cli
tool with the preview-docs
command (after you login
). See more information here:
On-premise license key
To start using Redocly API reference docs on-premise, you need to have a license key. To discuss our Enterprise pricing or request a license key, please contact us at team@redoc.ly.
If you already have an Enterprise account with access to the Redocly Workflows app, you can generate the license key for your organization. Your account must have the Owner role in the app.
To generate the license key, log into Redocly Workflows and access the Org settings > On-premise license keys page. On this page, select the Generate license key button. If you have previously generated a license key, it is displayed on the page along with its expiration date and the list of allowed domains. In this case, select the Regenerate license key button to generate a new one.
When (re)generating a key, you can add up to 10 domain names to the allowlist. All subdomains of an added domain are included by default. Select the Add domains button under the active license key to add more domain names. Note that you can't edit previously added domains for the active license key. To change those domains, you have to generate a new license key.
Any previously generated keys are listed on the page in the History section. You can remove those keys from the list after they expire by selecting the recycle bin icon next to each key in the list.
Every license key is a base64-encoded string containing information about the expiration date and allowed domains. To start using the license key you've generated, copy it from the On-premise license keys page and save it for future use. The key doesn't need to be encrypted and can be stored in a plain text file.
After you've obtained the license key, you can start using Redocly API reference docs on-premise in one of the following ways:
To deploy Reference docs using Docker, contact us at team@redoc.ly to see if you have the proper indications for that.
JS library
When using the JavaScript library from CDN, provide the license key in the options
argument of RedoclyReferenceDocs.init
call:
RedoclyReferenceDocs.init('<path to api definition>', {
licenseKey: '<license-key-here>',
}, document.querySelector('#redocly_container'))
CLI
There are two ways to provide a license key when using the CLI:
- Using an environment variable
REDOCLY_LICENSE_KEY
. - Using the
.redocly.yaml
configuration file.
The @redocly/reference-docs
CLI will search for this .redocly.yaml
file in the current working directory with the license specified in the following format:
referenceDocs:
licenseKey: "<license-key-here>"
Example to set the license key as an environment variable:
REDOCLY_LICENSE_KEY=<license-key-here> reference-docs bundle openapi.yaml