Compile rclone with custom default config path


I am new here and at the rclone’s world too, I just now compiled that code on my NAS. But it’s /root folder (which is the current user’s home folder) mounted as a RAMdisk. So on a reboot we loose anything. Is there a way to use a global /ffp/etc/rclone.conf file instead of the user specific config file at the homedir? And Can I compile the code with this default path?

I found a config.go file, but I am not sure, what I have to change there…

Many thanks! :slight_smile:

Probably easiest to use the --config option?

Okay, but I want to compile the source to use this config path. Because I am creating a package from that.

Probably easiest to change fs/config.go:

configFile      = pflag.StringP("config", "", ConfigPath, "Config file.")


configFile      = pflag.StringP("config", "", "/path/to/my/config/file", "Config file.")

I still think using the --config option would be easier though - it isn’t like you can use rclone without supplying command line arguments…