Enabling RTC Battery charging on headless RPI

I have a newish installation of HA running on an RPI5, not with a lot installed but enough work into it not to want to have to rebuild.

It operates by necessity headless and with no easy method to put a monitor and keyboard onto the box.

Most of the time the system with router and sensors is otherwise air-gapped apart form periodic maintenance to update software and sync clocks.

The system works in an environament where power is not reliable. Sensors all have RTC but the RTC battery charging on the rpi is disabled by default and I can’t find any way to access the config file and update it.

I have tried accessing the files on the root partition via a windows sd card reader but no luck: similarly unable to mount the required partition from a linux machine. I can’t ssh into the core from Home Assistant terminal because it wants a password and one has never been setup.

Anyone have any ideas?

Frazer

At great risk to my mental health…

The Raspberry Pi 5 does not have an RTC battery. It does have a connector- is this what you meant? But since Home Assistant is intended to run 24/7, why would you even need an RTC battery?

Home Assistant OS installer absolutely forces you to set a password. How did you install Home Assistant?

SSH into HAOS Core is not allowed by default. You only get SSH access via the SSH add‑on, which uses keys, not passwords.

The terminal in the Home Assistant sidebar is a container shell, not the host OS, so it cannot be used to SSH into the host.

If you try to restart HA while you don’t have access to the internet HA won’t start up.