Skip to content

Spotweb in Container Manager on Synology NAS

Last updated on 15 February 2024

Important or Recent Updates
Historic UpdatesDate
Guide rewritten for Container Manager and simplified due to alternative base image from erikdevries making setup easier.11/06/2023
You can now amend the cron schedule to pull on your own schedule rather than the 5-minute default17/09/2023
Fixed the incorrect Cron Job formatting (my fault!)
Changed from the official MariaDB to LinuxServer so we can control IDs
Implemented a Healthcheck to remove the need to wait and restart the Spotweb container
13/10/2023
Added additional security option to the compose to restrict the containers from gaining new privileges and amended restart policy, so container will start on boot.28/10/2023
Changed the MariaDB container Name and Service name to spotweb_db – this is purely to differentiate it for anyone with multiple Maria Database containers.14/02/2024
Historic Updates


What is Spotweb?

To quote the GitHub page.

“Spotweb is a decentralized Usenet community based on the Spotnet protocol.”

It is essentially a self-hosted Usenet indexer that integrates with your favourite media managers such as Radarr, and I am going to walk you through setting this up in Docker on your Synology NAS

Let’s Begin

The guide has 2 pages:

  • Page 1 – Folder setup and Container Manager
  • Page 2 – Spotweb Changes and FAQ

Before we start with the main guide head over and follow these two guides to get a docker user and dedicated bridge network set up.




Folder Setup

Let’s start by getting some folders set up for the containers to use. Open up File Station create the following.

Folders
/docker/projects/spotweb-compose
/docker/spotweb-mariadb

The Container Manager Project

We are going to be using the Project feature of Container Manager (Docker Compose). Open up Container Manager and click on Project then on the right-hand side click ‘Create’.

In the next screen we will set up our General Settings, enter the following:

SectionSetting
Project Name:spotweb
Path:/docker/projects/spotweb-compose
Source:Create docker-compose.yml

Next we are going to drop in our docker compose configuration copy all the code in the box below and paste it into line ‘1’ just like the screenshot.

What on earth is a Docker Compose?
Docker Compose allows us to define how Docker should set up one or more containers within a single configuration file. This file is yaml formatted and Container Manager uses the Projects feature to manage them.

YAML
services:
  spotweb:
    image: erikdevries/spotweb
    container_name: spotweb
    environment:
      - TZ=Europe/London #CHANGE_TO_YOUR_TZ
      - DB_PORT=3306
      - DB_HOST=172.20.0.1
      - DB_NAME=spotweb
      - DB_USER= #username from line 32
      - DB_PASS= #password from line 33
      - CRON_INTERVAL=*/5 * * * *
    ports:
      - 8085:80/tcp
    network_mode: synobridge
    depends_on:
      spotweb_db:
        condition: service_healthy
    security_opt:
      - no-new-privileges:true
    restart: always

  spotweb_db:
    image: linuxserver/mariadb:latest
    container_name: spotweb_db
    environment:
      - MYSQL_ROOT_PASSWORD=StRoNgPa55WoRd
      - PUID=1234 #CHANGE_TO_YOUR_UID
      - PGID=65432 #CHANGE_TO_YOUR_GID
      - TZ=Europe/London #CHANGE_TO_YOUR_TZ
      - MYSQL_DATABASE=spotweb
      - MYSQL_USER= #A username
      - MYSQL_PASSWORD= # Another database password
    volumes:
      - /volume1/docker/spotweb-mariadb:/config
    ports:
      - 3306:3306/tcp
    network_mode: synobridge
    healthcheck:
      test: ["CMD", "mysqladmin" ,"ping", "-h", "172.20.0.1"]
      timeout: 20s
      retries: 10
    security_opt:
      - no-new-privileges:true
    restart: always

Environment Variables

We need to make some changes in order for the containers to have the correct permissions to save configuration files and set up an appropriate database.

First lets cover off the amendments for the MariaDB container, you will adjust these after the = for each variable

