desimaniac edited this page Feb 11, 2019 · 311 revisions

System

Can I install this on an ARM machine?

ARM is not supported.

If you are using a Scaleway server...

  1. Choose an X86 server (vs ARM).

  2. Select "Ubuntu Xenial" as the distribution.

  3. Click the server on the list.

  4. Under "ADVANCED OPTIONS", click "SHOW".

  5. Set "ENABLE LOCAL BOOT" to off.

  6. Click the "BOOTSCRIPT" link and select one above > 4.10.

  7. Start the server.

Reference: https://www.scaleway.com/docs/bootscript-and-how-to-use-it/

If you are using an OVH server...

If you are having issues upgrading the kernel on ovh, where the kernel upgrade is not taking effect..

uname -r to see if you have grs in kernel version string...

if so, see https://pterodactyl-daemon.readme.io/v0.4/docs/updating-ovh-kernel on how to update the kernel.

Server RAM is being maxed out

If your server has < 16GB RAM, it's possible Plexdrive is maxing it out (you can check this via htop). Try lowering the max chunks used by Plexdrive:

  1. sudo nano /etc/systemd/system/plexdrive.service

  2. Modify the --max-chunks=250 to something lower (e.g. --max-chunks=100).

  3. Ctrl + X Y Enter to save.

  4. sudo systemctl daemon-reload

  5. sudo systemctl restart plexdrive.service

Find your User ID (UID) and Group ID (GID)

Use the following commands to find out your account's user name and group info:

id

or

id `whoami`

You'll see a line like the following:

uid=XXXX(yourusername) gid=XXXX(yourgroup) groups=XXXX(yourgroup)

How to create a user account

  • Run the following commands line by line:

    sudo useradd -m <username>
    sudo usermod -aG sudo <username>
    sudo passwd <username>
    sudo chsh -s /bin/bash <username>
    su <username>

Change shell of user account to bash

How to check current shell:

echo $0
-sh

or

echo ${SHELL}
/bin/sh

Run this command to set bash as your shell (where <user> is replaced with your username):

sudo chsh -s /bin/bash <user>
sudo reboot

How to fix permission issues

/opt folder

  1. Stop all docker containers

    docker stop $(docker ps -a -q)
    
  2. Change ownership of /opt. Replace user and group to match yours' (see here).

    sudo chown -R user:group /opt
    
  3. Change permission inheritance of /opt.

    sudo chmod -R ugo+X /opt
    
  4. Start all docker containers

    docker start $(docker ps -a -q)
    

/mnt folder

  1. Stop all docker containers

    docker stop $(docker ps -a -q)
    
  2. Stop Unionfs and Plexdrive

    sudo systemctl stop unionfs.service
    sudo systemctl stop plexdrive.service
    
  3. Change ownership of /mnt. Replace user and group to match yours' (see here).

    sudo chown -R user:group /mnt
    
  4. Change permission inheritance of /mnt.

    sudo chmod -R ugo+X /mnt
    
  5. Start Unionfs and Plexdrive

    sudo systemctl start plexdrive.service
    sudo systemctl start unionfs.service
    
  6. Start all docker containers

    docker start $(docker ps -a -q)
    

Domain Name

blank

Cloudflare

API request not authenticated

If you get this error during CB Install:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "API request not authenticated; Status: 403; Method: GET: Call: /zones?name=; Error details: code: 9103, error: Unknown X-Auth-Key or X-Auth-Email; "}

Make sure:

Cloud Storage

Does Cloudbox support encryption data on Google Drive?

In short, no.

Why does Cloudbox not support encryption data on Google Drive?

While there are pro's and cons for using either encrypted or unencrypted data on cloud services, Cloudbox Team have decided to not support encrypted cloud data.

Note: You may be able to modify Cloudbox to use encrypted data stored on the cloud (see here), but that will be on you to setup, yourself.

Does Cloudbox support any other cloud storage provider other than Google Drive?

Not OOB. But you can use Rclone mount instead of Plexdrive, which is Google Drive only, for your cloud storage provider.

Cloudbox Backup and Restore

What is backed up?

Only app data located in '/opt and relevant config files are backed up. It does this by creating tarball files (*.tar) for each folder in /opt/ and placing them into your backup folder (as set in backup_config.yml).

Torrent seeding content, NZBGet queue, anything in /mnt/, /home/, or anywhere else other than the /opt/ folder, will NOT be backed up (media files are moved to the cloud via Cloudplow, anyway). If you do want to backup your seeding data, checkout the scripts located in /opt/scripts/rclone/ folder.

If Rclone/Rsync are enabled, the backup will be uploaded to a remote destination.

If keep_local_copy is enabled, the backup will remain locally in the backup folder, or else they will be deleted. If you decide to disable Rclone/Sync, then at least have keep_local_copy enabled, or else the backup will be mae and then deleted right after.

The config files that are backed up are:

  • ansible.cfg

  • accounts.yml

  • settings.yml

  • adv_settings.yml

  • rclone.conf

  • backup_excludes.txt (if one exists in the cloudbox folder).

These files are kept separately from the backup tarball files to allow for easy access.

Nice table to see what is restored during simple backup/restore:

                         
Items Backed UP
     
Backed Up From
     
Restored To
Application Data /opt/ /opt/
Ansible Config ~/cloudbox/ansible.cfg
Account Settings ~/cloudbox/accounts.yml
Cloudbox Settings ~/cloudbox/settings.yml
Cloudbox Advanced Settings ~/cloudbox/adv_settings.yml
Backup Excludes List (custom) ~/cloudbox/backup_excludes_list.txt ~/cloudbox/backup_excludes_list.txt
Rclone Config ~/.config/rclone/rclone.conf ~/.config/rclone/rclone.conf

What is Cloudbox Restore Service?

An optional service that allows for easy backing up and restoring of CLIENT-SIDE ENCRYPTED config files.

The config files that are backed up are:

  • ansible.cfg

  • accounts.yml

  • settings.yml

  • adv_settings.yml

  • backup_config.yml

  • rclone.conf

These files are the ones needed to run a successful restore.

Note: backup_excludes_list.txt are not backed up into the Restore Service, simply because it is not important for a restore to work and also because it IS automatically restored during the restore process itself.

How does this work?

  1. User fills in a username and password for Restore Service in the backup config.

  2. During backup, config files are encrypted on the client-side, using a hashed version of the username and password (your raw username is never sent to the Restore Service), and then uploaded to the Restore Service.

  3. When a user needs to restore their backup on a new box, they can pull their backed up config files from the Restore Service with a single command.

Cloudbox Install

Ansible Tags

Multiple Tags

Run multiple tags together by separating them with commas, no spaces. Quotes are optional. Order is not important.

Use this to install containers or roles that are not included in "default" install types.

Example:

sudo ansible-playbook cloudbox.yml --tags core,emby,sonarr,radarr,sonarr4k,radarr4k,nzbget,nzbhydra2

Skip Tags

Skip tags you dont want to run by listing them with --skip-tags and separated by commas. Quotes are optional. Order is not important.

Use this to skip containers or roles that are included in the "default" install types.

Example:

sudo ansible-playbook cloudbox.yml --skip-tags rutorrent,jackett

Note: But be careful on what you skip, as some things are needed by Cloudbox to function properly.

Merging Tags and Skip-Tags

You can even merge --tags and --skip-tags into one command. Order is not important (e.g. skip tags can come before tags).

Example:

sudo ansible-playbook cloudbox.yml --tags core,emby,sonarr,radarr,sonarr4k,radarr4k,nzbget,nzbhydra2 --skip-tags rutorrent,jackett

Can also be used along with one of the "default" tags (e.g. cloudbox).

Example:

sudo ansible-playbook cloudbox.yml --tags cloudbox,sonarr4k,radarr4k --skip-tags rutorrent,jackett

Persistent Skip Tags

You can "permanently" skip tags by adding the following lines to ~/cloudbox/ansible.cfg.

Format:

[tags]
skip = TAG1,TAG2,etc

And then continue to install with the normal --tags command.

Example:

cat ~/cloudbox/ansible.cfg
[tags]
skip = rutorrent,jackett
sudo ansible-playbook cloudbox.yml --tags cloudbox,sonarr4k,radarr4k

In this example, the Cloudbox installer will install with all the default items, sonarr4k, and radarr4k, but will not install rutorrent and jackett.

Error while fetching server API version

Full error message:

Error Connecting:  Error while fetching server API version: Timeout value connect was Timeout(connect=60, read=60, total=None), but it must be an int or float.

Run sudo pip install requests==2.10.0 and retry.

403 Client Error: Forbidden: endpoint with name <container name> already exists in network <network name>

Example:

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Error starting container 6fb60d4cdabe938986042e06ef482012a1d85a66a099d861f08062d8262c2ef7: 403 Client Error: Forbidden (\"{\"message\":\"endpoint with name jackett already exists in network bridge\"}\")"}
    to retry, use: --limit @/home/seed/cloudbox/cloudbox.retry
PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=1

You have a remnant of the container in the Docker's network.

You can verify with the command below (replace <network name> and <container name> is replaced with the network name and container name mentioned in the error, respectively):

docker inspect network <network name> | grep <container name>

To remove the remnant, run this command and try again:

docker network disconnect -f <network name> <container name>

500 Server Error: Internal Server Error: driver failed programming external connectivity on endpoint <container name> bind for 0.0.0.0:<port number> failed: port is already allocated

sudo service docker stop
sudo service docker start

Updating Cloudbox

Errors during git pull

If you get any errors during git pull, you will need to reset the Cloudbox git folder (i.e. ~/cloudbox/). This will not reset your accounts.yml, settings.yml, adv_settings.yml, or ansible.cfg files.

  • If you are on the master branch (default):

    cd ~/cloudbox
    git reset --hard origin/master
  • If you are on the develop branch:

    cd ~/cloudbox
    git reset --hard origin/develop

Docker

Why does Cloudbox use the Docker network "cloudbox" instead of bridge?

(1) keeps all Cloudbox containers organized under one network; and (2), bridge network does not allow network aliases.

Docker Commands Hang

Issue: Docker apps stop loading and/or docker commands (e.g. docker --version) hang.

One reason this can happen is if docker-ce was recently updated.

To fix this:

Stop the service first

sudo service docker stop

Clean up some of the files as mentioned in above post from Sam.

sudo rm -rf /var/run/docker
sudo rm /var/run/docker.*

Start service now

sudo service docker start

Start your docker image

docker start <container-name>

You might receive an error when you run the docker run at first try:

Error response from daemon: invalid header field value "oci runtime error: container with id exists: 7a244b8f5d07081538042ff64aebfe11fac1a36731526e77be53db7d94dca44d\n"
Error: failed to start containers:

Try running docker start command again. You will have your container up and running magically without any errors.

source: https://forums.docker.com/t/what-to-do-when-all-docker-commands-hang/28103/5

Nginx Proxy

SSL Certificate Issues

You can view the status via looking at the log for the letsencrypt container.

docker logs -f letsencrypt

And see if the issues below apply to you..

Cloudbox app subdomains redirect elsewhere (eg. sonarr.domain.com goes to NZBGet)

This happens when SSL certificates have not been issued yet.

You may even see too many registrations for this IP in the log (like below)...

2017-11-30 03:35:41,847:INFO:simp_le:1538: Retrieving Let's Encrypt latest Terms of Service.
2017-11-30 03:35:42,817:INFO:simp_le:1356: Generating new account key
ACME server returned an error: urn:acme:error:rateLimited :: There were too many requests of a given type :: Error creating new registration :: too many registrations for this IP

Just give it some time (days to hours) and it will resolve itself.

Too many certificates already issued for domain.com

Creating/renewal request.domain.com certificates... (request.domain.com)
2017-12-02 07:34:44,167:INFO:simp_le:1538: Retrieving Let's Encrypt latest Terms of Service.
2017-12-02 07:34:45,331:INFO:simp_le:1356: Generating new account key
2017-12-02 07:34:46,853:INFO:simp_le:1455: Generating new certificate private key
ACME server returned an error: urn:acme:error:rateLimited :: There were too many requests of a given type :: Error creating new cert :: too many certificates already issued for: domain.com

You're limited to 20 new certificates, per registered domain, per week.

Visit https://letsencrypt.org/docs/rate-limits/ for more info.

CA marked some of the authorizations as invalid

2017-11-30 03:35:37,729:INFO:simp_le:1538: Retrieving Let's Encrypt latest Terms of Service.
2017-11-30 03:35:40,256:INFO:simp_le:1455: Generating new certificate private key
2017-11-30 03:35:41,406:ERROR:simp_le:1421: CA marked some of the authorizations as invalid, which likely means it could not access http://example.com/.well-known/acme-challenge/X. Did you set correct path in -d example.com:path or --default_root? Are all your domains accessible from the internet? Please check your domains' DNS entries, your host's network/firewall setup and your webserver config. If a domain's DNS entry has both A and AAAA fields set up, some CAs such as Let's Encrypt will perform the challenge validation over IPv6. If you haven't setup correct CAA fields or if your DNS provider does not support CAA, validation attempts after september 8, 2017 will fail.  Failing authorizations: https://acme-v01.api.letsencrypt.org/acme/authz/XXXXXXXXXX
Challenge validation has failed, see error log.
  • Make sure your domain registrar is pointing to the correct server IP address. You can verify this by pinging it (ping yourdomain.com).

  • Make sure you used the correct domain address in settings.yml.

Error 503

  • Check letsencrypt logs:

    docker logs -f letsencrypt
    
  • Check nginx-proxy logs:

    docker logs -f nginx-proxy
    
  • If you see ERR_TOO_MANY_REDIRECTS, disable Cloudflare CDN/Proxy.

  • If nothing pops out, check the logs for the docker container:

    docker logs -f nzbget
    

    See if it failed to start, terminated with a kill command, or misc errors.

  • See if you can load it up via ngrok tunnelling,

    ngrok http PORTNUMBER
    

    Visit the ngrok.io url it generates.

  • Make sure you PC's DNS is updated.

Rclone

Rclone error: Failed to save config file: open /home/<user>/.config/rclone/rclone.conf: permission denied

Replace user and group to match yours' (see here).

sudo chown -R user:group ~/.config/rclone/
sudo chmod -R 0755 ~/.config/rclone/

Plexdrive

Don't see your Google Drive files in /mnt/plexdrive?

Make sure your files are in the correct Google Drive paths.

See Basics: Cloudbox Paths and Prerequisites: Cloud Storage. Remember folder names mentioned throughout the site are CASE SENSITIVE.

Check on status

sudo systemctl status plexdrive

Error: Process: XXXXX ExecStop=/bin/fusermount -uz /mnt/plexdrive (code=exited, status=217/USER)

This could happen if you already had a user account on the server before adding it to settings.yml.

You simply need to edit 3 files located in /etc/systemd/system/ (plex_autoscan.service, plexdrive.service, and unionfs.service) like this...

sudo nano /etc/systemd/system/plexdrive.service

Replace User and Group under [Service] to match yours' (see here).

[Service]
User=yourusername
Group=yourgroupname

After editing all three files, reload systemctl:

sudo systemctl daemon-reload

And restart the services:

sudo systemctl restart plexdrive.service
sudo systemctl restart unionfs.service
sudo systemctl restart plex_autoscan.service

Plex

If you are unable to find your Plex server

You may resolve this by either

  • Installing Cloudbox again (do this for new Plex DBs/installs):

    • Remove Plex Container (it may show "Error response from daemon: No such container" if not created yet):

      sudo docker rm -f plex
      
    • Remove the Plex folder:

      sudo rm -rf /opt/plex
      
    • Reinstall the Plex container by running the following command in ~/cloudbox:

      sudo ansible-playbook cloudbox.yml --tags plex
      
  • Installing Cloudbox again (do this for existing Plex DBs/installs):

    • Remove Plex Preferences file.

      sudo rm "/opt/plex/Library/Application Support/Plex Media Server/Preferences.xml"
      
    • Reinstall the Plex container by running the following command in ~/cloudbox:

      sudo ansible-playbook cloudbox.yml --tags plex
      
  • Using SSH Tunneling to log into Plex and set your credentials:

    • On your host PC (replace <user> with your user name and <yourserveripaddress> with your serveripaddress - no arrows):

      ssh <user>@<yourserveripaddress> -L 32400:0.0.0.0:32400 -N
      

      This will just hang there without any message. That is normal.

    • In a browser, go to http://localhost:32400/web.

    • Log in with your Plex account.

    • On the "How Plex Works" page, click “GOT IT!”.

    • Close the "Plex Pass" pop-up if you see it.

    • Under "Server Setup", you will see "Great, we found a server!". Give your server a name and tick “Allow me to access my media outside my home”. Click "NEXT".

    • On "Organize Your Media", hit "NEXT" (you will do this later). Then hit "DONE".

    • At this point, you may Ctrl + c on the SSH Tunnel to close it.

If Plex shows you an incorrect title with the filename (eg RARBG releases)

Reorder the Plex agents for TV/Movies so that local assets are at the bottom.

Fix permission issues with Plex logs

Replace user and group to match yours' (see here).

sudo chown -R user:group /opt/plex/Library/Logs
sudo chmod -R g+s /opt/plex/Library/Logs

Note: If you have a separate Plex and Feeder setup, this will be done on the server where Plex is installed.

Plex Autoscan

If during the first time setup, you switched the order of Plex libraries (i.e TV first then Movies)

You will need to get the Plex section IDs and replace them in the Plex Autoscan config:

  1. Get section IDs by running the command: /opt/plex_autoscan/scan.py sections.

  2. Edit the Plex Autoscan config via nano /opt/plex_autoscan/config/config.json and switch the ID numbers to match the Section IDs from Step 1 (for a more detailed explanation on this, see this).

  3. Restart Plex Autoscan: sudo systemctl restart plex_autoscan

Newly downloaded media from Sonarr and Radarr are not being added to Plex?

  • Test another download and run the following command:

     tail -f /opt/plex_autoscan/plex_autoscan.log
    
  • If you see this...

    terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
    boost::filesystem::create_directories: Permission denied: "/config/Library/Logs"
    

    There is an issue with the permissions on that folder that you'll need to fix manually (Cloudbox can't fix this as Plex creates this folder after the first scan)

    To fix this, Run the following command. Replace user and group to match yours' (see here).

    docker stop plex
    sudo chown -R user:group /opt/plex
    docker start plex
    

    Example of a successful scan:

    2017-10-10 17:48:26,429 -    DEBUG -      PLEX [ 6185]: Waiting for turn in the scan request backlog...
    2017-10-10 17:48:26,429 -     INFO -      PLEX [ 6185]: Scan request is now being processed
    2017-10-10 17:48:26,474 -     INFO -      PLEX [ 6185]: No 'Plex Media Scanner' processes were found.
    2017-10-10 17:48:26,474 -     INFO -      PLEX [ 6185]: Starting Plex Scanner
    2017-10-10 17:48:26,475 -    DEBUG -      PLEX [ 6185]: docker exec -u plex -i plex bash -c 'export LD_LIBRARY_PATH=/usr/lib/plexmediaserver;/usr/lib/plexmediaserver/Plex\ Media\ Scanner --scan --refresh --section 1 --directory '"'"'/data/Movies/Ravenous (1999)'"'"''
    2017-10-10 17:48:33,712 -     INFO -     UTILS [ 6185]: GUI: Scanning Ravenous (1999)
    2017-10-10 17:48:33,959 -     INFO -     UTILS [ 6185]: GUI: Matching 'Ravenous'
    2017-10-10 17:48:38,556 -     INFO -     UTILS [ 6185]: GUI: Score for 'Ravenous' (1999) is 117
    2017-10-10 17:48:38,607 -     INFO -     UTILS [ 6185]: GUI: Requesting metadata for 'Ravenous'
    2017-10-10 17:48:38,705 -     INFO -     UTILS [ 6185]: GUI: Background media analysis on Ravenous
    2017-10-10 17:48:39,201 -     INFO -      PLEX [ 6185]: Finished scan!
    

Plex Autoscan log shows error during empty trash request

ERROR - PLEX [10490]: Unexpected response status_code for empty trash request: 401

You need to generate another token and re-add that back into the config. See Plex Autoscan.

Plex Autoscan error with metadata item id

Example Log:

 2017-11-21 04:26:32,619 -    ERROR -      PLEX [ 7089]: Exception finding metadata_item_id for '/data/TV/Gotham/Season 01/Gotham - S01E01 - Pilot.mkv':
 2017-11-21 04:26:32,619 -     INFO -      PLEX [ 7089]: Aborting analyze of '/data/TV/Gotham/Season 01/Gotham - S01E01 - Pilot.mkv' because could not find a metadata_item_id for it

