← Home

Cloud Media Server with Google Drive + DigitalOcean

Music streaming consolidation on Apple Music and Spotify makes a subscription to either of those platforms a no-brainer. But the video streaming wars have a created a big headache and mess of options that incentivizes self-consolidation by the tech-savvy consumer. I have unlimited storage on Google Drive via my insitution, and a DigitalOcean droplet that costs only $5/month, on which I setup my own Jellyfin instance. Here's how you can do the same.

Movies and TV with Jellyfin or Emby

  1. Create a DigitalOcean droplet

  2. Install Jellyfin or Emby

  3. Install Rclone

curl https://rclone.org/install.sh | sudo bash
  1. Create a mount point in your /home folder and setup Google Drive
cd /home
mkdir movies
rclone config # follow the instructions, and make sure to choose the option for headless setup
  1. Mount Google Drive
sudo rclone mount gdrive:movies /home/movies/ --allow-other --daemon --dir-cache-time 1000h
 
# `--allow-other` allows access to the `jellyfin` or `emby` user
# `--daemon` runs the mount in the background
# `--dir-cache-time 1000h` does some smart caching
  1. Configure Jellyfin/Emby

Open <DROPLET_URL>:8096 and follow the instructions. Add /home/movies as a media library. And you're done!

Books with Calibre Web

Lets assume you keep a Calibre Library in a books folder on your Google Drive.

First, mount your books directory:

sudo rclone mount gdrive:books /home/books/ --allow-other --daemon --dir-cache-time 1000h --vfs-cache-mode writes

That last flag is required for the content server to work.

Next, install Calibre Web by following the instructions here: https://github.com/janeczku/calibre-web. You can access the server from <DROPLET_URL>:8083, where you can point it to your books directory.

Rclone mount on server reboot

If you'd rather not remount every time the Droplet reboots, you can do the following:

Add these to your /etc/systemd/system:

  1. Movies
## rclone-movies.service
[Unit]
Description=rclone mount movies
After=network.target
 
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/rclone mount gdrive:movies /home/movies/ --allow-other --dir-cache-time 1000h
 
[Install]
WantedBy=multi-user.target
  1. Books
## rclone-books.service
[Unit]
Description=rclone mount books
After=network.target
 
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/rclone mount sarim-aya-drive:books /home/books/ --allow-other --dir-cache-time 1000h --vfs-cache-mode writes
 
[Install]
WantedBy=multi-user.target

After you add them, run the following:

sudo systemctl enable rclone-movies
sudo systemctl start rclone-movies
 
sudo systemctl enable rclone-books
sudo systemctl start rclone-books
 
sudo reboot