Docker - rclone.conf not found despite creating remote

Hello ! First topic here and hopefully the last ^^

What is the problem you are having with rclone?

Despite creating a remote linked to Google Drive successfully with rclone config, I can't see rclone.conf anywhere. Even rclone can't see it. And so, rclone config doesn't print my remote if I run rclone config again. Am I missing something ? I sought for a while a solution but couldn't find it unfortunately which lead me to create this topic.

What is your rclone version (output from rclone version)

Latest version pulled with : docker pull rclone/rclone:latest
rclone v1.54.0

  • os/arch: linux/amd64
  • go version: go1.15.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Debian 10 VM.

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

Google Drive.

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

docker run -it --rm rclone/rclone:latest config
docker run -it --rm rclone/rclone:latest config file

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

2021/03/17 21:10:52 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "config" "-vv"]
2021/03/17 21:10:52 NOTICE: Config file "/config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> gdrive
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value

Storage> 15
** See help for drive backend at: https://rclone.org/drive/ **

Google Application Client Id
Setting your own is recommended.
See https://rclone.org/drive/#making-your-own-client-id for how to create your own.
If you leave this blank, it will use an internal key which is low performance.
Enter a string value. Press Enter for the default ("").
client_id> ***************************
OAuth Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> ***************************
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ "drive"
 2 / Read-only access to file metadata and file contents.
   \ "drive.readonly"
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ "drive.file"
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ "drive.appfolder"
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ "drive.metadata.readonly"
scope> 1
ID of the root folder
Leave blank normally.

Fill in to access "Computers" folders (see docs), or for rclone to use
a non root folder as its starting point.

Enter a string value. Press Enter for the default ("").
root_folder_id>
Service Account Credentials JSON file path
Leave blank normally.
Needed only if you want use SA instead of interactive login.

Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.

Enter a string value. Press Enter for the default ("").
service_account_file>
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n> n
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n> n
Please go to the following link: ***************************
Log in and authorize rclone for access
Enter verification code>***************************
2021/03/17 21:11:30 DEBUG : gdrive: Saved new token in config file
Configure this as a team drive?
y) Yes
n) No (default)
y/n> n
--------------------
[gdrive]
type = drive
client_id = ***************************
client_secret = ***************************
scope = drive
token = {"access_token":"***************************","token_type":"Bearer","refresh_token":"***************************","expiry":"2021-03-17T22:11:29.295491934Z"}
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
2021/03/17 21:11:42 DEBUG : Using default permissions for config file: -rw-------
Current remotes:

Name                 Type
====                 ====
gdrive               drive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q
2021/03/17 21:11:45 DEBUG : rclone: Version "v1.54.0" finishing with parameters ["rclone" "config" "-vv"]
root@debian:/home/ben/workflow# docker run -it --rm rclone/rclone:latest config -vv
2021/03/17 21:11:58 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "config" "-vv"]
2021/03/17 21:11:58 NOTICE: Config file "/config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q>q

root@debian:/home/ben/workflow# docker run -it --rm rclone/rclone:latest config file
Configuration file doesn't exist, but rclone will use this path:
/config/rclone/rclone.conf
root@debian:/home/ben/workflow# ls -lta /config/rclone/rclone.conf
ls: impossible d'accéder à '/config/rclone/rclone.conf': Aucun fichier ou dossier de ce type
root@debian:/home/ben/workflow# ls -lta ~/
.bash_history  .bashrc        data/          .lesshst       .local/        .profile       .ssh/

Welcome!

Hope not:

:slight_smile:

docker run -it --rm rclone/rclone:latest config
docker run -it --rm rclone/rclone:latest config file

Not very much experience with docker myself, but don't you need to remove (at least the first) --rm option for this to work?

Thanks ! :slight_smile:

Interesting point. I used it because I followed commands from official docs and the point of it was to remove the rclone container once the command was executed. But out of curiosity, I tried without --rm... And same result unfortunately apart from the fact that container the container is not removed.

Yes, my point was that --rm on the first removes the container, with the created config, so then the next will start from clean and not find any config.

Anyway, the dockerfile has environment set assuming:

You need to mount the host rclone config dir at /config/rclone into the Docker container.

So, perhaps your case (without --rm on the first) works if adding --config followed by file path where folder exists (--config=/home/name/rclone.conf). You would get config inside container. But as docs say, it's best to keep this on host.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.