├── README.md ├── services ├── .env_template └── docker-compose.yml └── smarthome └── docker-compose.yml /README.md: -------------------------------------------------------------------------------- 1 | # notthebee/homeserver 2 | 3 | The docker-compose configuration I used to use for my home server/NAS. 4 | 5 | I've since switched to Ansible for my infrastracture management: [https://github.com/notthebee/infra](https://github.com/notthebee/infra) 6 | 7 | ![Screenshot](https://user-images.githubusercontent.com/30384331/109420501-cb886380-79ca-11eb-8858-dc73771b6ce3.png) 8 | 9 | ## Services 10 | 11 | #### Media server and general maintenance: 12 | * [Ouroboros](https://github.com/pyouroboros/ouroboros), to update all of the containers automatically 13 | * [arch-delugevpn](https://hub.docker.com/r/binhex/arch-delugevpn), runs Deluge, Wireguard and Privoxy with a VPN killswitch 14 | * [Jellyfin](https://hub.docker.com/r/linuxserver/jellyfin), a media server 15 | * [Sonarr](https://hub.docker.com/r/linuxserver/sonarr), a TV show tracker and downloader 16 | * [Radarr](https://hub.docker.com/r/linuxserver/radarr), ditto for movies 17 | * [Jackett](https://hub.docker.com/r/linuxserver/jackett), a torrent indexer for Sonarr and Radarr 18 | * [Wireguard](https://hub.docker.com/r/linuxserver/wireguard), a Wireguard VPN server 19 | * [Homer](https://hub.docker.com/r/b4bz/homer), a fancy homepage 20 | 21 | #### Smart home stuff: 22 | * [Home Assistant](https://hub.docker.com/r/homeassistant/home-assistant), an open source home automation platform 23 | * [deCONZ](https://github.com/marthoc/docker-deconz), an interface for Conbee (Zigbee gateway) 24 | 25 | 26 | ## Usage 27 | Create a folder for your configuration files: 28 | 29 | ``` 30 | mkdir -p /opt/docker/compose 31 | ``` 32 | 33 | Clone this repository: 34 | 35 | ``` 36 | cd /opt/docker/compose 37 | git clone https://github.com/notthebee/homeserver 38 | ``` 39 | 40 | Rename and edit the .env_template file 41 | ``` 42 | mv services/.env_template services/.env 43 | cd smarthome 44 | ln -s ../services/.env .env 45 | vim services/.env 46 | ``` 47 | 48 | Start the containers 49 | ``` 50 | cd services && docker-compose up -d 51 | cd smarthome && docker-compose up -d 52 | ``` 53 | -------------------------------------------------------------------------------- /services/.env_template: -------------------------------------------------------------------------------- 1 | LAN_NETWORK=192.168.1.0/24 2 | MERGERFS=/path/to/your/drive 3 | UID=1000 4 | GID=1000 5 | TZ=Europe/Berlin 6 | WG_HOST=your.wireguard.host 7 | WG_PEERS=laptop, phone, pc 8 | DATA=/opt/docker/data 9 | -------------------------------------------------------------------------------- /services/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | 4 | # Ouroboros: Automatically update your running Docker containers to the latest available image 5 | # https://github.com/pyouroboros/ouroboros 6 | ouroboros: 7 | container_name: ouroboros 8 | hostname: ouroboros 9 | image: pyouroboros/ouroboros 10 | environment: 11 | - CLEANUP=true 12 | - INTERVAL=300 13 | - LOG_LEVEL=info 14 | - SELF_UPDATE=true 15 | - IGNORE=mongo influxdb postgres mariadb 16 | - TZ=${TZ} 17 | restart: unless-stopped 18 | volumes: 19 | - /var/run/docker.sock:/var/run/docker.sock 20 | 21 | # Arch Linux container running Deluge, Wireguard and Privoxy 22 | # https://github.com/binhex/arch-delugevpn 23 | delugevpn: 24 | container_name: delugevpn 25 | image: binhex/arch-delugevpn:latest 26 | restart: unless-stopped 27 | cap_add: 28 | - net_admin 29 | ports: 30 | - 0.0.0.0:8112:8112 31 | - 58846:58846 32 | - 0.0.0.0:8118:8118 33 | privileged: true 34 | sysctls: 35 | - "net.ipv4.conf.all.src_valid_mark=1" 36 | environment: 37 | - VPN_ENABLED=yes 38 | - VPN_PROV=custom 39 | - VPN_CLIENT=wireguard 40 | - ENABLE_PRIVOXY=yes 41 | - LAN_NETWORK=${LAN_NETWORK} 42 | - NAME_SERVERS=1.1.1.1, 1.0.0.1 43 | - DELUGE_DAEMON_LOG_LEVEL=info 44 | - DELUGE_WEB_LOG_LEVEL=info 45 | - DEBUG=true 46 | - UMASK=000 47 | - PUID=${UID} 48 | - PGID=${GID} 49 | - TZ=${TZ} 50 | volumes: 51 | - ${DATA}/deluge/data:/data 52 | - ${DATA}/deluge/config:/config 53 | - ${MERGERFS}/Downloads:/home/nobody/Downloads 54 | - /etc/localtime:/etc/localtime:ro 55 | 56 | # Plex – a self-hosted media server 57 | # https://docs.linuxserver.io/images/docker-plex 58 | plex: 59 | image: ghcr.io/linuxserver/plex 60 | container_name: plex 61 | network_mode: host 62 | environment: 63 | - PUID=${UID} 64 | - PGID=${GID} 65 | - TZ=${TZ} 66 | - VERSION=docker 67 | volumes: 68 | - ${DATA}/plex/config:/config 69 | - ${MERGERFS}/Media/TV:/tv 70 | - ${MERGERFS}/Media/Movies:/movies 71 | restart: unless-stopped 72 | devices: 73 | - /dev/dri:/dev/dri 74 | 75 | # Sonarr: TV show tracker and downlaoder 76 | # https://hub.docker.com/r/linuxserver/sonarr 77 | sonarr: 78 | container_name: sonarr 79 | image: linuxserver/sonarr:latest 80 | restart: unless-stopped 81 | network_mode: host 82 | ports: 83 | - 0.0.0.0:8989:8989 84 | environment: 85 | - PUID=${UID} 86 | - PGID=${GID} 87 | - TZ=${TZ} 88 | volumes: 89 | - /etc/localtime:/etc/localtime:ro 90 | - ${DATA}/sonarr:/config # config files 91 | - ${MERGERFS}/Media/TV:/tv # tv shows folder 92 | - ${MERGERFS}/Downloads:/downloads 93 | 94 | # Radarr: TV show tracker and downlaoder 95 | # https://hub.docker.com/r/linuxserver/radarr 96 | radarr: 97 | container_name: radarr 98 | image: linuxserver/radarr:latest 99 | restart: unless-stopped 100 | network_mode: host 101 | ports: 102 | - 0.0.0.0:7878:7878 103 | environment: 104 | - PUID=${UID} 105 | - PGID=${GID} 106 | - TZ=${TZ} 107 | volumes: 108 | - /etc/localtime:/etc/localtime:ro 109 | - ${DATA}/radarr:/config # config files 110 | - ${MERGERFS}/Media/Movies:/movies # movies folder 111 | - ${MERGERFS}/Downloads:/downloads 112 | 113 | # Jackett: Torrent indexer for Sonarr and Radarr 114 | # https://hub.docker.com/r/linuxserver/jackett 115 | jackett: 116 | container_name: jackett 117 | image: linuxserver/jackett:latest 118 | restart: unless-stopped 119 | network_mode: host 120 | ports: 121 | - 0.0.0.0:9117:9117 122 | environment: 123 | - PUID=${UID} 124 | - PGID=${GID} 125 | - TZ=${TZ} 126 | volumes: 127 | - /etc/localtime:/etc/localtime:ro 128 | - ${DATA}/jackett:/config # config files 129 | 130 | # Homer: A fancy homepage for self-hosted services 131 | # https://hub.docker.com/r/b4bz/homer 132 | homer: 133 | container_name: homer 134 | image: b4bz/homer 135 | restart: unless-stopped 136 | network_mode: host 137 | ports: 138 | - 0.0.0.0:8080:8080 139 | environment: 140 | - PUID=${UID} 141 | - PGID=${GID} 142 | - TZ=${TZ} 143 | volumes: 144 | - ${DATA}/homer:/www/assets 145 | 146 | # Wireguard VPN server 147 | # https://hub.docker.com/r/linuxserver/wireguard 148 | wireguard: 149 | image: ghcr.io/linuxserver/wireguard 150 | container_name: wireguard 151 | cap_add: 152 | - NET_ADMIN 153 | - SYS_MODULE 154 | environment: 155 | - PUID=${UID} 156 | - PGID=${GID} 157 | - TZ=${TZ} 158 | - SERVERURL=${WG_HOST} 159 | - SERVERPORT=51820 #optional 160 | - PEERS=${WG_PEERS} 161 | - PEERDNS=auto #optional 162 | volumes: 163 | - ${DATA}/wgserver/config:/config 164 | - /lib/modules:/lib/modules 165 | ports: 166 | - 51820:51820/udp 167 | sysctls: 168 | - net.ipv4.conf.all.src_valid_mark=1 169 | restart: 170 | unless-stopped 171 | -------------------------------------------------------------------------------- /smarthome/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | homeassistant: 4 | container_name: home-assistant 5 | image: homeassistant/home-assistant:stable 6 | volumes: 7 | - ${DATA}/hass:/config 8 | environment: 9 | - TZ=${TZ} 10 | restart: always 11 | network_mode: host 12 | 13 | deconz: 14 | image: marthoc/deconz 15 | container_name: deconz 16 | ports: 17 | - 8085:80 18 | - 4043:443 19 | restart: always 20 | volumes: 21 | - ${DATA}/hass/deconz:/root/.local/share/dresden-elektronik/deCONZ 22 | devices: 23 | - /dev/ttyACM0 24 | environment: 25 | - DECONZ_WEB_PORT=80 26 | - DECONZ_WS_PORT=443 27 | - DEBUG_INFO=1 28 | - DEBUG_APS=0 29 | - DEBUG_ZCL=0 30 | - DEBUG_ZDP=0 31 | - DEBUG_OTAU=0 32 | --------------------------------------------------------------------------------