---
layout: post
title: "HTPC"
description: ""
author: sthope
image: 
categories: [ Docker, Portainer, Stack, LinuxServer, HTPC ]
comments: true
env_file: https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/htpc/config.env
stack_file: https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks/src/branch/master/htpc/docker-compose.yml
htpc_example: /assets/images/htpc_example.png
---
***Containers:***
1. [qbittorrent]()
2. [jellyfin]()
3. [sonarr]()
4. [bazarr]()
5. [radarr]()
6. [jackett]()
<br>
<br>
<br>

### 1. Configs file

Download or copy the contents from [this file]({{page.env_file}}) and edit with your details.
<br>
<br>
<br>
### 2. Use Git Repository

![example]({{page.htpc_example}})

**Repository URL:**  <br>
```https://git.sthope.dev/sthope/sthope-examples/src/branch/master/docker_portainer_stacks``` <br>
**Compose path:**  <br>
```htpc/docker-compose.yml``` <br>
<br>
<br>
<br>
### 3. Portainer Stack

Both files are available at [the repository page]({{page.stack_file}})


Portainer Stack
```
version: "3.8"
services:
  qbittorrent:
    image: linuxserver/qbittorrent:latest
    container_name: qbittorrent
    network_mode: HTPC
    volumes:
      - ${volume_qbittorrent}:/config
      - ${media_downloads}:/downloads
    ports:
      - "8080:8080"
      - "6881:6881"
      - "6881:6881/udp"
    restart: always
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - UMASK=022
      - WEBUI_PORT=8080
    labels:
      - com.centurylinklabs.watchtower.enable=true

  jellyfin:
    image: linuxserver/jellyfin:latest
    container_name: jellyfin
    network_mode: HTPC
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    volumes:
      - ${volume_jellyfin}:/config
      - ${media_folder}:/data/HTPC
      - /opt/vc/lib:/opt/vc/lib
    ports:
      - 8096:8096
      - 8920:8920
      - 7359:7359/udp
      - 1900:1900/udp
    restart: unless-stopped
    labels:
      - com.centurylinklabs.watchtower.enable=true

  sonarr:
    image: linuxserver/sonarr:latest
    container_name: sonarr
    network_mode: HTPC
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    volumes:
      - ${volume_sonarr}:/config
      - ${media_tvshows}:/tv
      - ${media_downloads}:/downloads
    ports:
      - 8989:8989
    restart: unless-stopped
    labels:
      - com.centurylinklabs.watchtower.enable=true

  bazarr:
    image: linuxserver/bazarr:latest
    container_name: bazarr
    network_mode: HTPC
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - UMASK_SET=022
    volumes:
      - ${volume_bazarr}:/config
      - ${media_movies}:/movies
      - ${media_tvshows}:/tv
    ports:
      - 6767:6767
    restart: unless-stopped
    labels:
      - com.centurylinklabs.watchtower.enable=true

  radarr:
    image: linuxserver/radarr:latest
    container_name: radarr
    network_mode: HTPC
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - UMASK_SET=022
    volumes:
      - ${volume_radarr}:/config
      - ${media_movies}:/movies
      - ${media_downloads}:/downloads
    ports:
      - 7878:7878
    restart: unless-stopped
    labels:
      - com.centurylinklabs.watchtower.enable=true

  jackett:
    image: linuxserver/jackett:latest
    container_name: jackett
    network_mode: HTPC
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - AUTO_UPDATE=true
    volumes:
      - ${volume_jackett}:/config
      - ${media_downloads}:/downloads
    ports:
      - 9117:9117
    restart: unless-stopped
    labels:
      - com.centurylinklabs.watchtower.enable=true
```
<br>
<br>
<br>

***Config Environments:***
```
### Volumes / Folders
volume_qbittorrent="/HTPC/docker/qbittorrent"
volume_jellyfin="/HTPC/docker/jellyfin"
volume_sonarr="/HTPC/docker/sonarr"
volume_bazarr="/HTPC/docker/bazarr"
volume_radarr="/HTPC/docker/radarr"
volume_jackett="/HTPC/docker/jackett"

### HTPC Media
media_folder="/HTPC/media"
media_downloads="/HTPC/downloads"
media_tvshows="/HTPC/media/tvshows"
media_movies="/HTPC/media/movies"

### Other configs
PUID="1000"
PGID="1000"
TZ="Europe/Lisbon"
```