Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How do I convert Lidarr to Postgresql?

Featured Replies

I have over 150k tracks in Lidarr and would love to speed it up with postgres.

I took a look at the instructions in the lidarr wiki (https://wiki.servarr.com/lidarr/postgres-setup), but it doesn't really apply to Unraid, and I'm not savy enough to figure it out.

 

Has anyone converted to postgres?

Can you give me some help/instructions on how to do it?

 

Thanks!!!!

  • Community Expert

Follow the wiki docs...
https://wiki.servarr.com/lidarr/postgres-setup

I'm not familar with Lidarr. But this seems reasonable and doable...
Unraid docker install postgress...
 

Migrating Lidarr to PostgreSQL on Unraid can enhance performance, especially with large music libraries. Here's a step-by-step guide tailored for Unraid users:

1. Set Up a PostgreSQL Container:

Install PostgreSQL via Unraid's Community Applications:

Navigate to the "Apps" tab in Unraid.

Search for "PostgreSQL" and select a trusted container, such as the official PostgreSQL image.

Click "Install" and configure the following settings:

PostgreSQL Version: Use version 14 to align with Lidarr's requirements.

Database Name: lidarr_main

Username: lidarr_user

Password: Choose a secure password.

Port: Default is 5432.

Data Storage Path: Map to a persistent location on your Unraid server, e.g., /mnt/user/appdata/postgresql

 

Configure Lidarr to Use PostgreSQL:

Access Lidarr's Configuration:

Stop the Lidarr container to prevent any conflicts.

Navigate to the Lidarr configuration directory, typically located at /mnt/user/appdata/lidarr.

Open the config.xml file with a text editor.

Modify config.xml:

Add or update the following entries
 

<PostgresUser>lidarr_user</PostgresUser>
<PostgresPassword>YourSecurePassword</PostgresPassword>
<PostgresPort>5432</PostgresPort>
<PostgresHost>localhost</PostgresHost>
<PostgresMainDb>lidarr_main</PostgresMainDb>
<PostgresLogDb>lidarr_log</PostgresLogDb>


save config..

 

Migrate Existing Data (Optional):

If you have existing data in SQLite and wish to migrate it to PostgreSQL:

Install pgLoader:

Use a Docker container for pgLoader:

Search for a pgLoader container in the "Apps" tab.

Install and configure it as needed.

Perform the Migration:

Stop the Lidarr container.

Run the following command, adjusting paths as necessary
 

docker run --rm -v /path/to/lidarr.db:/lidarr.db:ro --network=host pgloader_image --with "quote identifiers" --with "data only" /lidarr.db "postgresql://lidarr_user:YourSecurePassword@localhost/lidarr_main"

Replace /path/to/lidarr.db with the actual path to your existing SQLite database.

Replace pgloader_image with the name of the pgLoader Docker image you installed.

 

4. Start Lidarr:

Restart the Lidarr container.

Verify that Lidarr connects to the PostgreSQL database and that your data is intact.

Additional Considerations:

Backups: Implement a regular backup strategy for your PostgreSQL databases, as Lidarr does not handle this automatically.

Performance Tuning: Monitor the performance and adjust PostgreSQL settings as needed to optimize for your library size.

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.