Beta Testing: WebGUI for rclone

I can confirm this.

@negative0 I think this change is to blame

@@ -130,7 +129,15 @@ func writeError(path string, in rc.Params, w http.ResponseWriter, err error, sta
 func (s *Server) handler(w http.ResponseWriter, r *http.Request) {
        path := strings.TrimLeft(r.URL.Path, "/")
-       w.Header().Add("Access-Control-Allow-Origin", "*")
+       allowOrigin := rcflags.Opt.AccessControlAllowOrigin
+       if allowOrigin != "" {
+               if allowOrigin == "*" {
+                       fs.Logf(nil, "Warning: Allow origin set to *. This can cause serious security problems.")
+               }
+               w.Header().Add("Access-Control-Allow-Origin", allowOrigin)
+       } else {
+               w.Header().Add("Access-Control-Allow-Origin", s.URL())
+       }
        // echo back access control headers client needs
        //reqAccessHeaders := r.Header.Get("Access-Control-Request-Headers")

s.URL() is on linux at least where go has resolved localhost to, whereas we are attempting to connect to http://localhost:5572 in the web ui by default.

Perhaps we should be using a URL synthesized from opt..HTTPOptions.ListenAddr here?

The problem is with the fact that we cannot predict if the request is coming from localhost or
So I am adding a fix in the latest version of rclone-webui-react which will take the default URL from the browser instead of hard coding it.

That sounds like a good fix. So if someone chooses IPv6 or running on a fixed IP it should work still?

Theoretically, it shouldn't matter, but I'll test and verify it.

The latest release v0.0.4 solves this issue. You can update to the latest version using the flag: - - rc-web-gui-update. Run using this flag only once, otherwise it will force download the files everytime you run rclone with this flag.

1 Like

Something appears to have gone wrong with the release

2019/08/13 09:48:47 NOTICE: A new release for gui is present at
2019/08/13 09:48:47 NOTICE: Downloading webgui binary. Please wait. [Size: 3812810, Path :  /home/ncw/.cache/rclone/webgui/]

So I'm getting v0.0.3 for some reason?

very interesting project, the more I work with rclone the more I really like it

I updated to the latest beta version and the gui does come up but when I go to login the Login button is grey and does not allow one to click on it. when I click on verify I get a bad username / password message

got it just had to change localhost to the ip address

just fantastic rclone gui - well done

yep, really cool software. very easy to create a new rclone config. very well done.

I tried to upload a file through the gui by clicking on the + button within Explorer and get the following error:

This remote cannot have empty directories.

When I click on Upload Media nothing happens and I suspect it is supposed to open Windows Explorer.

I used Rclone Browser with the same GCP storage Bucket and rclone configuration and was able to create a directory within the bucket itself.

can't wait for the final release to come out. really like what you have done.

Ok, I got both the current and beta versions of rclone installed and both are working well with Google Cloud Storage.

I am now testing out the rclone webgui on a virtual machine that is running in Google Cloud Compute Engine. It is Ubuntu 16.04 minimal Xenial. The command to launch the rclone web-gui works fine. Now I need to access the rclone web server component from an external IP address. I opened up the firewall for port 5572 but still cannot access the gui interface, which works great on my own Windows 10 machine when I am in fact also Obviously on the Ubuntu Virtual Machine I can't access the rclone web-gui directly as all of the gui desktop experience stuff is not loaded which would allow me to open a local web browser and hit on the machine running rclone rcd.

Anyone have any advice on access the rclone web-gui from a different machine/ip on the network I would appreciate your advice.

Hey @arnoldvilleneuve, thanks for taking the time to review this piece of software.

The upload file feature does not work directly yet. The + button only allows you to create directories. What you can do, is enter a local path in the explorer and you will be able to explore the local directories. Like this:

Uploading directly through the browser is WIP.

For accessing the web gui from a remote IP, you need to specify the public ip of your virtual machine using the flag --rc-addr=<ip_address>:<port_no>
I tried this on Ubuntu 16.04 on Amazon EC2 instance.

v0.0.4 is now available.

1 Like

will it provide the ability to access rclone via the webgui from a remote machine?

Yes, this should be what we needed. The VM is effectively within it's own subnet, so the host OS will be on the VMs WAN.

So the external IP of the VM running rclone will then be accessible from the host OS

Hey, I hope it worked. If you faced any issues during the process, please open up an issue on GitHub.

Trying to install and run rclone webgui on Windows Server 2019 CORE.

rclone by itself is working fine

using latest beta version

firewalls on server are disabled at the moment for testing

anyone have any tips for configuring rclonegui for Windows Server Core virtual machines?

I really need the solution to be accessible from a remote host public IP address web browser.

Is that feature / update in the works?

I think that error is rclone trying to open the webbrowser... It should be harmless I think.

That should work straight away - just make sure you bind the rcd to an address that can be viewed remotely then look at the URL in your browser.

here is the issue. I am running a VM on Google Cloud Platform and from the Operating System's perspective it does not see the external ip address (see the IPconfig output in the attached image). The ping works because Google Cloud automatically NATs the public IP to the private IP in the background. But when I run the rclone rcd command it is expecting to be able to see within the Operating System the public IP assigned to it. The message "not in context" seems to indicate that rclone rcd cannot find the public IP address specified because the operating system does not know about it either.


rclone rcd --rc-web-gui --rc-addr= --rc-user=user --rc-pass=passwd --rc-serve

GCP has a NAT Gateway so I am trying to figure out how to use it to forward external port 5572 to the internal IP address.

The bind should be to the private IP.

1 Like

Well, I have managed to configure VNC to tap into my Google Cloud Platform Linux Server that has the Gnome gui installed. The GCP Linux SSH Console of course does not allow you to access the Gnome gui but you can through a VNC session. With it I can now access the rclone web-gui locally on that host.

1 Like