How to set up RClone WebGUI server as a Docker Container

I have a headless computer under the stairs in my house which I use to run services like RTorrent and Sonarr in Docker containers. It means that I can connect to them on my laptop or phone and then just leave them to run. I wanted to do the same for RClone, e.g. start a copy from Dropbox to Google Drive, close my laptop then go to work.

I thought I'd share what I did to get it working, although I'm not an expert and this can probably be improved. Feel free to add comments.

--

Firstly, add the official RClone Docker container to the computer that you want it to run on. Here's the offical documentation. I use Docker Compose (plus Portainer) to download and configure my containers and the YML file looks like this.

  rclone_rclone:
    image: rclone/rclone
    container_name: rclone_rclone
    restart: always
    command: rcd --rc-web-gui --rc-addr :5572 --rc-user jsmith --rc-pass mypassword
    ports:
      - "5572:5572"
    volumes:
      - /home/jsmith/docker/rclone_rclone:/config/rclone
      - /home/jsmith/docker/rclone_rclone:/logs
    environment:
      - PHP_TZ=Europe/London
      - PUID=1000
      - PGID=1000

Important things are the command, which runs the RClone GUI on a tiny web server built into rclone on port 5572 with a username and password, plus makes it available to other computers on the network. The volumes section puts the config and logs into a directory outside your container, which means that if you delete the container then you hang onto the config. PUID and PGID have to be correct according to your computer, more details here.

Run this container and RClone GUI should be working on http://[IP Address]:5572. It should look something like this

The WebUI is now working but it's not functional because it doesn't have any remote drives configured in the config file. There may be a way of achieving that in the WebGUI but I couldn't figure that out so I did it by creating a config file on another computer by downloading a non-docker version of RClone and using the config command. In my case that was a Dropbox and two Google Drives. The resulting config file can be found using the config file command.

Having located the config file, the last step is to copy the contents of this config file to the config file which your container version uses, which can be found wherever you set the config file in the volumes section of the YML file. In my case that was /home/jsmith/docker/rclone_rclone.

--

As mentioned at the start, this is in no way a complete guide but it will get things up and running and might be useful for some people. Other things I'd like to do are:

  1. Make it accessible to computers outside my LAN. For some reason that doesn't work.
  2. Figure out how to create remote drives within the GUI.
  3. Figure out how to add a local drive so that I can copy local (or network) files to my remotes.
  4. Update the official docs here.

Hope that helps someone.

1 Like

Nice guide :smiley:

That should be a question of running through the config in the GUI. Not all the config works 100% but it is nearly there.

You can just put in a path in the explorer I think.

Mount the local drive under the volumes section, similar to your other mounted volumes.
I.E.
volumes:
- mnt/driveMountOnLocalComputer:/LocationInDockerYouWantTo/PlaceTheDriveOrFolder

Thanks. The part I'm not clear about it is exactly how to set a local volume in rclone, although admittedly I haven't read the docs yet.

hello. and thank you for this great post!

i have installed rclone on my synology nas and mounted my google drive and an another mouth crpyted for my plex

i want to move it on docker after seen your post but

theres something i dont understand that whats benefits with rclone WebGUI ?

and my config file (the one using now on nas) would be efficient for rclone on docker ?

I like using a docker container instead of just installing it on the operating system because it's more robust. In the past, I've got something working, changed something in the operating system and it breaks but a docker container protects it. Plus docker containers can be reset, which makes it easy to rectify mistakes. That's not unique to rclone though, it's why people use Docker in general.

I like using WebGUI simply because I prefer the interface to the shell.

Hope that helps.