Setting up RClone mount on Ubuntu. A little steer greatly appreciated

Ok cool. So major changes to permissions etc should be made from root (Is sudo ok in this scenario?)

What did you mean by “and make sure the override file is there”?

Right so it’s still not working and Plex won’t open in a browser, even when I reinstall it from scratch. Let me document here my exact process and maybe we can work out what I’m getting wrong.

So I’m SSHing in as root with Putty and then I’m running the following commands…

  1. wget

  2. sudo dpkg -i plexmediaserver_1.14.1.5488-cc260c476_amd64.deb

  3. systemctl stop plexmediaserver

  4. chown -R craftyclown:craftyclown /var/lib/plexmediaserver

  5. systemctl daemon-reload

  6. systemctl start plexmediaserver

  7. I’m then opening a new instance of Putty with an SSH tunnel using Source port:8888 and destination:localhost:32400

  8. I’m entering http://localhost:8888/web into a web browser, but the page won’t load

Any obvious mistakes that you can see?

You need a 4a so you create the file called override.conf in the directory “/etc/systemd/system/plexmediaserver.service.d”

felix@gemini:/etc/systemd/system/plexmediaserver.service.d$ cat override.conf
#  These values are only needed if you wish to change user & group

# This is needed to change the default umask

How do I enter that into terminal?

I think I’d do:

mkdir -p /etc/systemd/system/plexmediaserver.service.d

To create the directory.

cd /etc/systemd/system/plexmediaserver.service.d
vi override.conf

That launches a vi session.

Hit ‘i’ to insert and paste in your modified stuff

#  These values are only needed if you wish to change user & group

# This is needed to change the default umask

Hit :wq!

And that should save the file out.

Great thanks, and those steps should fit in between my steps 4 and 5 right? Everything else looked ok though?

Yep, I think so as the rest looks good to me.

Cool. I’m doing a full reinstall of Ubuntu right now as at least that way I can be methodical.

I’m going to start with adding a new user and group (craftyclown) then add rclone and then use the above listed steps to install Plex.

Fingers crossed :smiley:

So we’re still not quite there yet.

Everything seems to work all the way up to the stage where I need to add libraries to Plex. I can see the mounted gdrive folder, but it’s greyed out and can’t be selected.

I feel like I’m so close now, but just can’t get past this final hurdle :frowning:

If I look at the mounted folder in Filezilla it’s owned by root:root and it’s permissions are 755.

Do I need to reinstall rclone as craftyclown rather than root? Would that change who is the owner of any mounts?

What’s your rclone mount command you are using?

rclone mount “gdrive:/The Skull” /home/craftyclown/Skull --daemon

You want to make sure you run the rclone as the user you want to use so I wouldn’t run it as root, but as the craftyclown user.

To stop the rclone process, you’d type:

fusermount -uz /home/craftyclown/Skull

Aaaaaaaaaaaand we’re there! :smiley:

What a relief! I felt like I was chasing my tail for a while there

Before I start adding folders to Plex, is there anything I should think about adding to my mount commands to prevent api bans. I’m going to be scanning 30tbs of data so I want to be careful.

Thanks again for all your help so far.

I think the defaults are 90% of what I’m running these days. As long as you have the latest version, you should be fine.

felix@gemini:~$ rclone version
rclone v1.45
- os/arch: linux/amd64
- go version: go1.11.2

I scanned pretty much 30TB in that fashion as well.

Cool! So I don’t need to worry about caching etc? I presume you turn off scanning on Plex?

Sorry the other only option I add to help out with reducing the API hits is:

--dir-cache-time 72h

That keeps the file/directory structure for 72 hours but it does poll for changes every minute.

For Plex, I keep deep analyze and thumbnails off.

what exactly does the 72 hour cache do?

So would this be about right?

rclone mount “gdrive:/The Skull” /home/craftyclown/Skull --daemon --dir-cache-time 72h