Skip to content

Instantly share code, notes, and snippets.

@ryanamaral
Last active March 5, 2025 15:06
Show Gist options
  • Save ryanamaral/b0471467153a40e88e6da8ef0463f35b to your computer and use it in GitHub Desktop.
Save ryanamaral/b0471467153a40e88e6da8ef0463f35b to your computer and use it in GitHub Desktop.
[NAS] How to setup OMV5 in Raspberry Pi 4 + Emby + Transmission + Syncthing + Photoview + GooglePhotosBackup

How to setup OMV5 in a Raspberry Pi 4 with all the extras :)

Install Raspberry Pi OS Lite (32 Bit) and enable SSH:

$ cd /Volumes/boot
$ touch ssh

Steps

  1. OMV5.md

How to setup OpenMediaVault 5 + Extras in a Raspberry Pi. Extras include: Docker, Portainer and others

  1. Emby.md

Emby for Home media center!
Unfortunatly Plex connects to the internet and we don't like that :(
Jellyfin is 100% open-source but still raw and requires manual file/folder naming

  1. Transmission.md

Download of Torrents remotely

  1. YoutubeDownloaderMaterial.md

Download Youtube videos with simple & easy dashboard

  1. Syncthing.md

Sync multiple devices folders with a web dashboard & apps

  1. Photoview.md

Photo viewer dashboard with faces and map

  1. GooglePhotosBackup.md

Backup Google Photos to OMV Shared Folder

Hardware

Raspberry Pi 4B 8GB
I'm also using for my tests a MacOS as desktop client & an Android device

TODO

  • PhotoPrism (for 64 Bits only)
  • JDownloader2 (for 64 Bits only)
  • RSync - Sync two NAS in different locations with a cronjob
  • SnapRaid - Rebuild disk if failure case
  • UnionNFS - Merge disks for auto-managment based on disk free space
  • ZFS perhaps is not as good as UnionNFS but let's test it out
  • Luke Encryption - How to restore if case of failure?

Install OpenMediaVault 5 via Terminal

Some of the plugins from the OMV-Extras repository are,

  • openmediavault-backup: Backup plugin for OpenMediaVault. This plugin will backup the entire OpenMediaVault system into a folder.

  • openmediavault-downloader: OpenMediaVault downloader plugin Plugin to download files to a specified share using aria2, curl, or youtube-dl.

  • openmediavault-resetperms: Reset permissions of shared folder.

  • openmediavault-mergerfsfolders: To pool multiple folder under a single mountpoint giving resulting in a huge storage space.

  • openmediavault-remotemount: To mount remote shares on OMV.

  • openmediavault-zfs : Plugin for ZFS. This allows to create ZFS filesystems on OMV.

Connect to the Raspberry Pi

$ ssh [email protected]

password: raspberry

Change password:

$ passwd

-> setup local -> time zone: 'Europe/Lisbon' -> change hostname to NAS

$ sudo raspi-config

Update

$ sudo apt update
$ sudo apt upgrade -y

To avoid interface eth0 error

$ sudo rm -f /etc/systemd/network/99-default.link
$ sudo reboot

After reboot, proceed to install OpenMediaVault + Extras

$ sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

(Will reboot automatically in the end)

Go to OMV dashboard

  Example: http://192.168.1.124
  username: admin
  password: openmediavault

Change the default password

Install Emby with Portainer

Go to Portainer dashboard

  Example: http://192.168.1.124:9000

Stacks -> New stack

Copy-paste:

---
version: "2.1"
services:
  emby:
    image: ghcr.io/linuxserver/emby
    container_name: emby
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Lisbon
      - UNMASK_SET=022 #optional
    volumes:
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Config/Emby:/config
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/TV:/tvshows
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Movies:/movies
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Transmission/Downloads/complete:/new
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Videos:/videos
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Music:/music
    ports:
      - 8096:8096
    restart: unless-stopped

Deploy the stack!

Go to Emby dashboard

  Example: http://192.168.1.124:8096

Client Apps

Notes

Docker image: https://hub.docker.com/r/linuxserver/emby
Video tutorial: https://youtu.be/FAcG3V4Fn-s

Install Transmission with Portainer

Go to Portainer dashboard

  Example: http://192.168.1.124:9000

Stacks -> New stack

Copy-paste:

---
version: "2"
services:
  transmission:
    image: linuxserver/transmission
    container_name: transmission
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Lisbon
      - USER=admin
      - PASS=<PASSWORD>
    volumes:
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Config/Transmission:/config
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Transmission/Downloads:/downloads
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Transmission/Watch:/watch
    ports:
      - 9091:9091
      - 51413:51413
      - 51413:51413/udp
    restart: unless-stopped

Deploy the stack!

Go to Transmission dashboard

  Example: http://192.168.1.124:9091

Client Apps

Notes

Docker image: https://hub.docker.com/r/linuxserver/transmission
Video tutorial: https://www.youtube.com/watch?v=f50AGOOZudk
Written tutorial: https://dbtechreviews.com/2020/01/how-to-install-transmission-on-openmediavault-5/

Install YoutubeDL-Material with Portainer

