In-memory MariaDB database for Home Assistant.
This is a fork of the official add-on!
This version uses tmpfs to store MariaDB databases in-memory. If you are trying to minimize your SD-card's wear, give this add-on a try.
Even this is an in-memory database, it can automatically export (from memory to SD card) all database's content during backup, update, restart or even periodically, and can automatically import (from SD card to memory) the content when the add-on starts again. The exported database (an SQL file generated by sqldump) is gzip-ed before written to the storage to minimize SD-card wear.
Though it won't protect you from power failures completely. After a power failure, when the add-on is restarted, it will import the last known exported database content. So when eg. daily periodic export (from memory to SD card) is enabled, you will loose the latest sensory data within that day, but your long term statistics information will remain mostly intact:
![]() |
|---|
| Long term statistics from an in-memory database |
The other notable difference is that the add-on purges old statistics data from the database. By default, Home Assistant never deletes statistics data. This means that over time the size of the database would grow beyond the memory limit.
You can use this add-on to install an in-memory MariaDB, which is an open-source (GPLv2 licensed) database. MariaDB can be used as the database backend for Home Assistant. For more information, please see MariaDB
- Navigate in your Home Assistant frontend to Settings -> Add-ons -> Add-on Store.
- In the ... menu at the top right corner click Repositories, add
https://github.com/lmagyar/homeassistant-addon-mariadb-inmemoryas repository. - Find the "In-memory MariaDB" add-on and click it. If it doesn't show up, wait until HA refreshes the information about the add-on, or click Check for updates in the ... menu at the top right corner.
- Click on the "INSTALL" button.
For more details, please see the add-on's Documentation pages.

