Skip to main content

Run TSD on unRAID

If video is your cup of tea, follow this awesome video guide put together by Ricky at SNR Tech Bytes.Thank you Ricky!

Install docker-compose

To run TSD on unRAID, you first must install Docker-Compose on the server. This can be done following the usual instructions found on the Docker-Compose Install Guide.

sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

However, because unRAID boots from a USB to RAM, this installation will not be persistent. To make sure that Docker-Compose gets installed every time the server boots, follow the following steps from this forum post.

# add the following lines to /boot/config/go on your unRAID server.
COMPOSE_VERSION=$(curl -s | grep 'tag_name' | cut -d\" -f4)
curl -L${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

Just as a PSA, if this list of commands is incorrect in /boot/config/go unRAID will fail to boot.

This will install Docker-Compose permanently on your server.

Installing TSD

TSD can now be installed on your unRAID server the same way as the normal Linux method found on the []. However, I would recommend installing it in a directory other than the root home folder (/root/) as this data is not persistent between restarts. Either create a share specifically for TSD or install it in an existing share, I recommend /mnt/user/appdata/TheSpaghettiDetective. Here is the following command to do so.

cd /mnt/user/appdata/
git clone -b release
# from the README
cd TheSpaghettiDetective && docker-compose up -d

This will install TSD to your unRAID server! To update TSD, open up the terminal, change directory to the install directory, and run docker compose again.

cd /mnt/user/appdata/TheSpaghettiDetective # or where you install TSD to
git pull
docker-compose up -d --force-recreate --build

Configuring TSD

Navigate to port 3334/admin on your server. For the following steps we will use tower.local as the server address with the root IP address as Navigate to tower.local:3334/admin and log in with and password supersecret

Go to Sites, click, and change the Domain Name to your server IP address at port 3334, ex. Save the changes and exit out of the admin site.

Go to the non-admin site of the containter by navigating to tower.local:3334 and log in with the same credentials of Add a printer and install TSD on the Ocotprint instance, setting the Server Address in OctoPrint to your server address:port like, then copy/paste the secret token in the correct location.

To get email notifications working, go back to the Unraid terminal and navigate to the TSD installation directory with cd /mnt/user/appdata/TheSpaghettiDetective. Open the docker-compose.yml file with nano docker-compose.yml. You will need an app-specific password for your email if you use 2-factor authentication.

Set the following:

EMAIL_HOST: ''     # -> such as ''
EMAIL_HOST_PASSWORD: 'abcdefghijklmnop'

Rebuild the container (Note - if you are going to limit the CPU usage you can also change that now before rebuilding the container, see the below section) -

docker-compose up -d --force-recreate --build

Updating to Obico

Since TSD has been renamed to Obico, updates aren't pushed to the old Repository anymore, if you have previously installed TSD with the old repository, here are the steps to update.

cd /mnt/user/appdata/TheSpaghettiDetective # or where you installed TSD to
git remote remove origin
git remote add origin
git fetch
git checkout release
docker-compose up --build -d

Issues with the Installation

Unlike most containers that you install to unRAID, containers installed with Docker-Compose are limited in what you can do with them through the GUI. You cannot update them, change their logo, description, or do anything except for stop and restart them through the GUI. When you update the containers, you must remove the old and outdated ones manually from the command line using docker image rm.

Limit CPU Usage

By default TSD will use all of the processing power available from your server just for approximately 1 second every 10 seconds for a typical quad-core or 6-core system. You can use the following steps to limit TSD to only using a certain amount of CPU usage. This method doesn't actually constrain it to certain cores, but it sets the maximum processing power it can use overall. So if you have a 4 core / 8 thread system, as far as docker-compose is concerned you have 8 "cpus". Setting it to use 4 cpus will result in TSD using 50% of your processing power for about 2 seconds, vs the original 100% power for 1 second. If you have a 6-core/12-thread machine then cpus: 6 would be using half of your machine power.

  1. Use the Unraid GUI to Stop All running containers

  2. Open a terminal and navigate to the TSD install directory, then open the docker-compose.yml file:

    cd /mnt/user/appdata/TheSpaghettiDetective
    nano docker-compose.yml
  3. Add cpus: 4 at the bottom of the services sections for ml_api: and web: under the line that starts with command: with the same indentation level as command.

    hostname: ml_api
    restart: unless-stopped
    context: ml_api
    DEBUG: 'True'
    FLASK_APP: ''
    #HAS_GPU: 'False'
    command: bash -c "gunicorn --bind --workers 2 wsgi"
    cpus: 4

    <<: *web-defaults
    hostname: web
    - "3334:3334"
    - ml_api
    command: sh -c "python collectstatic --noinput && python migrate && python runserver --no>
    cpus: 4
4. Save the changed file.  Force the rebuild of the container with the following code:
docker-compose up -d --force-recreate --build
  1. Navigate back to the Unraid GUI and Start All containers, you're all set!