Rclone GUI on headless and mounts

What is the problem you are having with rclone?

The GUI looks connected, but not shows real stats and data

What is your rclone version (output from rclone version)

rclone v1.51.0

  • os/arch: linux/amd64
  • go version: go1.13.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Debian (proxmox)

Which cloud storage system are you using? (eg Google Drive)

Gdrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone rcd --rc-web-gui -vv --rc-addr :5572 --rc-user admin --rc-pass 000000

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2020/04/21 23:29:46 DEBUG : rc: "core/stats": with parameters map[]
2020/04/21 23:29:46 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/21 23:29:48 DEBUG : rc: "core/stats": with parameters map[]
2020/04/21 23:29:48 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/21 23:29:51 DEBUG : rc: "core/stats": with parameters map[]
2020/04/21 23:29:51 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/21 23:29:53 DEBUG : rc: "core/stats": with parameters map[]
2020/04/21 23:29:53 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/21 23:29:56 DEBUG : rc: "core/stats": with parameters map[]
2020/04/21 23:29:56 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]: ...and continues,,,

THE SITUATION

I have 2 diferents drives mounted in my Proxmox host. Those are Gdrive: and Novedades:. To map it in the /mnt/ respective folder I use the next service called :

rclone.service

[Unit]
Description=Mount and cache Google drive to /media/Plex
After=syslog.target local-fs.target network.target
[Service]
Environment=RCLONEHOME=/home/orz/.config/rclone
Environment=MOUNTTO=/mnt/Gdrive
Environment=LOGS=/home/orz/logs
Environment=UPLOADS=/home/orz/uploads
Type=simple
User=root
ExecStartPre=/bin/mkdir -p ${MOUNTTO}
ExecStartPre=/bin/mkdir -p ${LOGS}
ExecStartPre=/bin/mkdir -p ${UPLOADS}
ExecStart=/usr/bin/rclone mount
--rc
--log-file ${LOGS}/rclone.log
--log-level INFO
--umask 022
--allow-non-empty
--allow-other
--fuse-flag sync_read
--tpslimit 10
--tpslimit-burst 10
--dir-cache-time=160h
--buffer-size=64M
--attr-timeout=1s
--vfs-read-chunk-size=2M
--vfs-read-chunk-size-limit=2G
--vfs-cache-max-age=5m
--vfs-cache-mode=writes
--cache-dir ${UPLOADS}
--config ${RCLONEHOME}/rclone.conf
Gdrive: ${MOUNTTO}
ExecStop=/bin/fusermount -u -z ${MOUNTTO}
ExecStop=/bin/rmdir ${MOUNTTO}
Restart=always
[Install]
WantedBy=multi-user.target

novedades.service

[Unit]
Description=Mount and cache Google drive to /media/Plex
After=syslog.target local-fs.target network.target
[Service]
Environment=RCLONEHOME=/home/orz/.config/rclone
Environment=MOUNTTO=/mnt/Novedades
Environment=LOGS=/home/orz/logs
Environment=UPLOADS=/home/orz/uploads
Type=simple
User=root
ExecStartPre=/bin/mkdir -p ${MOUNTTO}
ExecStartPre=/bin/mkdir -p ${LOGS}
ExecStartPre=/bin/mkdir -p ${UPLOADS}
ExecStart=/usr/bin/rclone mount
--rc
--log-file ${LOGS}/novedades.log
--log-level INFO
--umask 022
--allow-non-empty
--allow-other
--fuse-flag sync_read
--tpslimit 10
--tpslimit-burst 10
--dir-cache-time=160h
--buffer-size=64M
--attr-timeout=1s
--vfs-read-chunk-size=2M
--vfs-read-chunk-size-limit=2G
--vfs-cache-max-age=5m
--vfs-cache-mode=writes
--cache-dir ${UPLOADS}
--config ${RCLONEHOME}/rclone.conf
Novedades: ${MOUNTTO}
ExecStop=/bin/fusermount -u -z ${MOUNTTO}
ExecStop=/bin/rmdir ${MOUNTTO}
Restart=always
[Install]
WantedBy=multi-user.target

That works well and allow me sideserver copy, wich is very important for me.

The problem

Reading this forum I make the next line:

rclone rcd --rc-web-gui -vv --rc-addr :5572 --rc-user admin --rc-pass xxxxxxx

