2020-04-25 19:55:18 +02:00
---
title: "Seafile"
description: "Seafile"
2022-12-20 21:05:05 +01:00
versionIntroduced: "v1.52"
2020-04-25 19:55:18 +02:00
---
2022-11-19 12:50:20 +01:00
# {{< icon "fa fa-server" >}} Seafile
2020-04-25 19:55:18 +02:00
2020-05-18 23:56:54 +02:00
This is a backend for the [Seafile ](https://www.seafile.com/ ) storage service:
- It works with both the free community edition or the professional edition.
2023-01-11 21:25:44 +01:00
- Seafile versions 6.x, 7.x, 8.x and 9.x are all supported.
2020-05-18 23:56:54 +02:00
- Encrypted libraries are also supported.
- It supports 2FA enabled users
2023-01-11 21:25:44 +01:00
- Using a Library API Token is **not** supported
2020-04-25 19:55:18 +02:00
2021-10-14 15:40:18 +02:00
## Configuration
2020-04-25 19:55:18 +02:00
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:
2020-10-13 23:49:58 +02:00
Paths are specified as `remote:library` . You may put subdirectories in too, e.g. `remote:library/path/to/dir` .
2020-04-25 19:55:18 +02:00
- you point your remote to a specific library during the configuration:
2020-05-18 23:56:54 +02:00
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_)
2020-04-25 19:55:18 +02:00
2021-10-14 15:40:18 +02:00
### Configuration in root mode
2020-04-25 19:55:18 +02:00
2020-05-18 23:56:54 +02:00
Here is an example of making a seafile configuration for a user with **no** two-factor authentication. First run
2020-04-25 19:55:18 +02:00
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.
```
2021-11-01 21:34:46 +01:00
No remotes found, make a new one?
2020-04-25 19:55:18 +02:00
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> seafile
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
[snip]
XX / Seafile
\ "seafile"
[snip]
Storage> seafile
** See help for seafile backend at: https://rclone.org/seafile/ **
URL of seafile host to connect to
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Connect to cloud.seafile.com
\ "https://cloud.seafile.com/"
url> http://my.seafile.server/
2020-05-18 23:56:54 +02:00
User name (usually email address)
2020-04-25 19:55:18 +02:00
Enter a string value. Press Enter for the default ("").
user> me@example.com
Password
y) Yes type in my own password
g) Generate random password
2020-05-18 23:56:54 +02:00
n) No leave this optional password blank (default)
2020-04-25 19:55:18 +02:00
y/g> y
Enter the password:
password:
Confirm the password:
password:
2020-05-18 23:56:54 +02:00
Two-factor authentication ('true' if the account has 2FA enabled)
Enter a boolean value (true or false). Press Enter for the default ("false").
2fa> false
2020-04-25 19:55:18 +02:00
Name of the library. Leave blank to access all non-encrypted libraries.
Enter a string value. Press Enter for the default ("").
library>
Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
y/g/n> n
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n> n
Remote config
2020-05-18 23:56:54 +02:00
Two-factor authentication is not enabled on this account.
2020-04-25 19:55:18 +02:00
--------------------
[seafile]
type = seafile
url = http://my.seafile.server/
user = me@example.com
2020-05-18 23:56:54 +02:00
pass = ** * ENCRYPTED ** *
2fa = false
2020-04-25 19:55:18 +02:00
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
```
2020-05-18 23:56:54 +02:00
This remote is called `seafile` . It's pointing to the root of your seafile server and can now be used like this:
2020-04-25 19:55:18 +02:00
See all libraries
rclone lsd seafile:
Create a new library
rclone mkdir seafile:library
List the contents of a library
rclone ls seafile:library
Sync `/home/local/directory` to the remote library, deleting any
excess files in the library.
2023-01-20 21:47:36 +01:00
rclone sync --interactive /home/local/directory seafile:library
2020-04-25 19:55:18 +02:00
2021-10-14 15:40:18 +02:00
### Configuration in library mode
2020-04-25 19:55:18 +02:00
2020-05-18 23:56:54 +02:00
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:
2020-04-25 19:55:18 +02:00
```
2021-11-01 21:34:46 +01:00
No remotes found, make a new one?
2020-04-25 19:55:18 +02:00
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
name> seafile
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
[snip]
XX / Seafile
\ "seafile"
[snip]
Storage> seafile
** See help for seafile backend at: https://rclone.org/seafile/ **
URL of seafile host to connect to
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Connect to cloud.seafile.com
\ "https://cloud.seafile.com/"
url> http://my.seafile.server/
2020-05-18 23:56:54 +02:00
User name (usually email address)
2020-04-25 19:55:18 +02:00
Enter a string value. Press Enter for the default ("").
user> me@example.com
Password
y) Yes type in my own password
g) Generate random password
2020-05-18 23:56:54 +02:00
n) No leave this optional password blank (default)
2020-04-25 19:55:18 +02:00
y/g> y
Enter the password:
password:
Confirm the password:
password:
2020-05-18 23:56:54 +02:00
Two-factor authentication ('true' if the account has 2FA enabled)
Enter a boolean value (true or false). Press Enter for the default ("false").
2fa> true
2020-04-25 19:55:18 +02:00
Name of the library. Leave blank to access all non-encrypted libraries.
Enter a string value. Press Enter for the default ("").
library> My Library
Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
y) Yes type in my own password
g) Generate random password
n) No leave this optional password blank (default)
y/g/n> n
Edit advanced config? (y/n)
y) Yes
n) No (default)
y/n> n
Remote config
2020-05-18 23:56:54 +02:00
Two-factor authentication: please enter your 2FA code
2fa code> 123456
Authenticating...
Success!
2020-04-25 19:55:18 +02:00
--------------------
[seafile]
type = seafile
url = http://my.seafile.server/
user = me@example.com
2020-05-18 23:56:54 +02:00
pass =
2fa = true
2020-04-25 19:55:18 +02:00
library = My Library
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
```
2020-05-18 23:56:54 +02:00
You'll notice your password is blank in the configuration. It's because we only need the password to authenticate you once.
2020-04-25 19:55:18 +02:00
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:
rclone lsd seafile:
Create a new directory inside the library
rclone mkdir seafile:directory
List the contents of a directory
rclone ls seafile:directory
Sync `/home/local/directory` to the remote library, deleting any
excess files in the library.
2023-01-20 21:47:36 +01:00
rclone sync --interactive /home/local/directory seafile:
2020-04-25 19:55:18 +02:00
2021-10-14 15:40:18 +02:00
### --fast-list
2020-04-25 19:55:18 +02:00
Seafile version 7+ supports `--fast-list` which allows you to use fewer
transactions in exchange for more memory. See the [rclone
docs](/docs/#fast-list) for more details.
Please note this is not supported on seafile server version 6.x
2021-10-14 15:40:18 +02:00
### Restricted filename characters
2020-04-25 19:55:18 +02:00
In addition to the [default restricted characters set ](/overview/#restricted-characters )
the following characters are also replaced:
| Character | Value | Replacement |
| --------- |:-----:|:-----------:|
| / | 0x2F | / |
| " | 0x22 | " |
| \ | 0x5C | \ |
Invalid UTF-8 bytes will also be [replaced ](/overview/#invalid-utf8 ),
as they can't be used in JSON strings.
2021-10-14 15:40:18 +02:00
### Seafile and rclone link
2020-04-25 19:55:18 +02:00
Rclone supports generating share links for non-encrypted libraries only.
They can either be for a file or a directory:
```
rclone link seafile:seafile-tutorial.doc
http://my.seafile.server/f/fdcd8a2f93f84b8b90f4/
```
or if run on a directory you will get:
```
rclone link seafile:dir
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.
2021-10-14 15:40:18 +02:00
### Compatibility
2020-04-25 19:55:18 +02:00
2023-01-11 21:25:44 +01:00
It has been actively developed using the [seafile docker image ](https://github.com/haiwen/seafile-docker ) of these versions:
2020-04-25 19:55:18 +02:00
- 6.3.4 community edition
- 7.0.5 community edition
- 7.1.3 community edition
2023-01-11 21:25:44 +01:00
- 9.0.10 community edition
2020-04-25 19:55:18 +02:00
Versions below 6.0 are not supported.
Versions between 6.0 and 6.3 haven't been tested and might not work properly.
2023-01-11 21:25:44 +01:00
Each new version of `rclone` is automatically tested against the [latest docker image ](https://hub.docker.com/r/seafileltd/seafile-mc/ ) of the seafile community server.
2020-05-22 13:22:52 +02:00
{{< rem autogenerated options start " - DO NOT EDIT - instead edit fs . RegInfo in backend / seafile / seafile . go then run make backenddocs " > }}
2021-11-01 16:42:05 +01:00
### Standard options
2020-05-18 23:56:54 +02:00
2022-07-09 19:08:20 +02:00
Here are the Standard options specific to seafile (seafile).
2020-05-18 23:56:54 +02:00
#### --seafile-url
2021-11-01 16:42:05 +01:00
URL of seafile host to connect to.
2020-05-18 23:56:54 +02:00
2022-03-18 13:29:54 +01:00
Properties:
2020-05-18 23:56:54 +02:00
- Config: url
- Env Var: RCLONE_SEAFILE_URL
- Type: string
2022-03-18 13:29:54 +01:00
- Required: true
2020-05-18 23:56:54 +02:00
- Examples:
- "https://cloud.seafile.com/"
2021-11-01 16:42:05 +01:00
- Connect to cloud.seafile.com.
2020-05-18 23:56:54 +02:00
#### --seafile-user
2021-11-01 16:42:05 +01:00
User name (usually email address).
2020-05-18 23:56:54 +02:00
2022-03-18 13:29:54 +01:00
Properties:
2020-05-18 23:56:54 +02:00
- Config: user
- Env Var: RCLONE_SEAFILE_USER
- Type: string
2022-03-18 13:29:54 +01:00
- Required: true
2020-05-18 23:56:54 +02:00
#### --seafile-pass
2021-11-01 16:42:05 +01:00
Password.
2020-05-18 23:56:54 +02:00
2020-09-02 17:59:04 +02:00
**NB** Input to this must be obscured - see [rclone obscure ](/commands/rclone_obscure/ ).
2022-03-18 13:29:54 +01:00
Properties:
2020-05-18 23:56:54 +02:00
- Config: pass
- Env Var: RCLONE_SEAFILE_PASS
- Type: string
2022-03-18 13:29:54 +01:00
- Required: false
2020-05-18 23:56:54 +02:00
2020-05-27 17:11:47 +02:00
#### --seafile-2fa
2021-11-01 16:42:05 +01:00
Two-factor authentication ('true' if the account has 2FA enabled).
2020-05-27 17:11:47 +02:00
2022-03-18 13:29:54 +01:00
Properties:
2020-05-27 17:11:47 +02:00
- Config: 2fa
- Env Var: RCLONE_SEAFILE_2FA
- Type: bool
- Default: false
2020-05-18 23:56:54 +02:00
#### --seafile-library
2021-11-01 16:42:05 +01:00
Name of the library.
Leave blank to access all non-encrypted libraries.
2020-05-18 23:56:54 +02:00
2022-03-18 13:29:54 +01:00
Properties:
2020-05-18 23:56:54 +02:00
- Config: library
- Env Var: RCLONE_SEAFILE_LIBRARY
- Type: string
2022-03-18 13:29:54 +01:00
- Required: false
2020-05-18 23:56:54 +02:00
#### --seafile-library-key
2021-11-01 16:42:05 +01:00
Library password (for encrypted libraries only).
Leave blank if you pass it through the command line.
2020-05-18 23:56:54 +02:00
2020-09-02 17:59:04 +02:00
**NB** Input to this must be obscured - see [rclone obscure ](/commands/rclone_obscure/ ).
2022-03-18 13:29:54 +01:00
Properties:
2020-05-18 23:56:54 +02:00
- Config: library_key
- Env Var: RCLONE_SEAFILE_LIBRARY_KEY
- Type: string
2022-03-18 13:29:54 +01:00
- Required: false
2020-05-18 23:56:54 +02:00
2020-05-27 17:11:47 +02:00
#### --seafile-auth-token
2021-11-01 16:42:05 +01:00
Authentication token.
2020-05-27 17:11:47 +02:00
2022-03-18 13:29:54 +01:00
Properties:
2020-05-27 17:11:47 +02:00
- Config: auth_token
- Env Var: RCLONE_SEAFILE_AUTH_TOKEN
- Type: string
2022-03-18 13:29:54 +01:00
- Required: false
2020-05-27 17:11:47 +02:00
2021-11-01 16:42:05 +01:00
### Advanced options
2020-05-18 23:56:54 +02:00
2022-07-09 19:08:20 +02:00
Here are the Advanced options specific to seafile (seafile).
2020-05-18 23:56:54 +02:00
#### --seafile-create-library
2021-11-01 16:42:05 +01:00
Should rclone create a library if it doesn't exist.
2020-05-18 23:56:54 +02:00
2022-03-18 13:29:54 +01:00
Properties:
2020-05-18 23:56:54 +02:00
- Config: create_library
- Env Var: RCLONE_SEAFILE_CREATE_LIBRARY
- Type: bool
- Default: false
#### --seafile-encoding
2022-03-18 13:29:54 +01:00
The encoding for the backend.
2020-05-18 23:56:54 +02:00
2021-11-01 16:42:05 +01:00
See the [encoding section in the overview ](/overview/#encoding ) for more info.
2020-05-18 23:56:54 +02:00
2022-03-18 13:29:54 +01:00
Properties:
2020-05-18 23:56:54 +02:00
- Config: encoding
- Env Var: RCLONE_SEAFILE_ENCODING
2023-11-26 16:59:12 +01:00
- Type: Encoding
2020-05-18 23:56:54 +02:00
- Default: Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8
2020-04-25 19:55:18 +02:00
2024-03-10 12:22:43 +01:00
#### --seafile-description
2024-06-14 17:04:51 +02:00
Description of the remote.
2024-03-10 12:22:43 +01:00
Properties:
- Config: description
- Env Var: RCLONE_SEAFILE_DESCRIPTION
- Type: string
- Required: false
2020-05-22 13:22:52 +02:00
{{< rem autogenerated options stop > }}
2020-04-25 19:55:18 +02:00