v1.52

Seafile

This is a backend for the Seafile storage service:

  • It works with both the free community edition or the professional edition.
  • Seafile versions 6.x, 7.x, 8.x and 9.x are all supported.
  • Encrypted libraries are also supported.
  • It supports 2FA enabled users
  • Using a Library API Token is not supported

Configuration

There are two distinct modes you can setup your remote:

  • you point your remote to the root of the server, meaning you don’t specify a library during the configuration: Paths are specified as remote:library. You may put subdirectories in too, e.g. remote:library/path/to/dir.
  • you point your remote to a specific library during the configuration: Paths are specified as remote:path/to/dir. This is the recommended mode when using encrypted libraries. (This mode is possibly slightly faster than the root mode)

Configuration in root mode

Here is an example of making a seafile configuration for a user with no two-factor authentication. First run

  1. rclone config

This will guide you through an interactive setup process. To authenticate you will need the URL of your server, your email (or username) and your password.

  1. No remotes found, make a new one?
  2. n) New remote
  3. s) Set configuration password
  4. q) Quit config
  5. n/s/q> n
  6. name> seafile
  7. Type of storage to configure.
  8. Enter a string value. Press Enter for the default ("").
  9. Choose a number from below, or type in your own value
  10. [snip]
  11. XX / Seafile
  12. \ "seafile"
  13. [snip]
  14. Storage> seafile
  15. ** See help for seafile backend at: https://rclone.org/seafile/ **
  16. URL of seafile host to connect to
  17. Enter a string value. Press Enter for the default ("").
  18. Choose a number from below, or type in your own value
  19. 1 / Connect to cloud.seafile.com
  20. \ "https://cloud.seafile.com/"
  21. url> http://my.seafile.server/
  22. User name (usually email address)
  23. Enter a string value. Press Enter for the default ("").
  24. user> me@example.com
  25. Password
  26. y) Yes type in my own password
  27. g) Generate random password
  28. n) No leave this optional password blank (default)
  29. y/g> y
  30. Enter the password:
  31. password:
  32. Confirm the password:
  33. password:
  34. Two-factor authentication ('true' if the account has 2FA enabled)
  35. Enter a boolean value (true or false). Press Enter for the default ("false").
  36. 2fa> false
  37. Name of the library. Leave blank to access all non-encrypted libraries.
  38. Enter a string value. Press Enter for the default ("").
  39. library>
  40. Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
  41. y) Yes type in my own password
  42. g) Generate random password
  43. n) No leave this optional password blank (default)
  44. y/g/n> n
  45. Edit advanced config? (y/n)
  46. y) Yes
  47. n) No (default)
  48. y/n> n
  49. Remote config
  50. Two-factor authentication is not enabled on this account.
  51. --------------------
  52. [seafile]
  53. type = seafile
  54. url = http://my.seafile.server/
  55. user = me@example.com
  56. pass = *** ENCRYPTED ***
  57. 2fa = false
  58. --------------------
  59. y) Yes this is OK (default)
  60. e) Edit this remote
  61. d) Delete this remote
  62. y/e/d> y

This remote is called seafile. It’s pointing to the root of your seafile server and can now be used like this:

See all libraries

  1. rclone lsd seafile:

Create a new library

  1. rclone mkdir seafile:library

List the contents of a library

  1. rclone ls seafile:library

Sync /home/local/directory to the remote library, deleting any excess files in the library.

  1. rclone sync --interactive /home/local/directory seafile:library

Configuration in library mode

Here’s an example of a configuration in library mode with a user that has the two-factor authentication enabled. Your 2FA code will be asked at the end of the configuration, and will attempt to authenticate you:

  1. No remotes found, make a new one?
  2. n) New remote
  3. s) Set configuration password
  4. q) Quit config
  5. n/s/q> n
  6. name> seafile
  7. Type of storage to configure.
  8. Enter a string value. Press Enter for the default ("").
  9. Choose a number from below, or type in your own value
  10. [snip]
  11. XX / Seafile
  12. \ "seafile"
  13. [snip]
  14. Storage> seafile
  15. ** See help for seafile backend at: https://rclone.org/seafile/ **
  16. URL of seafile host to connect to
  17. Enter a string value. Press Enter for the default ("").
  18. Choose a number from below, or type in your own value
  19. 1 / Connect to cloud.seafile.com
  20. \ "https://cloud.seafile.com/"
  21. url> http://my.seafile.server/
  22. User name (usually email address)
  23. Enter a string value. Press Enter for the default ("").
  24. user> me@example.com
  25. Password
  26. y) Yes type in my own password
  27. g) Generate random password
  28. n) No leave this optional password blank (default)
  29. y/g> y
  30. Enter the password:
  31. password:
  32. Confirm the password:
  33. password:
  34. Two-factor authentication ('true' if the account has 2FA enabled)
  35. Enter a boolean value (true or false). Press Enter for the default ("false").
  36. 2fa> true
  37. Name of the library. Leave blank to access all non-encrypted libraries.
  38. Enter a string value. Press Enter for the default ("").
  39. library> My Library
  40. Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
  41. y) Yes type in my own password
  42. g) Generate random password
  43. n) No leave this optional password blank (default)
  44. y/g/n> n
  45. Edit advanced config? (y/n)
  46. y) Yes
  47. n) No (default)
  48. y/n> n
  49. Remote config
  50. Two-factor authentication: please enter your 2FA code
  51. 2fa code> 123456
  52. Authenticating...
  53. Success!
  54. --------------------
  55. [seafile]
  56. type = seafile
  57. url = http://my.seafile.server/
  58. user = me@example.com
  59. pass =
  60. 2fa = true
  61. library = My Library
  62. --------------------
  63. y) Yes this is OK (default)
  64. e) Edit this remote
  65. d) Delete this remote
  66. y/e/d> y

