Mount point goes away when I close command prompt app

So I've been trying to work on the issue of my mount point vanishing whenever I close out of the command line on windows. I tried to run with --no-console Hide console window as a qualifier as well but it still just goes away. I also used the task scheduler to automate it and do it on start-up but the same issue persist. Start up in the command line, all works great, and the second I close the window I lost the mount point.

rclone v1.63.0
- os/version: Microsoft Windows 11 Home 22H2 (64 bit)
- os/kernel: 10.0.22621.1992 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.20.5
- go/linking: static
- go/tags: cmount

This is all just on local drive mounts over SFTP, it's going from my Debian 11 server to my Windows PC.

rclone mount localserver:/mnt/external1/roms R: Is the base cmd I'm trying to run, again some times adding int --no-console Hide console window

- type: sftp
- host: xxx
- user: xxx
- key_file: C:\Private Key\rclone.pem
- key_file_pass: *** ENCRYPTED ***
- use_insecure_cipher: true
- shell_type: unix
- md5sum_command: md5sum
- sha1sum_command: sha1sum

I'm sure I messed some stuff up here, but I tried to follow the template and read a few posts from a long time ago that I thought might have some answers. Thanks in advance, and sorry for the trouble!

Hi,

It's not possible to do that in Windows. The rclone command is running via the command prompt. And when you close the command prompt the other processes it is running are killed. If you want to run the mount command in the background without a shell window I suggest trying something like https://nssm.cc/

It was a very long time I used rclone on Windows but this was the way to do it before

1 Like

On Windows you have to use Task Scheduler or Windows Services. You can find multiple examples on Internet.

And indeed nssm makes it easy.

1 Like

Yea, I've been trying to get NSSM to work for me but I keep having issues. It'll be added as a service with the arguments as a mount and still not seem to load properly. I'll keep working at it and figure it out. I'm a lot more familiar with Linux so I've been fighting to remember a lot of Windows stuff. Thanks for the help from you both.

task scheduler much easier to use than nssm.

when running as a service need to:

  1. use a rclone debug log file
  2. hardcode full paths, c:\path\to\rclone.exe lsd remote: --config=c:\path\to\rclone.conf --log-file=c:\path\to\rclone.log
    strange that you are running rclone as a service and still rclone is visible.

image

1 Like

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