Go to Portainer dashboard

  Example: http://192.168.1.124:9000

Stacks -> New stack

Copy-paste:

---
version: "2"
services:
  ytdl_material:
    image: tzahi12345/youtubedl-material:nightly
    container_name: youtubedl-material
    environment: 
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Lisbon
      - ALLOW_CONFIG_MUTATIONS='true'
    volumes:
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Config/YouTube:/app/appdata
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/YouTube/Video:/app/video
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/YouTube/Audio:/app/audio
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/YouTube/Subscriptions:/app/subscriptions
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/YouTube/Users:/app/users
    ports:
      - "8998:17442"
    restart: unless-stopped

Deploy the stack!

Go to YoutubeDL-Material dashboard

  Example: http://192.168.1.124:8998

Use with

  • Chrome Extension
Download: https://github.com/Tzahi12345/YoutubeDL-Material/blob/master/chrome-extension/youtubedl-material-chrome-extension.zip
Go to: chrome://extensions/
Load unpacked, and select directory with "youtubedl-material-chrome-extension" contents
  • Bookmark: javascript:(function()%7Bwindow.open('http://192.168.1.124:8998/#/home;url=' + encodeURIComponent(window.location) + ';audioOnly=false')%7D)()

Notes

Github: https://github.com/Tzahi12345/YoutubeDL-Material

Install Syncthing with Portainer

Go to Portainer dashboard

  Example: http://192.168.1.124:9000

Stacks -> New stack

Copy-paste:

---
version: "2.1"
services:
  syncthing:
    image: ghcr.io/linuxserver/syncthing
    container_name: syncthing
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Lisbon
      - UMASK_SET=022
    volumes:
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Config/Syncthing:/config
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Syncthing/Pixel:/Pixel
    ports:
      - 8384:8384
      - 22000:22000/tcp
      - 22000:22000/udp
      - 21027:21027/udp
    restart: unless-stopped

Deploy the stack!

Go to Syncthing dashboard

  Example: http://192.168.1.124:8384

Client Apps

Notes

Docker image: https://hub.docker.com/r/linuxserver/syncthing
Written tutorial: https://blog.crankshafttech.com/2020/01/setup-openmediavault-with-syncthing.html

Install Photoview with Docker Compose

Go to terminal

  Example: $ ssh [email protected]

Create stack manually

  $ nano docker-compose.yml

Copy-paste:

version: "3"

services:
  db:
    image: ghcr.io/linuxserver/mariadb:alpine-version-10.5.9-r0
    restart: always
    container_name: photoview-db
    environment:
      - MYSQL_DATABASE=photoview
      - MYSQL_USER=photoview
      - MYSQL_PASSWORD=photosecret
      - MYSQL_RANDOM_ROOT_PASSWORD=1
    volumes:
      - db_data:/var/lib/mysql

  photoview:
    image: viktorstrate/photoview:2
    restart: always
    container_name: photoview
    ports:
      - "9887:80"
    depends_on:
      - db

    environment:
      - PHOTOVIEW_DATABASE_DRIVER=mysql
      - PHOTOVIEW_MYSQL_URL=photoview:photosecret@tcp(db)/photoview
      - PHOTOVIEW_LISTEN_IP=photoview
      - PHOTOVIEW_LISTEN_PORT=80
      - PHOTOVIEW_MEDIA_CACHE=/app/cache
      #- MAPBOX_TOKEN=pk.... # get yours for free at https://account.mapbox.com/access-tokens/
      - GODEBUG=asyncpreemptoff=1
    volumes:
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Config/PhotoView/Cache:/app/cache
      - /srv/dev-disk-by-uuid-8b050af3-6966-4199-bc7b-252ece061be4/Syncthing/Pixel/DCIM/Camera:/photos:ro
volumes:
  db_data:
  api_cache:

Deploy

  $ docker-compose up -d

Go to Photoview dashboard

  Example: http://192.168.1.124:9887

  * Initial Setup *
  username: admin
  password: <PASSWORD>
  path: /photos

[Optional] Go to Portainer dashboard to check the Logs of the deployment

  Example: http://192.168.1.124:9000

Notes

Demo (demo:demo): https://photos.qpqp.dk/
Docker image: https://hub.docker.com/r/viktorstrate/photoview
Github: https://github.com/photoview/photoview

Backup Google Photos to OMV Shared Folder using Docker

Get google photos credentials

  1. Create project: https://console.cloud.google.com/home/dashboard?project=gphotos-pixel
  2. Create credentials: https://console.developers.google.com/apis/credentials?project=gphotos-pixel
  3. Download it as "client_secret_XXX.json" and save it under '~/gphotos' directory.

Mount samba volume locally

  1. Open Finder
  2. Command + K
  3. Example: smb://192.168.1.124/Photos
  4. Press Connect

Run the gphotos docker container

$ docker run \
	-ti \
	--name gphotos-pixel \
	-v /Volumes/Photos/Pixel:/storage \
	-v /Users/<USERNAME>/gphotos/client_secret_XXX.json:/config/client_secret.json:ro \
	gilesknap/gphotos-sync \
	--log-level INFO \
	/storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment