Can't find the correct command for docker rclone

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

Hi. I want a command to run with rclone that does the following:

  1. Mount 2 remotes
  2. Launches the Web GUI
  3. Waits, does not restart

I can't find what the correct command should be. My compose is the following:

  rclone:
    image: rclone/rclone
    container_name: rclone
    restart: unless-stopped
    privileged: true
    cap_add:
      - SYS_ADMIN
    command: '
      rc mount ShadowDriveCrypt:vaultwarden /mount/vaultwarden --allow-non-empty --daemon
      && rc mount ShadowDriveCrypt:matrix /mount/matrix --allow-non-empty --daemon
      && rc --rc-web-gui --rc-addr :5572 --rc-user admin --rc-pass ${RCLONE_ADMINPASSWORD} --rc-web-gui-no-open-browser
      '
    networks:
      services:
    volumes:
      - rclonevaultwarden:/mount/vaultwarden
      - rclonematrix:/mount/matrix
    configs:
      - source: rcloneconfig
        target: /config/rclone/rclone.conf

The command I have set does not work. I have the following error:
Fatal error: unknown flag: --allow-non-empty

Could you help me identify what I am doing wrong ?
Thanks in advance and have a nice day.

Run the command 'rclone version' and share the full output of the command.

1.69.1

Which cloud storage system are you using? (eg Google Drive)

ShadowDrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rc mount ShadowDriveCrypt:vaultwarden /mount/vaultwarden --allow-non-empty --daemon
      && rc mount ShadowDriveCrypt:matrix /mount/matrix --allow-non-empty --daemon
      && rc --rc-web-gui --rc-addr :5572 --rc-user admin --rc-pass ${RCLONE_ADMINPASSWORD} --rc-web-gui-no-open-browser

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[ShadowDrive]
type = webdav
url = https://drive.shadow.tech/remote.php/webdav
vendor = other
user = XXX
pass = XXX

[ShadowDriveCrypt]
type = crypt
remote = ShadowDrive:crypt
password = XXX
password2 = XXX

A log from the command that you were trying to run with the -vv flag

Fatal error: unknown flag: --allow-non-empty

welcome to the forum,

fwiw, make sure each command works on the command line without using docker.

there are many examples of working docker command in the forum and also working examples in the rclone docs.


afiak, that is not a valid flag for rc command.
https://rclone.org/rc/#mount-mount

Thanks for your answer.
I have found examples in the forums, but I couldn't find an example that combines both mounting and launching the web ui, without rclone being restarted in between (which either stops the mounting or the web ui)
Could you help me to find what the correct syntax would be ?

I have tried the following command, without rc:

mount ShadowDriveCrypt:vaultwarden /mount/vaultwarden --allow-non-empty --daemon
      && mount ShadowDriveCrypt:matrix /mount/matrix --allow-non-empty --daemon

It works on the binary rclone on my pc, but not on docker. It does not give any logs whatsoever. The container is constantly restarting. I can't find why.

I am wondering if there is an rclone docker image somewhere that can be configured from env variables instead of a command. It would be way easier to set up.

Thanks in advance and have a nice day.

Hi,

Could you help me finding the correct command syntax ? I tried dozens new configurations without finding a syntax that works. I haven't found a single example doing multiple commands using docker compose in the forums.

Thanks in advance for any answer, have a nice day.

Is there any reason you try to use docker? Rclone is simple stand-alone binary without any extra dependencies needed to do its magic.

Docker makes sense when you are planning to deploy some complex software on multiple machines. Otherwise it is academic exercise.

Not that there is anything wrong with learning and experimenting but if you have real problem to solve maybe it is not the right path to take? Especially that clearly you still have some way to go to master docker.

From rclone perspective your issue is pure docker deployment problem. Nothing to do with rclone itself.

Hi,

Thanks a lot for your answer.
Yes, docker makes sense in my homelab where 100% of the apps are docker containers. It also allows me to expose the web ui with proxy authentication using docker labels, docker networks....

But I very rarely use docker commands. And when I do, I only do a single command, not multiple. I couldn't find examples that work with the rclone container, hence my question.

1 Like

Hopefully somebody here can help you. It seems that docker is fashionable in some circles.

Maybe reaching to docker community would be better approach?