# Serve local forlder as WEBdav silently

**URL:** <https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720>\
**Category:** Help and Support\
**Created:** [April 20, 2023, 8:42am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720 "2023-04-20T08:42:22Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![utkarshsethi](https://forum.rclone.org/user_avatar/forum.rclone.org/utkarshsethi/32/14871_2.png) [@utkarshsethi](https://forum.rclone.org/u/utkarshsethi)\
**Post date:** [April 20, 2023, 8:42am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/1 "2023-04-20T08:42:22Z")

</div>

#### What is the problem you are having with rclone?

Trying to serve a local folder as WebDAV using a .bat file to run at startup.  
I want to do this silently, but can't get it to work. I don't want a console window open, I need it running 24x7

#### Run the command 'rclone version' and share the full output of the command.

```auto
rclone version 19 
rclone v1.62.2
- os/version: Microsoft Windows 11 Pro 22H2 (64 bit)
- os/kernel: 10.0.22621.1555 Build 22621.1555.1555 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.20.2
- go/linking: static
- go/tags: cmount

```

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

NA, I'm using a local filepath

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

Startup\_WebDAV.bat =\>

```auto
@echo off
@rclone serve webdav --no-console --quiet "D:\path\to\directory"

```

#### The rclone config contents with secrets removed.

```auto

```

empty file, I'm not using anything, its a fresh install on windows.

#### A log from the command with the `-vv` flag

This is opposite of what I'm trying to do but...

```auto
2023/04/20 18:39:21 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "serve" "webdav" "-vv" "D:\path\to\directory"]
2023/04/20 18:39:21 DEBUG : Creating backend with remote "D:\path\to\directory"
2023/04/20 18:39:21 DEBUG : Using config file from "C:\\Users\\[USERNAME]\\AppData\\Roaming\\rclone\\rclone.conf"
2023/04/20 18:39:21 DEBUG : fs cache: renaming cache item "D:\path\to\directory" to be canonical "//?/D:\path\to\directory"
2023/04/20 18:39:21 INFO : Local file system at //?/D:\path\to\directory: poll-interval is not supported by this remote
2023/04/20 18:39:21 NOTICE: Local file system at //?/D:\path\to\directory: WebDav Server started on [http://127.0.0.1:8080/]
2023/04/20 18:39:27 INFO : Signal received: interrupt
2023/04/20 18:39:27 DEBUG : 4 go routines active
Terminate batch job (Y/N)? y

```

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [April 20, 2023, 10:49am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/2 "2023-04-20T10:49:09Z")

</div>

Try this flag

```
  --no-console Hide console window (supported on Windows only)

```

---

<div class="post-metadata">

**Author:** ![utkarshsethi](https://forum.rclone.org/user_avatar/forum.rclone.org/utkarshsethi/32/14871_2.png) [@utkarshsethi](https://forum.rclone.org/u/utkarshsethi)\
**Post date:** [April 20, 2023, 11:03am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/3 "2023-04-20T11:03:02Z")

</div>

Hi Nick, as you can see in my OP, I already use it. it opens a console which if closed quits the server.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 20, 2023, 11:20am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/4 "2023-04-20T11:20:36Z")

</div>

> [@utkarshsethi](#):
>
> Hi Nick, as you can see in my OP, I already use it. it opens a console which if closed quits the server.

You 'think' you are using it but in reality, you are not.

> [@utkarshsethi](#):
>
> `2023/04/20 18:39:21 DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "serve" "webdav" "-vv" "D:\path\to\directory"]`

You can see in the log, it is not there.

---

<div class="post-metadata">

**Author:** ![utkarshsethi](https://forum.rclone.org/user_avatar/forum.rclone.org/utkarshsethi/32/14871_2.png) [@utkarshsethi](https://forum.rclone.org/u/utkarshsethi)\
**Post date:** [April 20, 2023, 11:33am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/5 "2023-04-20T11:33:00Z")

</div>

-- cannot be run with no-console, hence I had to remove it as -vv was a requirement for opening a ticket.

using -vv with no-console gives an error they cannot be run together.

---

<div class="post-metadata">

**Author:** ![utkarshsethi](https://forum.rclone.org/user_avatar/forum.rclone.org/utkarshsethi/32/14871_2.png) [@utkarshsethi](https://forum.rclone.org/u/utkarshsethi)\
**Post date:** [April 20, 2023, 11:36am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/6 "2023-04-20T11:36:52Z")

</div>

I appologise, the error was It can't be run with quiet, nothing with no-console, but the console shows up, so it serves no purpose.

```auto
 utkarsh   ~  ﮫ0ms⠀   rclone serve webdav -vv --no-console --quiet "D:\path\to\directory"
2023/04/20 21:33:56 Can't set -v and -q
 utkarsh   ~  ﮫ464ms⠀   rclone serve webdav -vv --no-console "D:\path\to\directory"
2023/04/20 21:34:07 DEBUG : rclone: Version "v1.62.2" starting with parameters ["C:\\Users\\utkar\\AppData\\Local\\Microsoft\\WinGet\\Packages\\Rclone.Rclone_Microsoft.Winget.Source_8wekyb3d8bbwe\\rclone-v1.62.2-windows-amd64\\rclone.exe" "serve" "webdav" "-vv" "--no-console" "D:\path\to\directory"]
2023/04/20 21:34:07 DEBUG : Creating backend with remote "D:\path\to\directory"
2023/04/20 21:34:07 DEBUG : Using config file from "C:\\Users\\utkar\\AppData\\Roaming\\rclone\\rclone.conf"
2023/04/20 21:34:07 DEBUG : fs cache: renaming cache item "D:\path\to\directory" to be canonical "//?/D:\path\to\directory"
2023/04/20 21:34:07 INFO : Local file system at //?/D:\path\to\directory: poll-interval is not supported by this remote
2023/04/20 21:34:07 NOTICE: Local file system at //?/D:\path\to\directory: WebDav Server started on [http://127.0.0.1:8080/]
2023/04/20 21:34:13 INFO : Signal received: interrupt
2023/04/20 21:34:13 DEBUG : 4 go routines active

```

The one thing it does seem to do, is minimise the window.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 20, 2023, 11:41am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/7 "2023-04-20T11:41:56Z")

</div>

> [@utkarshsethi](#):
>
> using -vv with no-console gives an error they cannot be run together.

> [@utkarshsethi](#):
>
> `2023/04/20 21:33:56 Can't set -v and -q`

-quiet means do not log things and doesn't work with debug logging as we want to see everything.

I'm a bit confused.

Running -vv and --no-console and you still get a console to show up?

---

<div class="post-metadata">

**Author:** ![utkarshsethi](https://forum.rclone.org/user_avatar/forum.rclone.org/utkarshsethi/32/14871_2.png) [@utkarshsethi](https://forum.rclone.org/u/utkarshsethi)\
**Post date:** [April 20, 2023, 11:45am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/8 "2023-04-20T11:45:35Z")

</div>

Yes you understand correctly, all that happens in it minimises.

Doesn't work even if redirect output.

```auto
@echo off
@rclone serve webdav --no-console -vv "D:\path\to\directory" >nul 2>&1

```

 ![image](https://forum.rclone.org/uploads/default/original/2X/c/cbbeb7f90b4254005ef4df4b4fbd0bfe5b55d14b.png)

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 20, 2023, 11:50am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/9 "2023-04-20T11:50:19Z")

</div>

Yeah, that's what is supposed to happen.

Rclone launched it's own process and did not start a console.

It's not forking process so you see rclone is 'running'.

If you search the forums, there are multiple examples for Windows out there to do what you want.

Maybe @asdffdsa will tell you too.

---

<div class="post-metadata">

**Author:** ![utkarshsethi](https://forum.rclone.org/user_avatar/forum.rclone.org/utkarshsethi/32/14871_2.png) [@utkarshsethi](https://forum.rclone.org/u/utkarshsethi)\
**Post date:** [April 20, 2023, 11:59am UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/10 "2023-04-20T11:59:46Z")

</div>

I tried searching, maybe with the incorrect search terms. I appreciate any help in suppressing any console from popping up.

---

<div class="post-metadata">

**Author:** ![Animosity022](https://forum.rclone.org/user_avatar/forum.rclone.org/animosity022/32/451_2.png) [@Animosity022](https://forum.rclone.org/u/Animosity022)\
**Post date:** [April 20, 2023, 12:07pm UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/11 "2023-04-20T12:07:27Z")

</div>

Not a windows guy per se, but if you search

"windows nssm"  
"windows task scheduler"

Give us a slew of results as those are a few I am aware of.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [April 20, 2023, 12:51pm UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/12 "2023-04-20T12:51:17Z")

</div>

> [@utkarshsethi](#):
>
> The one thing it does seem to do, is minimise the window.

Yes that is what `--no-console` does.

It is possible for rclone to launch without a console, but it requires recompiling it.

However I suspect that a task manager is what you really want.

---

<div class="post-metadata">

**Author:** ![utkarshsethi](https://forum.rclone.org/user_avatar/forum.rclone.org/utkarshsethi/32/14871_2.png) [@utkarshsethi](https://forum.rclone.org/u/utkarshsethi)\
**Post date:** [April 20, 2023, 12:52pm UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/13 "2023-04-20T12:52:12Z")

</div>

For anyone who lands here.

> [@Autostart mount on windows without cmd popping up?](https://forum.rclone.org/t/autostart-mount-on-windows-without-cmd-popping-up/20896/2):
>
> You can create a scheduled task to run it with. If you check "Run whether user is logged on or not", it will run hidden in background (there is a "Hidden" checkbox, but it is only to hide the task from the Task Scheduler user interface).

from [https://forum.rclone.org/t/autostart-mount-on-windows-without-cmd-popping-up/20896/2?u=utkarshsethi](https://forum.rclone.org/t/autostart-mount-on-windows-without-cmd-popping-up/20896/2)

This seems to work.

---

<div class="post-metadata">

**Author:** ![asdffdsa](https://forum.rclone.org/letter_avatar_proxy/v4/letter/a/848f3c/32.png) [@asdffdsa](https://forum.rclone.org/u/asdffdsa)\
**Post date:** [April 20, 2023, 12:52pm UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/14 "2023-04-20T12:52:17Z")

</div>

> [@Animosity022](#):
>
> "windows task scheduler"

that would be the easiest way.

1. create a task in task scheduler, let's call it `cloud.daily`
2. run the task via .lnk shortcut

 ![image](https://forum.rclone.org/uploads/default/original/2X/0/0eda970d0aa6816e49557d98df76e5fd100977c8.png)

 ![image](https://forum.rclone.org/uploads/default/original/2X/b/bc73ccc5c688621eb09fc79b55e7e4c6ffdf9869.png)

`C:\Windows\System32\schtasks.exe /run /tn "rclone\cloud.daily"`

---

<div class="post-metadata">

**Author:** ![utkarshsethi](https://forum.rclone.org/user_avatar/forum.rclone.org/utkarshsethi/32/14871_2.png) [@utkarshsethi](https://forum.rclone.org/u/utkarshsethi)\
**Post date:** [April 20, 2023, 12:53pm UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/15 "2023-04-20T12:53:37Z")

</div>

So I was already using task scheduler to run the script, the only thing I did different was use the default setting to run it when the user is logged in.

![image](https://forum.rclone.org/uploads/default/original/2X/e/e9e7ce88e2e2855e89c30aa07c757f41b779c9c4.png)

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [April 23, 2023, 12:54pm UTC](https://forum.rclone.org/t/serve-local-forlder-as-webdav-silently/37720/16 "2023-04-23T12:54:28Z")

</div>

Closed on April 23, 2023, 12:54pm UTC

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