Install · CasaOS

Install tgarr on CasaOS

tgarr runs on CasaOS as a Docker Compose stack: two files and one command over SSH. Put it on the same box that already runs Sonarr, Radarr or Jellyfin, and they read what tgarr downloads directly - no network share between them.

Before you startWhat is needed

No account of any kind is needed to begin. The full guide in the repository: docs/install/casaos.md.

StepsTwo files and one command

  1. SSH into the CasaOS box and get the two files.
    sudo mkdir -p /DATA/AppData/tgarr/app
    sudo chown -R $USER /DATA/AppData/tgarr
    cd /DATA/AppData/tgarr/app
    curl -fsSLO https://raw.githubusercontent.com/tgarrpro/tgarr/main/docker-compose.yml
    curl -fsSL  https://raw.githubusercontent.com/tgarrpro/tgarr/main/.env.example -o .env
    chmod 600 .env
  2. Get Telegram API credentials (this can wait - see the next step). Visit my.telegram.org/apps, sign in with your phone number, create a new app - any name will do - and copy the api_id and api_hash.
  3. Fill in .env.
    nano .env
    Four values:
    TG_API_ID=          # from https://my.telegram.org/apps
    TG_API_HASH=        # from https://my.telegram.org/apps
    DB_PASSWORD=        # a secret of your own: openssl rand -hex 24
    MEILI_MASTER_KEY=   # a secret of your own: openssl rand -hex 32
    Make the two secrets fresh and paste them in:
    echo "DB_PASSWORD=$(openssl rand -hex 24)"
    echo "MEILI_MASTER_KEY=$(openssl rand -hex 32)"
    The two Telegram values may be left empty: tgarr then asks for them in the browser when they are first needed.
  4. Start it.
    docker compose up -d
  5. Open http://<your-host>:8765 in a browser. To sign in to Telegram, scan the QR code with the Telegram app, or enter your phone number and the code Telegram sends you. Nothing is typed in a terminal, and the code never touches a file.
  6. Follow some channels. tgarr indexes the channels your Telegram account has joined. Join one in the Telegram app; the crawler picks it up within minutes and then reads its history, which for a large channel can take from half an hour to several hours.

On the diskWhere the files and downloads end up

Everything tgarr keeps is in /DATA/AppData/tgarr/app/_data/, beside the two files:

To keep downloads somewhere else - the folder Sonarr and Radarr import from, say - set TGARR_DOWNLOADS in .env to that path. The port is 8765; TGARR_PORT changes it. If others can reach the port, set TGARR_UI_PASSWORD as well.

UpdatesIt keeps itself up to date

The compose file brings an updater with it: a container named tgarr-watchtower that looks only at tgarr's own two containers - nothing else on the NAS - and checks for a new release every half hour. The index, the settings and the Telegram sign-in are kept. In tgarr, Settings → Updating tgarr has an Update now button. To stay on one version, set TGARR_TAG in .env.

By hand:

cd /DATA/AppData/tgarr/app
docker compose pull
docker compose up -d

The sign-in, the database and the downloads stay as they are.

At homeHow the household reaches it

Every browser at home opens the same address: http://<the-NAS>:8765. Open Media Center & PIN and set a PIN, and every browser that has not entered it gets only the Media Center - films, music, books and photos, and only what you ticked - with time rules for the children if you want them. More on that: a learning library for the family.

tgarr's Media Center: four shelves - Watch, Listen, Read, Photos - and a row of covers
The Media Center on a phone
What the other screens at home get once a PIN is set.

Sonarr and RadarrOn the same CasaOS box

In Sonarr and Radarr: Settings → Indexers → + → Newznab, URL http://<the-NAS>:8765/newznab/ - tgarr's Dashboard shows the exact address, with a Copy button. For grabs from Telegram, add tgarr as a download client too: Settings → Download Clients → + → SABnzbd, same host and port, URL Base /sabnzbd. Sonarr and Radarr must be able to read the finished file: either set TGARR_DOWNLOADS to the folder they import from, or mount tgarr's _data/downloads into their containers as /downloads - then the path is the same on both sides and no remote path mapping is needed. On CasaOS that folder is /DATA/AppData/tgarr/app/_data/downloads. Field by field: tgarr in Sonarr and Radarr.

OptionalConverting films on the graphics card

A film the browser cannot play is converted while it is watched. Intel graphics from 2015 on can do that for a fraction of a processor core, and tgarr uses the card by itself once its container is given one. Put a file named docker-compose.override.yml beside docker-compose.yml:

services:
  api:
    devices:
      - /dev/dri:/dev/dri

Then docker compose up -d. Docker refuses to start a container that names a card which is not there, so do this only on a machine that has /dev/dri. Settings → Converting films says what is in use. NVIDIA, and the details: docs/install/gpu.md.

If something is offTroubleshooting

QuestionsAsked often

Is tgarr in the CasaOS app store?

Not yet - an entry is planned. Until then tgarr is installed over SSH with two files and docker compose up -d, in /DATA/AppData/tgarr/app.

What does tgarr need on CasaOS?

CasaOS 0.4 or later (Docker Compose v2 comes with it), about 10 GB of free disk for the index and the search index, and room for what you download.

Can Sonarr and Radarr on the same CasaOS box use tgarr?

Yes, and that is the layout the guide recommends. Add tgarr as a Newznab indexer with the address its Dashboard shows (http://your-box:8765/newznab/) and as a SABnzbd download client with URL Base /sabnzbd. With tgarr's downloads folder mounted into Sonarr as /downloads, no remote path mapping is needed.

Do I need a Telegram account to install it?

Not to begin. The two Telegram values in .env may be left empty; tgarr then asks for them in the browser when they are first needed. The Internet Archive and your own files work with no account of any kind.

How does tgarr update on a NAS?

By itself. The compose file includes an updater that looks only at tgarr's own containers and checks for a new release every half hour. Setting TGARR_TAG in .env keeps it on one version.