Home Using Ombi with an External DB
Post
Cancel

Using Ombi with an External DB

The other day the SQLITE database in my Ombi setup got locked out, which seems to be a somewhat common occurrence. And because I wasn’t paying attention to where I had initially stored my database I wasn’t able to do a proper database migration According to the docs it’s pretty straight forward. I copied the database.json config below from Alternate Database Options and pointed the internal config to the file I created.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "OmbiDatabase": {
    "Type": "MySQL",
    "ConnectionString": "Server=localhost;Port=3306;Database=Ombi;User=ombi;Password=ombi"
  },
  "SettingsDatabase": {
    "Type": "MySQL",
    "ConnectionString": "Server=localhost;Port=3306;Database=Ombi;User=ombi;Password=ombi"
  },
  "ExternalDatabase": {
    "Type": "MySQL",
    "ConnectionString": "Server=localhost;Port=3306;Database=Ombi;User=ombi;Password=ombi"
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
version: '3.1'
services:
  ombi:
    image: linuxserver/ombi:development
    network_mode: host
    container_name: 'ombi'
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      #- BASE_URL=/ombi #optional
    volumes:
      - ./data:/config
      - ./data/mariadb/database.json:/config/database.json
    ports:
      - "3579:3579"
    restart: unless-stopped
    depends_on: mariadb
  
  mariadb:
    image: mariadb:latest
    container_name: ombi-mariadb
    restart: unless-stopped
    volumes:
      - ./data/mariadb:/config
    ports:
      - '3306:3306'
    env_file: ./data/mariadb/maria_envs.env

MariaDB Envs:

MYSQL_ROOT_PASSWORD = PASSWORD
MYSQL_DATABASE=Ombi
MYSQL_USER=ombi
MYSQL_PASSWORD=ombi
PGID=1000
PUID=1000
TZ=America/New_York

After bringing up the stack I continued executing the Single Database Permissions listed in the steps.

1
2
3
CREATE DATABASE IF NOT EXISTS `Ombi` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'ombi'@'%' IDENTIFIED BY 'ombi';
GRANT ALL PRIVILEGES ON `Ombi`.* TO 'ombi'@'%' WITH GRANT OPTION;

After this I had a nice new clean install of Ombi using MariaDB.

This post is licensed under CC BY 4.0 by the author.