Wednesday at 10:15 PM4 days As a pCloud user, I want to access my pCloudDrive directly in Unraid without rclone or similar setup. I have therefore created my pCloudDrive directory in /mnt/addons, where it is accessible whenever the array is active.The addons folder is provided by the Unassigned Devices plugin.One caveat is, that pCloud automatically creates a cache directory in /root called .pcloud. This is of course not usable, since /root is cached in RAM and not suitable for a multi-gigabyte cache array. The trick is to create a symbolic link from a directory on your cachedrive to /root/.pcloud. I have my appdata on my cachedrive, so the target of the symbolic link is /mnt/cache/appdata/.pcloud.Another issue is to obtain the 2 executables required for running pCloud, pcloudcc and libpcloudcc_lib.so. A recipe for creating them (on a non-Unraid machine) is found here. I place pcloudcc in /usr/local/bin and libpcloudcc_lib.so in /usr/local/lib64.These are the steps, where I provide a couple of links to the binaries, please determine whether you want to trust them, or build your own. All steps are performed while logged in as the root user:wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1VjM4LYJNva0hKh_w5JeSzGvvCWSKxQeW' -O pcloudcc wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=111APld3uG9cx8hqfMzkxeGAjC-DRgDYI' -O libpcloudcc_lib.so mv libpcloudcc_lib.so /usr/local/lib64 chmod +x /usr/local/lib64/libpcloudcc_lib.so mv pcloudcc /usr/local/bin chmod +x /usr/local/bin/pcloudcc ln -s /usr/bin/fusermount3 /bin/fusermount # Might not be required, see below ldconfigAfter this, try to issue this command:pcloudcc -hThis should provide the pcloud version (as of writing 2.0.1) and a list of valid commands.In case it complains about lack of Fuse 3 support, it might be required to equip Unraid with Fuse 3 library, it is possible, but outside the scope of this guide. It could be as simple as setting a symbolic link to fusermount3: ln -s /usr/bin/fusermount3 /bin/fusermountpCloud requires device validation for new logins. This means you must use the server based browser to perform the validation. In case you run a headless server, this can be a challenge, but using an SSH tunnel is known to work. Visit https://my.pcloud.com and login, which validates the server.Next step is to setup pCloud:pcloudcc -u <[email protected]> -s -p -m /mnt/addons/pCloudDrive &This will prompt for your password and store it for later use. In my case, it was able to detect, that my account lives in the European zone, you might require to specify another zone.After initialization and validation has happened, press enter and issue this command to close the session: echo finalize | pcloudcc -kDont worry about error messages from the finalize command, it will terminate any running pcloudcc session.With no pcloudcc session active, now is the time to move the /root/.pcloud directory to /mnt/cache/appdata and create the symlink:mv /root/.pcloud /mnt/cache/appdata ln -s /mnt/cache/appdata/.pcloud /root/.pcloud Finally we are ready to run pCloud by issuing this command:pcloudcc -u <[email protected]> -dNow your pCloudDrive is available under addons folder.Personally I run the pcloudcc without the -d daemon option inside a tmux session.tmux new-session -d -s pcloud 'pcloudcc -u <[email protected]>'tmux is installed by the Tmux Terminal Manager (TTM) or the Unassigned Devices Preclear plugin.Since Unraid initializes the runtime environment from scratch by each startup, many of the above steps must be re-applied after each boot. I have been able to create user scripts, that initializes and starts pCloud, but found that it placed the .pcloud directory in / instead of in /root. Moving it to /mnt/cache/appdata and create the symlink fixed this.Attached, please find my pcloudinstall bash script, which requires a base64 encoded password file available in /boot/config/custom/pcloudpwd.txt. The pCloud binaries are also placed in this directory. It is set to run by Scripts plugin at first array start only. The install script does not start pCloud, this must be performed manually or by another script. Also attached is a script, which properly stops pCloud, which is set to execute at array stopping. Please note, that any install removes the cache setup, and if any upload was ongoing when stopped, it will be discarded.I have a 10TB lifelong pCloud drive available and use it for all off-site backups and other purposes. My automated setup provides seamless access to this directly within Unraid.pcloudstop.sh pcloudinstall.sh Edited Thursday at 03:12 PM3 days by pederm
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.