You’ll notice your password is blank in the configuration. It’s because we only need the password to authenticate you once.

You specified My Library during the configuration. The root of the remote is pointing at the root of the library My Library:

See all files in the library:

  1. rclone lsd seafile:

Create a new directory inside the library

  1. rclone mkdir seafile:directory

List the contents of a directory

  1. rclone ls seafile:directory

Sync /home/local/directory to the remote library, deleting any excess files in the library.

  1. rclone sync --interactive /home/local/directory seafile:

--fast-list

Seafile version 7+ supports --fast-list which allows you to use fewer transactions in exchange for more memory. See the rclone docs for more details. Please note this is not supported on seafile server version 6.x

Restricted filename characters

In addition to the default restricted characters set the following characters are also replaced:

CharacterValueReplacement
/0x2F
0x22
\0x5C

Invalid UTF-8 bytes will also be replaced, as they can’t be used in JSON strings.

Rclone supports generating share links for non-encrypted libraries only. They can either be for a file or a directory:

  1. rclone link seafile:seafile-tutorial.doc
  2. http://my.seafile.server/f/fdcd8a2f93f84b8b90f4/

or if run on a directory you will get:

  1. rclone link seafile:dir
  2. http://my.seafile.server/d/9ea2455f6f55478bbb0d/

Please note a share link is unique for each file or directory. If you run a link command on a file/dir that has already been shared, you will get the exact same link.

Compatibility

It has been actively developed using the seafile docker image of these versions:

  • 6.3.4 community edition
  • 7.0.5 community edition
  • 7.1.3 community edition
  • 9.0.10 community edition

Versions below 6.0 are not supported. Versions between 6.0 and 6.3 haven’t been tested and might not work properly.

Each new version of rclone is automatically tested against the latest docker image of the seafile community server.

Standard options

Here are the Standard options specific to seafile (seafile).

--seafile-url

URL of seafile host to connect to.

Properties:

  • Config: url
  • Env Var: RCLONE_SEAFILE_URL
  • Type: string
  • Required: true
  • Examples:

--seafile-user

User name (usually email address).

Properties:

  • Config: user
  • Env Var: RCLONE_SEAFILE_USER
  • Type: string
  • Required: true

--seafile-pass

Password.

NB Input to this must be obscured - see rclone obscure.

Properties:

  • Config: pass
  • Env Var: RCLONE_SEAFILE_PASS
  • Type: string
  • Required: false

--seafile-2fa

Two-factor authentication (‘true’ if the account has 2FA enabled).

Properties:

  • Config: 2fa
  • Env Var: RCLONE_SEAFILE_2FA
  • Type: bool
  • Default: false

--seafile-library

Name of the library.

Leave blank to access all non-encrypted libraries.

Properties:

  • Config: library
  • Env Var: RCLONE_SEAFILE_LIBRARY
  • Type: string
  • Required: false

--seafile-library-key

Library password (for encrypted libraries only).

Leave blank if you pass it through the command line.

NB Input to this must be obscured - see rclone obscure.

Properties:

  • Config: library_key
  • Env Var: RCLONE_SEAFILE_LIBRARY_KEY
  • Type: string
  • Required: false

--seafile-auth-token

Authentication token.

Properties:

  • Config: auth_token
  • Env Var: RCLONE_SEAFILE_AUTH_TOKEN
  • Type: string
  • Required: false

Advanced options

Here are the Advanced options specific to seafile (seafile).

--seafile-create-library

Should rclone create a library if it doesn’t exist.

Properties:

  • Config: create_library
  • Env Var: RCLONE_SEAFILE_CREATE_LIBRARY
  • Type: bool
  • Default: false

--seafile-encoding

The encoding for the backend.

See the encoding section in the overview for more info.

Properties:

  • Config: encoding
  • Env Var: RCLONE_SEAFILE_ENCODING
  • Type: Encoding
  • Default: Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8

--seafile-description

Description of the remote.

Properties:

  • Config: description
  • Env Var: RCLONE_SEAFILE_DESCRIPTION
  • Type: string
  • Required: false