Is there a command to stop a server launched with rclone serve?

Probably it's a stupid question, but I can't find it in the documentation.

What operating system?

Linux based (Fedora, Termux on Android, etc.)

You can always kill the process:

ps -ef [felix@gemini ~]$ ps -ef | grep rclone
felix      787     1  1 Aug01 ?        00:54:24 /usr/bin/rclone mount gcrypt: /GD --allow-other --buffer-size 1G --dir-cache-time 96h --log-level INFO --log-file /opt/rclone/logs/rclone.log --timeout 1h --umask 002  --rc
felix    13624 13328  0 10:07 pts/0    00:00:00 grep rclone
[felix@gemini ~]$ kill 787

How did you start it up?

With rclone serve webdav myremote:, for example. I know I can simply kill the process, but I supposed there was a less dramatic way to do it (something like rclone serve -stop webdav myremote:). Thanks for the answer though!

Relevant comic :stuck_out_tongue_winking_eye:

Not sure what you mean as that's not dramatic at all. That's how most processes are stopped on Linux as it sends a graceful command to end the process.

You can't use fusermount since it's not a mount.

Also, kill by default only sends SIGTERM which can be caught and handled, not SIGKILL (without -9) which cannot be caught and handled cleanly.

Its now up to the process to handle it appropriately which rclone does.

Thanks for the explanations!

It would be simpler not to have to determine the process number every time though, but that's hardly a problem.

If you have it, you can pkill rclone.

If you can use systemd, you can make a startup script.

You can make a start/stop script and capture the PID on startup and stop it that way.

Those are a few other options.

I did not know of pkill, thanks again and sorry for my poor command line knowledge :sweat_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.