Fatal: create repository - cannot implicitly run relative executable rclone.exe found in current directory, use -o rclone.program=./<program> to override

Hello everyone. I only work on Windows and so far I have not had any problems configuring the repositories with rclone and restic.

However, on a computer I get this error:

Fatal: create repository at rclone:server-idrivee2:server-idrivee2 failed: cannot implicitly run relative executable rclone.exe found in current directory, use -o rclone.program=./ to override

After putting the password in this command:

restic -r rclone:server-idrivee2:server-idrivee2 init

The rclone remote is fine (server-idrivee2) and the bucket server-idrivee2 is OK with the credentials.

I say this on the basis that I can create the same repository on another computer.

I don’t know what this error corresponds to, something about relative paths or precedence between commands, but I didn’t find answers searching for info.

I did the test with either rclone.exe and restic.exe in the same directory or both in another folder in the root of the C drive.

If I try

.\restic -r rclone.program=./rclone:server-idrivee2:server-idrivee2 init

I get

Fatal: create repository at rclone.program=./rclone:server-idrivee2:server-idrivee2 failed: invalid backend
If the repository is in a local directory, you need to add a local: prefix

So I found this:


If you get an error message saying “cannot implicitly run relative executable rclone found in current directory”, this means that an rclone executable was found in the current directory. For security reasons restic will not run this implicitly, instead you have to use the -o rclone.program=./rclone extended option to override this security check and explicitly tell restic to use the executable.

But how is it applied in Windows?

Since you are using Windows, presumably your rclone binary is named rclone.exe instead of just rclone, so just add -o rclone.program=./rclone.exe before the init part in your original command (of course separating it from the other command line arguments with a space as usual).

EDIT: I haven’t actually tried it since I don’t use Windows, so perhaps the / doesn’t work. But try it and see. If it doesn’t work, try changing the / to a \ instead.

1 Like

presumably your rclone binary is named rclone.exe


Thanks a lot. I will try tomorrow and will update de answer

Update 1:
Believe it or not, today I executed the same command as always… and it worked!

restic -r rclone:server-idrivee2:server-idrivee2 init

I didn’t make any changes, I don’t know what happened before.

Thanks a lot for the help

Update 2:
The solution!
The problem was repeated in another installation and the solution was to execute the same command but being positioned in the root of the disk and not in the folder where the executable files were saved!

C:\Tools with rclone.exe and restic.exe
Then I just run the command but from