VariableValue
MYSQL_ROOT_PASSWORDenter a unique password do not use special characters and keep below 20 alphanumeric e.g. A-Z – 0-9
This is the master password for MariaDB in case you ever need it.
PUID(required) The UID you obtained in the user setup guide
PGID(required) The GID you obtained in the user setup guide
TZYour timezone wikipedia.org/wiki/List_of_tz_database_time_zones
MYSQL_DATABASEspotweb
MYSQL_USERenter a unique username for the spotweb database
MYSQL_PASSWORDenter a unique password do not use special characters and keep below 20 alphanumeric e.g. A-Z – 0-9 as this is known to cause issues if overly complex

Next we are going to amend the Spotweb container section.

VariableValue
TZYour timezone wikipedia.org/wiki/List_of_tz_database_time_zones
DB_NAMEspotweb
DB_USEREnter the same username from the MYSQL_USER above
DB_PASSEnter the same password from the MYSQL_PASSWORD above
CRON_INTERVAL*/5 * * * *

#by default this is 5 minutes you can work out a different interval by using https://cron.help to adjust the timing e.g. */60 * * * * is every hour on the hour.

Once done click ‘Next’

You do not need to enable anything on the ‘Web portal settings’ screen click ‘Next’ again.

On the final screen click ‘Done’ which will begin the download of the container images and once downloaded they will be launched!

The images will now be downloaded and extracted. You should see ‘Code 0’ when it has finished.

OK you should now see our project running with a Green status however we are not quite done yet.

Depending on your NAS and drive speed just hold fire for 5 mins while the initial database is configured. You will see this in the Spotweb Log Files.

Firewall Exceptions

(Skip if you don’t have the Firewall configured)

If you have enabled and configured the Synology Firewall you will need to create exceptions for any containers that have a Web UI or have any incoming or outgoing connections. This section covers the basics of how to add these. (Please note this is a generic section and will not show the specific ports used in this guide however it applies in the same way)

Also, I would like to refer people to the great guide on getting the Firewall correctly configured over on WunderTechs site.

Head into the Control Panel> Security > Firewall, from here click Edit Rules for the profile you set up when you enabled the Firewall.

Next click on Create and you will see the screen below. Source IP and Action will be automatically selected to All and Allow, I will leave it up to you as to your own preference on whether you want to lock down specific Source IPs from having access. In this example we will leave as All.

You will now choose ‘Custom‘ and then the Custom button

Now select Destination from the drop-down menu, most web based containers require TCP access but check the guide as it will show the port and protocol. Then add comma separated ports. Then press OK.

Click OK a couple of times to get back to the main screen. You will see by default the new rule is added to the bottom of the list. You must always have your Block All rule last in the list as the rules are applied top down so move your container up.

You have now completed the Firewall changes and can continue with the guide.

Container set up completed

You can navigate to your NASIP:8085 after a few minutes and should be greeted by an empty Spotweb UI (if you get a load of text at the top of a white screen wait a little longer as the database is still being configured)

We will come back to add some additional settings a little later in the guide. You can now move on to Page 2.


Pages: 1 2

Published inDockerSearch / Indexers 7.2SynologyUsenet