Wich allows me to acces from my computer to my Headless server and see the the rclone config file, and the folders inside...but no data is showed in the main screen. This shoot has been taken during a rclone copy action.

And the line output shows the next log.

So, could someone give me and advice to make rclonegui and my rclone gui working together? In addition I would like to run the rclone gui when the server starts...without this command line needs.

Thanks!

I'm trying to figure out what you want to do.

Your goal is to see the mount stats from the rclonegui that you spawn up?

Yes. And check if the mount process .service are ok. In my daily routine I have no access to a ssh or logs, for that reason if I can check the rclone stats with web, it's a nice option.

Yeah, that's not how the rcd works unfortunately. It allows to you to copy/move/call jobs but doesn't interact without other rclone processes.

You 2 mounts are 2 separate rclone processes that are running and independent of each other. You can run those with a rcd and it would have a separate port and you can interact with it that way.

Nice. I'm only interested in one of the mounts, because the other only do a sideserver copies. And a small number of GB. So, focused on it. How can I modify this service to allow webaccess and control with the GUI?

This mount is the one that upload my local downloads, my gdrive backup and all the matters stuff.

Thanks again!

rclone.service

[Unit]
Description=Mount and cache Google drive to /media/Plex
After=syslog.target local-fs.target network.target
[Service]
Environment=RCLONEHOME=/home/orz/.config/rclone
Environment=MOUNTTO=/mnt/Gdrive
Environment=LOGS=/home/orz/logs
Environment=UPLOADS=/home/orz/uploads
Type=simple
User=root
ExecStartPre=/bin/mkdir -p ${MOUNTTO}
ExecStartPre=/bin/mkdir -p ${LOGS}
ExecStartPre=/bin/mkdir -p ${UPLOADS}
ExecStart=/usr/bin/rclone mount
--rc
--log-file ${LOGS}/rclone.log
--log-level INFO
--umask 022
--allow-non-empty
--allow-other
--fuse-flag sync_read
--tpslimit 10
--tpslimit-burst 10
--dir-cache-time=160h
--buffer-size=64M
--attr-timeout=1s
--vfs-read-chunk-size=2M
--vfs-read-chunk-size-limit=2G
--vfs-cache-max-age=5m
--vfs-cache-mode=writes
--cache-dir ${UPLOADS}
--config ${RCLONEHOME}/rclone.conf
Gdrive: ${MOUNTTO}
ExecStop=/bin/fusermount -u -z ${MOUNTTO}
ExecStop=/bin/rmdir ${MOUNTTO}
Restart=always
[Install]
WantedBy=multi-user.target

And one question more...this stats are based in rclone stats or API stats. I mean, if I use this rclone account in 2 VMs, but with the same account...will the GUI show all stats or just the local where GUI is mounted?

rclone only knows about rclone as it does not report or have any view into any API stats as those are per backend and per provider.

It would only know about the stats on which the rcd/webgui is running.

Perfect! Thanks. As I said, this is enough for me because this is the main account that I use.

So, how can I modify the mount create the web and everything?

Im trying with the next:

rclone.service

[Unit]
Description=Mount and cache Google drive to /media/Plex
After=syslog.target local-fs.target network.target
[Service]
Environment=RCLONEHOME=/home/orz/.config/rclone
Environment=MOUNTTO=/mnt/Gdrive
Environment=LOGS=/home/orz/logs
Environment=UPLOADS=/home/orz/uploads
Type=simple
User=root
ExecStartPre=/bin/mkdir -p ${MOUNTTO}
ExecStartPre=/bin/mkdir -p ${LOGS}
ExecStartPre=/bin/mkdir -p ${UPLOADS}
ExecStart=/usr/bin/rclone mount
--rc
--rc-web-gui
--rcd
--rc-addr :5572
--rc-user admin
--rc-pass xxxx
--log-file ${LOGS}/rclone.log
--log-level INFO
--umask 022
--allow-non-empty
--allow-other
--fuse-flag sync_read
--tpslimit 10
--tpslimit-burst 10
--dir-cache-time=160h
--buffer-size=64M
--attr-timeout=1s
--vfs-read-chunk-size=2M
--vfs-read-chunk-size-limit=2G
--vfs-cache-max-age=5m
--vfs-cache-mode=writes
--cache-dir ${UPLOADS}
--config ${RCLONEHOME}/rclone.conf
Gdrive: ${MOUNTTO}
ExecStop=/bin/fusermount -u -z ${MOUNTTO}
ExecStop=/bin/rmdir ${MOUNTTO}
Restart=always
[Install]
WantedBy=multi-user.target