Possible Issues:

  • One of the mounts has changed (e.g. Plexdrive or UnionFS was restarted).

  • Permission issues (see here).

Solution 1:

  1. Make sure Plexdrive and Unionfs are working ok

    sudo systemctl status plexdrive
    
    sudo systemctl status unionfs
    
  2. Restart Plex:

    docker stop plex && docker start plex
    

Solution 2:

If all else fails, disable analyze in config.

  1. Open /opt/plex_autoscan/config/config.json

    nano /opt/plex_autoscan/config/config.json
    
  2. Make the following edit:

    "PLEX_ANALYZE_TYPE": "off",
    
  3. Restart Plex Autoscan

    sudo systemctl restart plex_autoscan
    

Purpose of a Control File in Plex Autoscan

Every time Sonarr or Radarr downloads a new file, or upgrades a previous one, a request is sent to Plex via Plex Autoscan to scan the movie folder or TV season path and look for changes. Since Sonarr and Radarr delete previous files on upgrades, the scan will cause the new media to show up in your Plex Library, however, the deleted files would be missing, and instead, marked as "unavailable" (i.e. trash icon). When the control file is present and the option in the Plex Autoscan config is enabled (default), Plex Autoscan will empty the trash for you, thereby, removing the deleted media from the library.

If your Google Drive ever disconnected during a Plex scan of your media, Plex would mark the missing files as unavailable and emptying the trash would cause them to be removed out of the library. To avoid this from happening, Plex Autoscan checks for a control file in the unionfs path (i.e. /mnt/unionfs/mounted.bin) before running any empty trash commands. The control file is just a blank file that resides on the root folder of Google Drive and let's Plex Autoscan know that your Google Drive is mounted.

Once Google Drive is remounted, all the files marked unavailable in Plex will be playable again and Plex Autoscan will resume its emptying trash duties post-scan.

To learn more about Plex Autoscan, visit https://github.com/l3uddz/plex_autoscan.

TLDR: Plex Autoscan will not remove deleted media out of Plex without it.

Plex Autoscan Localhost Setup

If you are using an all-in-one Cloudbox and don't want to have the Plex Autoscan port open, you may set it up so that it runs on the localhost only.

To do so, follow these steps:

Plex Autoscan: (only if changed from default)

  1. Open /opt/plex_autoscan/config/config.json

    nano /opt/plex_autoscan/config/config.json
    
  2. Make the following edit:

    "SERVER_IP": "0.0.0.0",
    

    Note: This is the default config.

  3. Restart Plex Autoscan

    sudo systemctl restart plex_autoscan
    

Sonarr/Radarr:

  • Retrieve the 'Docker Gateway IP Address' by running the following:

    docker inspect -f '{{ .NetworkSettings.Networks.cloudbox.Gateway }}' sonarr
    
  • Replace the Plex Autoscan URL with:

    http://docker_gateway_ip_address:3468/yourserverpass
    
  • You Plex Autoscan URL will now look like this:

    http://172.18.0.1:3468/yourserverpass
    

Alternatively, you can set it up this way:

Note: This method benefits from completely closing off Plex Autoscan to the outside.

Plex Autoscan:

  1. Retrieve the 'Docker Gateway IP Address' by running the following:

    docker inspect -f '{{ .NetworkSettings.Networks.cloudbox.Gateway }}' sonarr
    
  2. Open /opt/plex_autoscan/config/config.json

    nano /opt/plex_autoscan/config/config.json
    
  3. Make the following edit:

    "SERVER_IP": "docker_network_gateway_ip_address",
    
  4. This will now look like this:

    "SERVER_IP": "172.18.0.1",
    
  5. Restart Plex Autoscan

    sudo systemctl restart plex_autoscan
    

Sonarr/Radarr:

  • Replace the Plex Autoscan URL with:

    http://docker_gateway_ip_address:3468/yourserverpass
    
  • You Plex Autoscan URL will now look like this:

    http://172.18.0.1:3468/yourserverpass
    

Why is SERVER_SCAN_DELAY set to 180 seconds by default?

When Plex Autoscan gets a scan request from Sonarr, it tells Plex to scan the relevant TV Show season folder. So to avoid multiple Plex scans of the same season when more episodes of that same season come in, Plex Autoscan can wait (ala SERVER_SCAN_DELAY) and merge multiple scan requests into a single one. This is particularly noticeable when consecutive episodes are being downloaded/imported into Sonarr.

During this SERVER_SCAN_DELAY, if another request comes in for the same season folder, it will restart the delay timer again, thus allowing for even more time for new items to come in.

SERVER_SCAN_DELAY of 180 seconds was calculated with an average episode download time of a few minutes each.

There is no harm in multiple Plex scans of the same season folder, except for more busyness of Plex, and perhaps more stress to it, so this delay will try to alleviate that.

Alternative recommended settings are: 120 and 90 seconds.

Cloudplow

Stuck on "Waiting for running upload to finish before proceeding..."

If the activity log is stuck on:

2018-06-03 13:44:59,659 - INFO       - cloudplow            - do_upload                      - Waiting for running upload to finish before proceeding...

This means that an upload task was prematurely canceled and it left lock file(s) to prevent another upload.

To fix this, run this command:

rm -rf /opt/cloudplow/locks/*

or

sudo systemctl restart cloudplow

Sonarr / Radarr

Importing a Previous Sonarr or Radarr database

Cloudbox uses Sonarr's develop branch and Radarr's nightly branch during install. If you want to import an existing database that is on Sonarr's master branch or Radarr's develop branch (the two most stable branches), you should upgrade to those releases on a working installation first, make a backup, and then import into the respective folders (i.e. /opt/sonarr/ or /opt/radarr/).

ruTorrent

Change ruTorrent password after installation

  1. Stop the container:

    docker stop rutorrent
    
  2. Go into the folder where ruTorrent .htpasswd resides:

    cd /opt/rutorrent/nginx
    
  3. Rename the old .htpasswd:

    mv .htpasswd .htpasswd.bak
    
  4. Generate a new .htpasswd (where USER is your preferred username):

    htpasswd -c .htpasswd USER
    
  5. Verify that /opt/rutorrent/nginx/nginx.conf has auth_basic "Restricted Content"; and auth_basic_user_file /config/nginx/.htpasswd; inside all location references. See image below.

  6. Start the container:

    docker start rutorrent
    

Change ruTorrent download path after installation

  1. Stop ruTorrent Docker container:

    docker stop rutorrent
    
  2. Edit the rtorrent.rc file:

    /opt/rutorrent/rtorrent/rtorrent.rc
    
  3. Set the following options:

    directory = /downloads/rutorrent
    
  4. Start ruTorrent Docker container:

    docker restart rutorrent
    

Enable access to public torrent trackers

By default access to DHT, UDP, and PEX are disabled since most private trackers (and some server providers) do now allow this. Attempting to add a torrent from a public tracker would result in the torrent being stuck, like this:

To enable access to public trackers, do the following:

  1. Stop ruTorrent Docker container:

    docker stop rutorrent
    
  2. Edit the rtorrent.rc file:

    /opt/rutorrent/rtorrent/rtorrent.rc
    
  3. Set the following options:

    dht.mode.set = on
    
    trackers.use_udp.set = yes
    
    protocol.pex.set = yes
    
  4. Start ruTorrent Docker container:

    docker start rutorrent
    

Nextcloud

Backup/Restore DB

DB data is stored in /opt/mariadb and backedup along with Cloudbox Backup.

However, you can separately make a backup of the DB into a single nextcloud_backup.sql file, by running the following command.

docker exec mariadb /usr/bin/mysqldump -u root --password=password321 nextcloud  > nextcloud_backup.sql

And restoring it back:

cat nextcloud_backup.sql | docker exec -i mariadb /usr/bin/mysql -u root --password=password321 nextcloud

Misc

JSON Format Errors

Python or script errors mentioning an issue with the config file is usually due to an invalid JSON format in the file.

Examples:

Traceback (most recent call last):
  File "scan.py", line 52, in <module>
    conf.load()
  File "/opt/plex_autoscan/config.py", line 157, in load
    cfg = self.upgrade(json.load(fp))
  File "/usr/lib/python2.7/json/__init__.py", line 291, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Expecting , delimiter: line 20 column 2 (char 672)
Traceback (most recent call last):
  File "/opt/plex_autoscan/scan.py", line 52, in <module>
    conf.load()
  File "/opt/plex_autoscan/config.py", line 157, in load
    cfg = self.upgrade(json.load(fp))
  File "/usr/lib/python2.7/json/init.py", line 291, in load
    **kw)
  File "/usr/lib/python2.7/json/init.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Traceback (most recent call last):
  File "/usr/local/bin/cloudplow", line 60, in <module>
    conf.load()
  File "/opt/cloudplow/utils/config.py", line 227, in load
    cfg, upgraded = self.upgrade_settings(json.load(fp))
  File "/usr/lib/python3.5/json/__init__.py", line 268, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 46 column 13 (char 1354)

Fixes:

  1. Paste the JSON file at https://jsonformatter.curiousconcept.com/ and click process. This will tell you what the issue is and fix it for you.

    or

  2. Run:

    jq '.' config.json
    

    If there are no issues, it will simply print out the full JSON file.

    If there is an issue, a msg will display the location of the issue:

    parse error: Expected separator between values at line 7, column 10
    

Suitarr Image Versions

Image Versions:

  • image downloads the stable release via a hardcoded URL at container build and remains in the container even after reboot.

  • stable - downloads the latest stable release at each container start/restart.

  • unstable - downloads the latest unstable (i.e. beta) release at each start/restart.

  • default - points to image in Master branch (unstable in dev branch).

Comparison

image stable unstable
Build: stable stable unstable
URL: Hardcoded Fetched via GitHub API. Fetched via GitHub API.
Updated: At container rebuild. At restart. At restart.
Pros: - Immune to GitHub API going down.

- Stable Release - fewer bugs.
- Latest release is downloaded on every container restart.

- Stable Release - fewer bugs.
- Latest release is downloaded on every container restart.

- Beta Release - latest and greatest features.
Cons: - Requires dev (i.e Hotio) to update the hardcoded URL to the release manually in the image and then a container rebuild to update.

- Stable Release - fewer features; slower updates.
- GitHub API issues can cause container restart/build to fail.

- Stable Release - fewer features; slower updates.
- GitHub API issues can cause container restart/build to fail.

- Beta Release - risk of bugs and untested features.

Home

Basics

  1. Introduction
  2. Cloudbox Install Types
  3. Cloudbox Paths
  4. Accessing Cloudbox Apps

Prerequisites

  1. Presumptions
  2. Server
  3. Domain Name
  4. Cloudflare
  5. Cloud Storage
  6. Plex / Emby - Account
  7. Usenet vs. BitTorrent

Install Cloudbox

Cloudbox
  1. User Account
  2. Dependencies
  3. Ansible Vault
  4. Settings
  5. Cloudbox
  6. Application Setup
    1. Rclone
    2. Plexdrive
    3. NZBGet
    4. ruTorrent
    5. NZBHydra2
    6. Jackett
    7. Plex Media Server
    8. Plex Autoscan
    9. Sonarr
    10. Radarr
    11. Lidarr
    12. PlexPy (Tautulli)
    13. Ombi
    14. Portainer
    15. Organizr

Install Mediabox / Feederbox

Feederbox (do this first)
  1. User Account
  2. Dependencies
  3. Ansible Vault
  4. Settings
  5. Feederbox
  6. Application Setup
    1. Rclone
    2. Plexdrive
    3. NZBGet
    4. ruTorrent
    5. NZBHydra2
    6. Jackett
    7. Sonarr
    8. Radarr
    9. Lidarr
    10. Portainer
    11. Organizr

Mediabox
  1. User Account
  2. Dependencies
  3. Ansible Vault
  4. Settings
  5. Mediabox
  6. Application Setup
    1. Rclone
    2. Feeder Mount
    3. Plexdrive
    4. Plex Media Server
    5. Plex Autoscan
    6. PlexPy (Tautulli)
    7. Ombi

Recommended Reading

Backup and Restore

More Information

Advanced Configuration

Experimental

Extras

Docs coming soon for ...

  • Radarr4K
  • Sonarr4K

Misc Guides

Reference

Troubleshooting

Links

Community Project

External Links

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.