ob_bulkstash icon indicating copy to clipboard operation
ob_bulkstash copied to clipboard

Can I use the rclone GUI?

Open davida72 opened this issue 5 years ago • 15 comments

I think this container is set up for command line, but I wondered if there was a way to configure it to use the new GUI?

davida72 avatar Feb 05 '20 22:02 davida72

Which UI, this? https://github.com/rclone/rclone-webui-react?

Can you describe more of what you looking for? Do you want this running all the time locally?

tspicer avatar Feb 05 '20 22:02 tspicer

No, the official one here.

https://rclone.org/gui/

I tried to achieve this with the official docket by adding the appropriate arguments and the log suggested it worked, but I was unable to connect despite making the port available.

I like the look of your container because it already allows for saving the config outside of the container.

I’d love to use rclone gui in GUI mode from other computers on my network.

davida72 avatar Feb 05 '20 22:02 davida72

It is the same project. What you referenced is the CLI to initialize the project I linked to.

If you ran it, any errors? Any logs that you can share? docker logs....? Did you do a pull or a build? Version? Did you try to exec into the container to see if you can connect to the UI via curl? I don't have enough info to provide feedback on what you need to do.

tspicer avatar Feb 05 '20 22:02 tspicer

It looks like this is more of a client app, there is no server per se. This is why it spawns the browser which loads the react app. If you wanted to run it like I think you want to run it, more as the container operating as a server, then it might require running node js express to serve the app.

I will certainly give it some thought, or if anyone else wants to undertake the effort happy to accept the contribution.

tspicer avatar Feb 05 '20 22:02 tspicer

Thanks for your patience. Bear with me as I’m on mobile and I’m not a docker expert.

Here’s the log.

2020/02/05 22:01:41 ERROR : Failed to open Web GUI in browser: exec: "xdg-open": executable file not found in $PATH. Manually access it at: http://gui:[email protected]:5572/?login_token=Z3VpOlNZc1ZPaTVCanExSEF5dENfcWNuc3c%3D

I replaced 127.0.0.1 with my local IP but I was unable to connect.

I pulled rclone/rclone using docker compose. Didn’t consider using Curl to try and connect from within the container. Good idea.

davida72 avatar Feb 05 '20 22:02 davida72

Thanks, that confirms what I expected. It wants to open a browser as if it is local

tspicer avatar Feb 05 '20 22:02 tspicer

Here’s a conversation I was having on the recline forum. I’d love to have the GUI running on a server.

https://forum.rclone.org/t/gui-in-official-docker-image/14103/4

davida72 avatar Feb 05 '20 23:02 davida72

Thanks, that confirms what I expected. It wants to open a browser as if it is local

Agreed. But I don’t think it’s a showstopper. I think the server is running but it just can’t launch the browser, which I don’t care about.

davida72 avatar Feb 05 '20 23:02 davida72

It looks like a client side app. Not seeing a server here

tspicer avatar Feb 05 '20 23:02 tspicer

There's a server there too. I just got it working with the official docker container, but yours has some additional functionality so later I'll try and get it working with that.

If you want to try it yourself, you can add the command

rcd --rc-web-gui --rc-addr :5572

which will initiate the web gui and allow other IPs to access it.

davida72 avatar Feb 06 '20 18:02 davida72

Interesting. Can you run top to see what process is running as the server? is it node express?

tspicer avatar Feb 06 '20 18:02 tspicer

To quote the author

Rclone does contain a web server, that is correct. The go standard library has an excellent web server built in and rclone uses it for lots of things!

Two things I'm looking to achieve, which feel within reach now. I'd like to be able to set a default login and password, so that I don't have to get them from the log and I'd like to store my server configs in a configs folder outside the container, which I understand yours does.

davida72 avatar Feb 06 '20 18:02 davida72

Thanks for pointing that out, makes sense now how it is serving the react app.

tspicer avatar Feb 06 '20 18:02 tspicer

Can you share your docker run or docker compose file you used to execute the server? It will be easier to see what you were doing and how to best proceed.

tspicer avatar Feb 11 '20 15:02 tspicer

Sure. I use Docker Compose and Portainer to manage my containers on a headless box. Here's the YML.

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

The web interface is then available at http://[ip-address]:5572 across my network with user and password as test.

It works really well. There are a couple of issues I'd like to resolve which are that it doesn't seem to be available outside my LAN and I'm having to build the conf file from a command line on my Mac. Oh, and I haven't worked out how to copy from my local drives using rclone. I doubt those are hard to figure out but I haven't had time to take a look.

It would be great to have a Docker container with all of those things ready to go out of the box.

davida72 avatar Feb 12 '20 09:02 davida72