openbridge / ob_bulkstash

Bulk Stash is a docker rclone service to sync, or copy, files between different storage services. For example, you can copy files either to or from a remote storage services like Amazon S3 to Google Cloud Storage, or locally from your laptop to a remote storage.
https://www.openbridge.com
MIT License
116 stars 16 forks source link

Can I use the rclone GUI? #19

Open davida72 opened 4 years ago

davida72 commented 4 years ago

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?

tspicer commented 4 years ago

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?

davida72 commented 4 years ago

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.

tspicer commented 4 years ago

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 commented 4 years ago

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.

davida72 commented 4 years ago

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:SYsVOi5Bjq1HAytC_qcnsw@127.0.0.1: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.

tspicer commented 4 years ago

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

davida72 commented 4 years ago

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 commented 4 years ago

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.

tspicer commented 4 years ago

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

davida72 commented 4 years ago

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.

tspicer commented 4 years ago

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

davida72 commented 4 years ago

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.

tspicer commented 4 years ago

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

tspicer commented 4 years ago

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.

davida72 commented 4 years ago

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.