54 Comments

  1. VenimK VenimK

    I guess this is wrong

    cat dbsettings.inc.php
    <?php
    $dbsettings['engine'] = getenv('DB_ENGINE') ?: 'pdo_mysql';
    $dbsettings['host'] = sprintf('%s:%s', getenv('DB_HOST') ?: 'mysql', getenv('DB_PORT') ?: '3306');
    $dbsettings['dbname'] = getenv('DB_NAME') ?: 'spotweb';
    $dbsettings['user'] = getenv('DB_USER') ?: 'spotweb';
    $dbsettings['pass'] = getenv('DB_PASS') ?: 'spotweb';

    • Dr_Frankenstein Dr_Frankenstein

      Hey, it should reflect the details you add to the compose file. Worst case delete the container and run the project again.

  2. rugah rugah

    Hello,

    I have used your manual to set this up, and everything is up and running, so thank you! The only problem that I have: if I setup my nzbget, I don’t get the green arrow. I have tested, and if I choose sabnzb, the green arrow is there, but I don’t use sabnzb. I hope you can help me with this.

    Regards

    • Dr_Frankenstein Dr_Frankenstein

      Hey – I have not actually tried that feature, I use the NZB Unity add on for Firefox to pass the details to Sab/NZBGet

  3. VenimK VenimK

    Yes, created the SynoBridge network

    phpMyAdmin has 172.20.0.4
    MariaDb has 172.20.0.2

    both on the Synobridge Gateway

    • Dr_Frankenstein Dr_Frankenstein

      Also if doing via Portainer it takes a minute for the database to initially be setup, can you try doing via the Projects feature first in line with the guide.

  4. Christiaan Christiaan

    Hi Dr_Frankenstein,

    I am running Spotweb based on your install guide. Many thanks. But I have the same problem as mentioned at FAQ: “My Spots only seem to be populating from the day I set up Spotweb”

    You refering to this page
    https://drfrankenstein.co.uk/spotweb-not-backfilling/

    First step is to add a code to the project.. But surprisingly the Project page is empty, I also have not installed PHPadmin.. PHPAdmin was not in the guide too… strange the Spotweb is working fine, but only problem with the backfilling

    Can you help me?

    • Dr_Frankenstein Dr_Frankenstein

      Hey, so you should be able to follow the steps in the additional FAQ page and it will get you pulling the extra years of Spots

  5. Tyndell Tyndell

    Shoud I still use the mariadb section if I already have MariaDB running as a container? I have it running for shared kodi db.

      • Tyndell Tyndell

        But if use the mariadb sections in the yaml i’ll be creating a seperate mariadb container for spotweb right?

        Sorry for the extra questions, the whole docker/container expierence is still a bit of a deepdive for me :).

        • Dr_Frankenstein Dr_Frankenstein

          You would remove that section and then fill out the appropriate username and password for your existing MariaDB install. There is no harm in running multiple versions if you want to just run with the Docker version as well. You will just need to adjust the external 3306 port to something higher such as 3307:3306.

          • VenimK VenimK

            Hi

            I made it with portainer/compose
            Can make everything to work, except PhpMyAdmin, can’t ‘ login

            services:
            mariadb:
            image: mariadb:latest
            container_name: mariadb
            environment:
            – MYSQL_ROOT_PASSWORD=StRoNgPa55WoRd
            – PUID=1000
            – PGID=1000
            – TZ=Europe/London
            – MYSQL_DATABASE=spotweb
            – MYSQL_USER=Ausername
            – MYSQL_PASSWORD=AnotherPassword
            volumes:
            – /volume1/docker/mariadb:/var/lib/mysql
            ports:
            – 3346:3306
            network_mode: synobridge
            restart: unless-stopped

            spotweb:
            image: erikdevries/spotweb
            container_name: spotweb
            environment:
            – TZ=Europe/London
            – DB_PORT=3346
            – DB_HOST=172.20.0.1
            – DB_NAME=spotweb
            – DB_USER=Ausername
            – DB_PASS=AnotherPassword
            ports:
            – 8085:80
            network_mode: synobridge
            depends_on:
            – mariadb
            restart: unless-stopped

            phpmyadmin:
            image: phpmyadmin/phpmyadmin:latest
            hostname: phpmyadmin
            container_name: phpmyadmin
            environment:
            – PMA_HOST=172.20.0.1
            ports:
            – 3309:80/tcp
            network_mode: synobridge
            depends_on:
            – mariadb
            restart: unless-stopped

            Message I get is
            mysqli::real_connect(): (HY000/2002): Connection refused

            • Dr_Frankenstein Dr_Frankenstein

              Hey – do you have the synobridge network setup / make sure the PMA Host / DB Host IPs are correct if doing via Portainer..

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

drfrankenstein.co.uk – writing Synology Docker Guides since 2016 – Join My Discord!