And of course, don't work...hahaha.

You got a lot of extra stuff in there that makes it a bit complex for no value.

When you say it doesn't work, what does that mean? Is there an error?

Can be removed as the defaults are fine.

Is not good to use as it allows for over mounting and hiding things.

Ok. I made proposed changes.

[Unit]
Description=Mount and cache Google drive to /media/Plex
After=syslog.target local-fs.target network.target
[Service]
Environment=RCLONEHOME=/home/orz/.config/rclone
Environment=MOUNTTO=/mnt/Gdrive
Environment=LOGS=/home/orz/logs
Environment=UPLOADS=/home/orz/uploads
Type=simple
User=root
ExecStartPre=/bin/mkdir -p ${MOUNTTO}
ExecStartPre=/bin/mkdir -p ${LOGS}
ExecStartPre=/bin/mkdir -p ${UPLOADS}
ExecStart=/usr/bin/rclone mount
--rc-web-gui
--rc-addr :5572
--rc-user admin
--rc-pass 00000
--log-file ${LOGS}/rclone.log
--log-level INFO
--umask 022
--allow-other
--dir-cache-time=160h
--buffer-size=64M
--vfs-cache-mode=writes
--cache-dir ${UPLOADS}
--config ${RCLONEHOME}/rclone.conf
Gdrive: ${MOUNTTO}
ExecStop=/bin/fusermount -u -z ${MOUNTTO}
ExecStop=/bin/rmdir ${MOUNTTO}
Restart=always
[Install]
WantedBy=multi-user.target

With this config, the mount works, but when I try to access to the web and port dont work.

When you say doesn't work, can you explain more. What are you putting into a browser? Is it on the same machine? Do you have a firewall in the middle or something blocking it?

Sorry. I'm not an expert. As I said I'm in headless server, on debian. I have exposed the port and try to connect to the headless server:port. Just a switch in the middle are is installed in my local. Otherwise, the mounting point works again.

So your PC and server are on the same network?

That error is telling you that the port is either not connecting or you have a firewall or something on your PC.

You can check on the server if you indeed have it running on the port you think:

felix@gemini:~$ netstat -an | grep 5572
tcp        0      0 127.0.0.1:5572          0.0.0.0:*               LISTEN

In my example, it only listens locally so nothing remote can connect.

Yes. All in the same network and nothing works in my PC. When I execute:

netstat -an | grep 5572 nothing is showed, but when I try with other servers in diferents ports, works nice.

root@Servidor:/home/orz/logs# netstat -an | grep 8006
tcp        0      0 0.0.0.0:8006            0.0.0.0:*               LISTEN

For that reason, I'm sure the problem is in the mounting script....but I have no idea where...

If you made changes to the service, you need to reread them in and restart the service.

As root:

systemctl daemon-reload

that refreshes the changes.

And stop and start your service.

You can check the log rclone.log and see if the port started up.

Thanks for the advice. I reboot the server every time when I make a change. The port is not showed in the log...

Can you share the full log of the last time you tried to start it? If you step through and share the information, it can sped up the process as things like "doesn't work" or "not there" provides no information to go on as we have to go back and forth.

My log don't show any info related...but I will try to offer some more information.

rclone rcd --rc-addr=192.168.1.240:5572 --rc-serve --rc-web-gui-no-open-browser --rc-user gui --rc-pass 123465 --log-file /home/orz/logs/rclonegui.log

When I launch this command, the GUI is accesible, so these are the parameters that I need to insert in my rclone.service.

2020/04/22 15:51:45 INFO : Using --user admin --pass XXXX as authenticated user
2020/04/22 15:51:45 NOTICE: Serving remote control on http://192.168.1.240:5572/
2020/04/22 15:51:46 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:51:46 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:51:46 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:51:46 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:51:51 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:51:51 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:51:51 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:51:51 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:51:56 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:51:56 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:51:56 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:51:56 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:52:01 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:52:01 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:52:01 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:52:01 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:52:06 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:52:06 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:52:06 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:52:06 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:52:11 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:52:11 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:
2020/04/22 15:52:11 DEBUG : rc: "core/stats": with parameters map[]
2020/04/22 15:52:11 DEBUG : rc: "core/stats": reply map[bytes:0 checks:0 deletes:0 elapsedTime:0 errors:0 fatalError:false retryError:false speed:0 transfers:0]:

If you can't share the log, I can't really help much more as I can't see your screen.

The log you shared shows a working rcd daemon.

The RCD provides a remote control daemon and won't provide a GUI to log into. You'd use the remote control daemon by using remote control commands.

Examples are here:

https://rclone.org/rc/

2020/04/22 16:08:01 DEBUG : rclone: Version "v1.51.0" starting with parameters ["/usr/bin/rclone" "mount" "--rc-web-gui-no-open-browser" "--rc-addr=192.168.1.240:5573" "--rc-serve" "--rc-user" "admin" "--rc-pass" "00000" "--log-file" "/home/orz/logs/rclone.log" "--umask" "022" "--allow-non-empty" "--allow-other" "--dir-cache-time=160h" "--buffer-size=64M" "--vfs-cache-mode=writes" "--cache-dir" "/home/orz/uploads" "--config" "/home/orz/.config/rclone/rclone.conf" "-vv" "-P" "Gdrive:" "/mnt/Gdrive"]
2020/04/22 16:08:01 DEBUG : Using config file from "/home/orz/.config/rclone/rclone.conf"
2020/04/22 16:08:01 DEBUG : Google drive root '': Mounting on "/mnt/Gdrive"
2020/04/22 16:08:01 DEBUG : vfs cache root is "/home/orz/uploads/vfs/Gdrive"
2020/04/22 16:08:01 DEBUG : Adding path "vfs/forget" to remote control registry
2020/04/22 16:08:01 DEBUG : Adding path "vfs/refresh" to remote control registry
2020/04/22 16:08:01 DEBUG : Adding path "vfs/poll-interval" to remote control registry
2020/04/22 16:08:01 DEBUG : : Root:
2020/04/22 16:08:01 DEBUG : : >Root: node=/, err=
2020/04/22 16:08:01 DEBUG : SUBIDAS/Peliculas/34_Certificado-de-movilidad.pdf: updateTime: setting atime to 2020-04-22 15:16:01.426999835 +0200 CEST
2020/04/22 16:08:01 INFO : Cleaned the cache: objects 4 (was 0), total size 82.950k (was 0)
2020/04/22 16:08:04 DEBUG : /: Attr:
2020/04/22 16:08:04 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2020/04/22 16:08:04 DEBUG : : Statfs:
2020/04/22 16:08:04 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:05 DEBUG : /: Attr:
2020/04/22 16:08:05 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2020/04/22 16:08:05 DEBUG : : Statfs:
2020/04/22 16:08:05 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:06 DEBUG : /: Attr:
2020/04/22 16:08:06 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2020/04/22 16:08:06 DEBUG : : Statfs:
2020/04/22 16:08:06 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:07 DEBUG : /: Attr:
2020/04/22 16:08:07 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2020/04/22 16:08:07 DEBUG : : Statfs:
2020/04/22 16:08:07 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:08 DEBUG : /: Attr:
2020/04/22 16:08:08 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2020/04/22 16:08:08 DEBUG : : Statfs:
2020/04/22 16:08:08 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:09 DEBUG : : Statfs:
2020/04/22 16:08:09 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:09 DEBUG : /: Attr:
2020/04/22 16:08:09 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2020/04/22 16:08:09 DEBUG : : Statfs:
2020/04/22 16:08:09 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:10 DEBUG : : Statfs:
2020/04/22 16:08:10 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:10 DEBUG : : Statfs:
2020/04/22 16:08:10 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:10 DEBUG : /: Attr:
2020/04/22 16:08:10 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2020/04/22 16:08:10 DEBUG : : Statfs:
2020/04/22 16:08:10 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:11 DEBUG : /: Attr:
2020/04/22 16:08:11 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2020/04/22 16:08:11 DEBUG : : Statfs:
2020/04/22 16:08:11 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:216235653314 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/04/22 16:08:12 DEBUG : /: Lookup: name="OrZ"