> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/cdf/4.0/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/cdf/4.0/nats_server.md).

# Adding a NATS server

Charging Data Function (CDF) stores charging data in NATS.
If CDF is not part of a Cennso installation where NATS is included, you must add a NATS server before starting CDF.

## Helm

CDF needs a dependable data store for charging data.
The default [NATS cluster installation](https://docs.nats.io/running-a-nats-service/nats-kubernetes) provides this when JetStream is enabled.
CDF support Helm chart has an entry for NATS.
You  must set **nats.enabled** to true for a standalone NATS server.
You must supply a value for **nats.config.jetstream.fileStore.pvc.size**.
Size should be big enough for streams, consumers and buckets.
The stream size calculation is described [here](https://docs.cennso.com/components/cdf/4.0/recommendation.md).
The additional space needed for consumers and buckets is 1 Mb.

If you want to change the defaults, read [the applicable documentation](https://github.com/nats-io/k8s/blob/main/helm/charts/nats/README.md).

## Installed NATS

The installed NATS server is available as **nats://support-nats.default:4222** inside the cluster.
The data is stored in /data.
