# Rclone with nextcloud using systemd / autofs

**URL:** <https://forum.rclone.org/t/rclone-with-nextcloud-using-systemd-autofs/26098>\
**Category:** Help and Support\
**Created:** [August 21, 2021, 6:50pm UTC](https://forum.rclone.org/t/rclone-with-nextcloud-using-systemd-autofs/26098 "2021-08-21T18:50:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FZXizzbKv7jg](https://forum.rclone.org/user_avatar/forum.rclone.org/fzxizzbkv7jg/32/10160_2.png) [@FZXizzbKv7jg](https://forum.rclone.org/u/FZXizzbKv7jg)\
**Post date:** [August 21, 2021, 6:50pm UTC](https://forum.rclone.org/t/rclone-with-nextcloud-using-systemd-autofs/26098/1 "2021-08-21T18:50:05Z")

</div>

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

With using rclone mount as a system daemon the device does not get into suspend / sleep /standby mode. On every device using it. Guess the drive is still mounted.  
Else sb. using rclone with autofs for Nextcloud and mount helper script pls share autofs config file.  
Especially where to put --no-check-certificate and --vfs-cache-mode writes in helper script.

The unit file:

[Unit]  
Description=Nextcloud (rclone)  
AssertPathIsDirectory=/media/NEXTCLOUD  
After=network.target network-online.target  
Wants=network-online.target

[Service]  
Type=notify  
ExecStart=/usr/bin/rclone --config /home/user1/.config/rclone/rclone.conf --vfs-cache-mode writes --no-check-certificate mount NEXTCLOUD:/ /media/NEXTCLOUD  
ExecStop=/bin/fusermount -zu /media/NEXTCLOUD  
Restart=always  
RestartSec=10

User=user1  
Group=user1

[Install]  
WantedBy=default.target

For Libreelec:

[Unit]  
Description=Nextcloud (rclone)  
Requires=network-online.service  
After=network-online.service

[Service]  
Type=simple  
ExecStartPre=/bin/mkdir -p /var/media/NEXTCLOUD  
ExecStart=/storage/rclone/rclone   
--config /storage/.config/rclone/rclone.conf   
--vfs-cache-mode writes --no-check-certificate   
mount NEXTCLOUD:/ /var/media/NEXTCLOUD  
ExecStop=/usr/bin/fusermount -zu /var/media/NEXTCLOUD  
ExecStopPost=/bin/rmdir /var/media/NEXTCLOUD  
Restart=on-abort

[Install]  
WantedBy=kodi.target

Here (not working) autofs config:

NEXTCLOUD -fstype=fuse.rclonefs,config=/home/user1/.config/rclone/rclone.conf,allow-other,allow-non-empty :NEXTCLOUD:

Where to put --no-check-certificate and --vfs-cache-mode?

#### What is your rclone version (output from `rclone version`)

rclone v1.56.0

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

Manjaro Linux, 64 bit

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

Nextcloud

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

```auto
/usr/bin/rclone --config /home/user1/.config/rclone/rclone.conf --vfs-cache-mode writes --no-check-certificate mount NEXTCLOUD:/ /media/NEXTCLOUD

```

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

```auto
[NEXTCLOUD]
type = webdav
url = https://myserver/nextcloud/remote.php/dav/files/user1
vendor = nextcloud
user = user1
pass = *****

```

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

```auto
Paste log here

```

---

<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:** [October 21, 2021, 2:50pm UTC](https://forum.rclone.org/t/rclone-with-nextcloud-using-systemd-autofs/26098/2 "2021-10-21T14:50:12Z")

</div>

Closed on October 21, 2021, 2:50pm UTC

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