<!-- Public documentation export; not library implementation source. -->
# Installation and asset hosting

Lumen Charts is proprietary software. This site gives you technical documentation and an interactive demo to try it out. It is not a public library download or source repository, and there is no public npm install command. Two parts are the exception: the [AI integration SDK](https://docs.lumencharts.com/charting-library/automation/) and the [trading platform](https://docs.lumencharts.com/charting-library/trading/) are open source under the Apache License 2.0 and install from npm.

## Runtime access

To use the chart in production you need [a licence](https://lumencharts.com/pricing), which gives you the runtime and its matching TypeScript declarations as a download from your account. The runtime is a minified production build without source maps; the declarations describe the whole public API. It makes no network calls of its own and needs no licence key. Source code is not part of a standard licence; ask us about Enterprise if you need it.

You can try the chart in the [interactive demo](https://docs.lumencharts.com/demo/) without installing anything. The demo loads compiled browser files so it can run in your browser. That doesn't give permission to reuse or redistribute them.

The hosting steps below apply once you have an authorized copy. Serve the files over HTTP; opening the page as a `file:` URL won't work.

## Directory layout

```text
index.html
your-datafeed.js
lumen_charting_library/
  lumen_charting_library.js
  lumen_charting_library.inner.js
  lumen_charting_library.inner.css
  assets/
    chart-automation.js           # automation runtime, loaded by openAutomation()
    chart-trading.js              # trading runtime, loaded by loadTrading()
    chart-trading.css
  bundles/                       # optional Pine assets
  lumen_charting_library.d.ts
  datafeed-api.d.ts
```

Set `library_path` to the runtime folder, including the trailing slash. The script URL and `library_path` must point to the same release. Serve JavaScript and CSS with the correct MIME types, and return a real 404 for missing files. If your server returns an HTML page in place of a missing script, the chart will fail to start.

## Automation runtime

Every release includes `assets/chart-automation.js`. Host it with the other files and keep it from the same build as the core. The chart downloads it only on the first `openAutomation()` or `widget.loadAutomation()` call, so charts that never use automation never load it. The SDK that drives it is open source and installs from npm; shipping the runtime file doesn't import the SDK or configure an AI provider. See [AI integration](https://docs.lumencharts.com/charting-library/automation/) for the product boundaries and SDK setup.

## Trading runtime

Every release also includes `assets/chart-trading.js` and `assets/chart-trading.css`. Host them with the other files, from the same build as the core. The chart downloads them only when you call `widget.loadTrading()`, so charts without trading never load them. See [Trading](https://docs.lumencharts.com/charting-library/trading/) to connect a broker.

## Base paths and caching

If your app lives under `/terminal/`, use `/terminal/lumen_charting_library/` or another path that resolves to the same place. Putting the version in the path lets you cache files forever without mixing an old wrapper with new inner files. Deploy all the files together in one step, and keep the previous release around so you can roll back.

To start, serve the runtime files from the same origin as your app. Moving them to a CDN means also handling iframe access, CSS, worker loading and CSP. Moving images to another host is fine, but that doesn't mean the runtime scripts can move safely too.

## Content security policy

Right now the startup script writes the iframe document and uses inline startup configuration. Test your app's script, frame and style policies against the actual release rather than copying a strict generic policy. Optional Pine also needs permission to run a worker. If something is blocked, don't turn off CSP entirely. Find the blocked resource in the browser console and allow only what it needs.

[Show your first chart →](https://docs.lumencharts.com/charting-library/getting-started/quickstart)

---
Documentation page: https://docs.lumencharts.com/charting-library/getting-started/installation
