User Tools

This is an old revision of the document!


Bazarr: subtitles downloader & finder

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 could be installed manually on bare-metal, but it depends on using pip which is not really recomended on Gentoo (there are ways to do it, see here). In this case i recomend using a container with Podman (see Using Containers on Gentoo for more details).

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:

useradd -d /data/daemons/bazarr -g media -m bazarr

Create the following /data/daemons/bazarr/docker-compose.yml file:

docker-compose.yml
version: "2.1"
services:
  bazarr:
    image: ghcr.io/linuxserver/bazarr
    user: 1010:1014
    container_name: bazarr
    environment:
      - TZ=Europe/Roma
    volumes:
      - /data/daemons/bazarr/config:/config
      - /data/Media/Movies:/movies
      - /data/Media/Tv:/tv
      - /data/Media/Movies:/data/Media/Movies
      - /data/Media/Tv:/data/Media/Tv
    ports:
      - 6767:6767
    restart: unless-stopped
    networks:
      - bazarr-net
  
networks:
  bazarr-net: {}

Pay attention to the user: line, here you need to place the bazarr user-id and the media group-id.

Also note how i have duplicated the Movies and Tv mount points because they must match Radarr and Sonarr location.

You can now become the bazarr user and proceed with the installation:

su - bazar
podman compose pull

That's it, Bazarr is installed, but you will need to configure it before starting.

Edit the default /data/daemons/bazarr/data/config/config.yaml, set the following lines:

...
  base_url: /bazarr
  chmod: '0664'
  ip: 127.0.0.1
...

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.

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:

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;
   }
}

As usual the The Reverse Proxy concept will help you activate and reload the Reverse Proxy.

Automatic Startup

If you follow my Custom User Services, all you need to do is create the following symlinks:

cd /etc/local.d
ln -s _servicer.sh 20-bazarr--podman.start
ln -s _servicer.sh 20-bazarr--podman.stop

and you are all set.

Usage

Now you can head to the Bazarr URL (https://10.0.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.

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