Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

Home Assistant Add-on: MariaDB


Follow these steps to get the add-on installed on your system:

  1. Navigate in your Home Assistant frontend to Supervisor -> Add-on Store.
  2. Find the "MariaDB" add-on and click it.
  3. Click on the "INSTALL" button.

How to use

  1. Set the logins -> password field to something strong and unique.
  2. Start the add-on.
  3. Check the add-on log output to see the result.
  4. Add recorder component to your Home Assistant configuration.

Add-on Configuration

The MariaDB server add-on can be tweaked to your likings. This section describes each of the add-on configuration options.

Example add-on configuration:

  - homeassistant
  - username: homeassistant
    password: PASSWORD
  - username: read_only_user
    password: PASSWORD
  - username: homeassistant
    database: homeassistant
  - username: read_only_user
    database: homeassistant
      - SELECT

Option: databases (required)

Database name, e.g., homeassistant. Multiple are allowed.

Option: logins (required)

This section defines a create user definition in MariaDB. Create User documentation.

Option: logins.username (required)

Database user login, e.g., homeassistant. User Name documentation.

Option: logins.password (required)

Password for user login. This should be strong and unique.

Option: rights (required)

This section grant privileges to users in MariaDB. Grant documentation.

Option: rights.username (required)

This should be the same user name defined in logins -> username.

Option: rights.database (required)

This should be the same database defined in databases.

Option: rights.privileges (optional)

A list of privileges to grant to this user from grant like SELECT and CREATE. If omitted, grants ALL PRIVILEGES to the user. Restricting privileges of the user that Home Assistant uses is not recommended but if you want to allow other applications to view recorder data should create a user limited to read-only access on the database.

Home Assistant Configuration

MariaDB will be used by the recorder and history components within Home Assistant. For more information about setting this up, see the recorder integration documentation for Home Assistant.

Example Home Assistant configuration:

  db_url: mysql://homeassistant:password@core-mariadb/homeassistant?charset=utf8mb4


Got questions?

You have several options to get them answered:

In case you've found a bug, please open an issue on our GitHub.