Skip to content

Instantly share code, notes, and snippets.

@kabili207
Last active October 29, 2025 23:30
Show Gist options
  • Save kabili207/2cd2d637e5c7617411a666d8d7e97101 to your computer and use it in GitHub Desktop.
Save kabili207/2cd2d637e5c7617411a666d8d7e97101 to your computer and use it in GitHub Desktop.

Revisions

  1. kabili207 renamed this gist May 10, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. kabili207 revised this gist May 10, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions [email protected]
    Original file line number Diff line number Diff line change
    @@ -11,11 +11,11 @@
    Description=rclone: Remote FUSE filesystem for cloud storage config %i
    Documentation=man:rclone(1)
    After=network-online.target
    Wants=network-online.target
    AssertPathIsDirectory=%h/mnt/%i
    Wants=network-online.target

    [Service]
    Type=notify
    ExecStartPre=-/usr/bin/mkdir -p %h/mnt/%i
    ExecStart= \
    /usr/bin/rclone mount \
    --config=%h/.config/rclone/rclone.conf \
  3. kabili207 revised this gist Mar 24, 2023. 2 changed files with 3 additions and 5 deletions.
    5 changes: 2 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ Next, create the mountpoint for your remote. The service uses the location `~/mn
    mkdir ~/mnt/dropbox
    ```

    The `--allow-other` option is required in order to work in many desktop environments. This flag must be enabled by adding `user_allow_other` to `/etc/fuse.conf`.
    The `--allow-other` option is required in order to work in many desktop environments. This flag must be enabled by adding `user_allow_other` to `/etc/fuse.conf`. If you aren't using a desktop environment, such as on a server, this option can be omitted.

    ## Adding the service

    @@ -25,7 +25,6 @@ systemctl --user daemon-reload

    You can now start/enable each remote by using `rclone@<remote>`
    ```bash
    systemctl --user enable rclone@dropbox
    systemctl --user start rclone@dropbox
    systemctl --user enable --now rclone@dropbox
    ```

    3 changes: 1 addition & 2 deletions [email protected]
    Original file line number Diff line number Diff line change
    @@ -5,8 +5,7 @@
    # As your normal user, run
    # systemctl --user daemon-reload
    # You can now start/enable each remote by using rclone@<remote>
    # systemctl --user enable rclone@dropbox
    # systemctl --user start rclone@dropbox
    # systemctl --user enable --now rclone@dropbox

    [Unit]
    Description=rclone: Remote FUSE filesystem for cloud storage config %i
  4. kabili207 revised this gist Mar 7, 2022. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion [email protected]
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,6 @@ AssertPathIsDirectory=%h/mnt/%i

    [Service]
    Type=notify
    MemoryDenyWriteExecute=true
    ExecStart= \
    /usr/bin/rclone mount \
    --config=%h/.config/rclone/rclone.conf \
  5. kabili207 revised this gist Feb 24, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions [email protected]
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,7 @@ AssertPathIsDirectory=%h/mnt/%i

    [Service]
    Type=notify
    MemoryDenyWriteExecute=true
    ExecStart= \
    /usr/bin/rclone mount \
    --config=%h/.config/rclone/rclone.conf \
  6. kabili207 revised this gist Feb 24, 2022. 2 changed files with 31 additions and 1 deletion.
    31 changes: 31 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    # rclone systemd service

    ## Preparation

    This service will use the same remote name you specified when using [`rclone config create`](https://rclone.org/commands/rclone_config_create/). If you haven't done that yet, do so now.

    Next, create the mountpoint for your remote. The service uses the location `~/mnt/<remote>` by default.
    ```bash
    mkdir ~/mnt/dropbox
    ```

    The `--allow-other` option is required in order to work in many desktop environments. This flag must be enabled by adding `user_allow_other` to `/etc/fuse.conf`.

    ## Adding the service

    Save the `[email protected]` file in `~/.config/systemd/user/`
    Make sure you include the `@`. This is required to work.

    As your normal user, run:
    ```bash
    systemctl --user daemon-reload
    ```

    ## Using the service

    You can now start/enable each remote by using `rclone@<remote>`
    ```bash
    systemctl --user enable rclone@dropbox
    systemctl --user start rclone@dropbox
    ```

    1 change: 0 additions & 1 deletion [email protected]
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,6 @@ Type=notify
    ExecStart= \
    /usr/bin/rclone mount \
    --config=%h/.config/rclone/rclone.conf \
    --fast-list \
    --vfs-cache-mode writes \
    --vfs-cache-max-size 100M \
    --log-level INFO \
  7. kabili207 revised this gist May 22, 2020. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions [email protected]
    Original file line number Diff line number Diff line change
    @@ -4,8 +4,6 @@
    # File must include the '@' (ex [email protected])
    # As your normal user, run
    # systemctl --user daemon-reload
    # Ensure the mount directory exists
    # mkdir -p ~/mnt/dropbox
    # You can now start/enable each remote by using rclone@<remote>
    # systemctl --user enable rclone@dropbox
    # systemctl --user start rclone@dropbox
  8. kabili207 revised this gist May 22, 2020. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion [email protected]
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,11 @@
    # User service for Rclone mounting
    #
    # Place in ${HOME}/.config/systemd/user/
    # Place in ~/.config/systemd/user/
    # File must include the '@' (ex [email protected])
    # As your normal user, run
    # systemctl --user daemon-reload
    # Ensure the mount directory exists
    # mkdir -p ~/mnt/dropbox
    # You can now start/enable each remote by using rclone@<remote>
    # systemctl --user enable rclone@dropbox
    # systemctl --user start rclone@dropbox
  9. kabili207 revised this gist May 22, 2020. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions [email protected]
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,13 @@
    # User service for Rclone mounting
    #
    # Place in ${HOME}/.config/systemd/user/
    # File must include the '@' (ex [email protected])
    # As your normal user, run
    # systemctl --user daemon-reload
    # You can now start/enable each remote by using rclone@<remote>
    # systemctl --user enable rclone@dropbox
    # systemctl --user start rclone@dropbox

    [Unit]
    Description=rclone: Remote FUSE filesystem for cloud storage config %i
    Documentation=man:rclone(1)
  10. kabili207 created this gist May 21, 2020.
    24 changes: 24 additions & 0 deletions [email protected]
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    [Unit]
    Description=rclone: Remote FUSE filesystem for cloud storage config %i
    Documentation=man:rclone(1)
    After=network-online.target
    Wants=network-online.target
    AssertPathIsDirectory=%h/mnt/%i

    [Service]
    Type=notify
    ExecStart= \
    /usr/bin/rclone mount \
    --config=%h/.config/rclone/rclone.conf \
    --fast-list \
    --vfs-cache-mode writes \
    --vfs-cache-max-size 100M \
    --log-level INFO \
    --log-file /tmp/rclone-%i.log \
    --umask 022 \
    --allow-other \
    %i: %h/mnt/%i
    ExecStop=/bin/fusermount -u %h/mnt/%i

    [Install]
    WantedBy=default.target