User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
sailing:bazarr [2023/12/14 16:02] willysailing:bazarr [2024/02/27 12:25] (current) – removed willy
Line 1: Line 1:
-Prev to: [[sailing:lazylibrarian|LazyLibrarian: another books and audiobooks organizer]] 
  
-Next to: [[sailing:torrenting|Torrenting]] 
----- 
-====== Bazarr: subtitles downloader & finder ====== 
- 
-[[https://www.bazarr.media/|Bazarr]] is a tool which can search for, download and organize subtitles for all your media. By interfacing with one or more subtitles providers, Bazarr will scan your media libraries and update the subtitles for the languages you want. 
- 
-===== Installation ===== 
- 
-Bazarr must be installed manually since there is no Gentoo ebuild for it, but it's pretty easy with **pip**. 
- 
-As usual, you need to create a specific user and set it's home folder to **/data/daemons/bazarr** and set //media// as it's main group: 
-<code bash> 
- > useradd -d /data/daemons/bazarr -g media -m bazarr 
-</code> 
- 
-Using pip directly is discouraged on Gentoo because it can severely break your system. To use pip on Gentoo you need to explicitly enable it for the //bazarr// user by creating the file **/data/daemons/bazarr/.config/pip/pip.conf** with this content: 
-<file txt pip.conf> 
-    [global] 
-    break-system-packages = true 
-    user = true 
-</file> 
- 
-Now adapt the //bazarr// umask so that any files moved by it will be accessible by the other tools (where needed). Add the following line at the end of **/data/daemons/bazarr/.bashrc**: 
-<code bash> 
-umask 0002 
-</code> 
- 
-You can now become the //bazarr// user and proceed with the installation: 
-<code bash> 
- > su - bazar 
- > wget https://github.com/morpheus65535/bazarr/releases/latest/download/bazarr.zip 
- > unzip bazarr.zip 
- > rm bazarr.zip 
- > python -m pip install -r requirements.txt 
-</code> 
- 
-As last step, you need a startup script called **/data/daemons/bazarr/bazarr.sh**, so create it with the following content: 
-<file txt lazylibrarian.sh> 
-#!/bin/bash 
-cd /data/daemons/bazarr 
-python bazarr.py > bazarr_out.log 2> bazarr_err.log 
-</file> 
- 
-You also want a script to automatically start it at boot, so create the file **/etc/local.d/80-bazarr.start** with the following content: 
-<file txt bazarr.start> 
-#!/bin/bash 
- 
-start-stop-daemon -b -m -p /var/run/bazarr.pid -n bazarr -u bazarr /data/daemons/bazarr/bazarr.sh 
-</file> 
- 
-and make them both executable: 
-<code bash> 
- > chmod +x /data/daemons/bazarr/bazarr.sh 
- > chmod +x /etc/local.d/80-bazarr.start 
-</code> 
- 
-That's it, Bazarr is installed, but you will need to configure it before starting. 
- 
-===== Reverse-Proxy configuration ===== 
- 
-Before you proceed, you should make Bazarr accessible via the reverse-proxy, so that access, configuration and usage will be simplified from the beginning. Add this file to **/etc/nginx/folders**: 
-<file txt bazarr.conf> 
-location /bazarr/ { 
-   proxy_pass              http://127.0.0.1:6767/bazarr/; 
-   proxy_set_header        X-Real-IP               $remote_addr; 
-   proxy_set_header        Host                    $http_host; 
-   proxy_set_header        X-Forwarded-For         $proxy_add_x_forwarded_for; 
-   proxy_set_header        X-Forwarded-Proto       $scheme; 
-   proxy_http_version      1.1; 
-   proxy_set_header        Upgrade                 $http_upgrade; 
-   proxy_set_header        Connection              "Upgrade"; 
-   proxy_redirect off; 
-   # Allow the Bazarr API through if you enable Auth on the block above 
-   location /bazarr/api { 
-       auth_pam off; 
-       proxy_pass http://127.0.0.1:6767/bazarr/api; 
-   } 
-} 
-</file> 
- 
-Add it to your **/etc/nginx/folders/main.conf**: 
-<code> 
-include "folders/bazarr.conf"; 
-</code> 
- 
-and restart nginx: 
-<code bash> 
- > /etc/init.d/nginx restart 
-</code> 
- 
-===== Startup ===== 
- 
-Before starting Bazarr you need to fine-tune the default **/data/daemons/bazarr/data/config/config.yaml**, set the following lines: 
-<code> 
-... 
-  base_url: /bazarr 
-  chmod: '0664' 
-  ip: 127.0.0.1 
-... 
-</code> 
- 
-You need to set the base_url to match the reverse proxy setting and you want to ensure new files by Bazarr are created as readable and writable by the media group (so, 0664) for them to be accessible in your media collection. You also want to bind to IP 127.0.0.1 for security reasons. 
- 
-Now you can head to the Bazarr URL (http://192.168.0.1/bazarr) with your browser and access the Bazarr web GUI, from you which you need to fill up the //Sonarr// and //Radarr// sections. Put in your Sonarr and Radarr base URL's (/sonarr and /radarr if you configured everything correctly before) and put also in the respective API keys, that you will find in the Sonarr and Radarr web GUI configuration pages. You will also need to go to the languages section and setup at least one language you want your subtitles. 
- 
-Then it's time to setup some providers: you can do so from the Providers configuration page. You will need at least one. 
- 
-Go ahead and continue configuring anything else you might want to setup. 
- 
-All set! Bazarr is running. 
- 
- 
-Now, head on to figuring out how to find something to download in your media collection... 
- 
----- 
-Next to: [[sailing:torrenting|Torrenting]] 
- 
-Prev to: [[sailing:lazylibrarian|LazyLibrarian: another books and audiobooks organizer]] 

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information