How to tell Home Assistant to keep more than 10 day's data

I have Home Assistant running using the docker image ghcr.io/home-assistant/home-assistant:stable.
I would like to be able to access historic data over a full year.

How do I do this - the only topics I have found mention a recorder integration (I have tried to find that under Settings/Integrations/Add Integration, and it’s not there). And modifying configuration.yaml to alter the recorder settings, but there are no settings in there, and no mention of recorder in any of the yaml files in the config folder.

I find this really confusing - there is lots of advice in all the topics about modifying configuration.yaml, but the standard docker image has an almost empty config.yaml.

You need to add it yourself.

In configuration.yaml:

recorder:
  purge_keep_days: 20

I did add below. included this into the configuration.yaml
Confirmed that the entities not mentioned indeed have no logging history.
But the one below keep on an history of max 2 week
Can select this week / last week in the History menu of H.A.
But select a day more in the past shows no history.

Why ?
Is the purge still done after 2 weeks ignoring this value ?

I want to keep the temperature values for 1,5 years

recorders.yaml

purge_keep_days: 500
include:
entity_globs:
- sensor.temperature_*
- sensor.zolder_klimaatsensor*
- sensor.humidity_*
- sensor.*_temperature

have you !included !recorders.yaml in configuration.yaml ?
As it’s not “yaml-code” you show ( code must be in between 3 back-ticks") if not it’s impossible to see if your indents are correct ( now above is just showing plain text, not yaml code)

And you are “missing” … recorder: …

That’s what long term statistics are for. They keep data indefinitely. They’re independent of purge_keep_days. Setting the latter to such a huge value is asking for trouble. The recorder wasn’t meant to operate with these kind of retention periods.

The recoders.yaml is coming from the main include to keep the codestreams seperate as possinle.

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
binary_sensor: !include binary_sensors.yaml
recorder: !include recorders.yaml
alert: !include alerts.yaml

It looks like working now. the sql db is growing at least and I can see last month rather than only the last 2 weeks. Its now around 700 Mb. running at a NAS so for diskspace np.
Need to find my way then in the statistics usability still then…
and find a suitable history for temperatures to keep in order to play with heat/airco configuration