1---
2title: "Seafile"
3description: "Seafile"
4---
5
6# {{< icon "fa fa-server" >}}Seafile
7
8This is a backend for the [Seafile](https://www.seafile.com/) storage service:
9- It works with both the free community edition or the professional edition.
10- Seafile versions 6.x and 7.x are all supported.
11- Encrypted libraries are also supported.
12- It supports 2FA enabled users
13
14## Configuration
15
16There are two distinct modes you can setup your remote:
17- you point your remote to the **root of the server**, meaning you don't specify a library during the configuration:
18Paths are specified as `remote:library`. You may put subdirectories in too, e.g. `remote:library/path/to/dir`.
19- you point your remote to a specific library during the configuration:
20Paths 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_)
21
22### Configuration in root mode
23
24Here is an example of making a seafile configuration for a user with **no** two-factor authentication.  First run
25
26    rclone config
27
28This will guide you through an interactive setup process. To authenticate
29you will need the URL of your server, your email (or username) and your password.
30
31```
32No remotes found - make a new one
33n) New remote
34s) Set configuration password
35q) Quit config
36n/s/q> n
37name> seafile
38Type of storage to configure.
39Enter a string value. Press Enter for the default ("").
40Choose a number from below, or type in your own value
41[snip]
42XX / Seafile
43   \ "seafile"
44[snip]
45Storage> seafile
46** See help for seafile backend at: https://rclone.org/seafile/ **
47
48URL of seafile host to connect to
49Enter a string value. Press Enter for the default ("").
50Choose a number from below, or type in your own value
51 1 / Connect to cloud.seafile.com
52   \ "https://cloud.seafile.com/"
53url> http://my.seafile.server/
54User name (usually email address)
55Enter a string value. Press Enter for the default ("").
56user> me@example.com
57Password
58y) Yes type in my own password
59g) Generate random password
60n) No leave this optional password blank (default)
61y/g> y
62Enter the password:
63password:
64Confirm the password:
65password:
66Two-factor authentication ('true' if the account has 2FA enabled)
67Enter a boolean value (true or false). Press Enter for the default ("false").
682fa> false
69Name of the library. Leave blank to access all non-encrypted libraries.
70Enter a string value. Press Enter for the default ("").
71library>
72Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
73y) Yes type in my own password
74g) Generate random password
75n) No leave this optional password blank (default)
76y/g/n> n
77Edit advanced config? (y/n)
78y) Yes
79n) No (default)
80y/n> n
81Remote config
82Two-factor authentication is not enabled on this account.
83--------------------
84[seafile]
85type = seafile
86url = http://my.seafile.server/
87user = me@example.com
88pass = *** ENCRYPTED ***
892fa = false
90--------------------
91y) Yes this is OK (default)
92e) Edit this remote
93d) Delete this remote
94y/e/d> y
95```
96
97This remote is called `seafile`. It's pointing to the root of your seafile server and can now be used like this:
98
99See all libraries
100
101    rclone lsd seafile:
102
103Create a new library
104
105    rclone mkdir seafile:library
106
107List the contents of a library
108
109    rclone ls seafile:library
110
111Sync `/home/local/directory` to the remote library, deleting any
112excess files in the library.
113
114    rclone sync -i /home/local/directory seafile:library
115
116### Configuration in library mode
117
118Here'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:
119
120```
121No remotes found - make a new one
122n) New remote
123s) Set configuration password
124q) Quit config
125n/s/q> n
126name> seafile
127Type of storage to configure.
128Enter a string value. Press Enter for the default ("").
129Choose a number from below, or type in your own value
130[snip]
131XX / Seafile
132   \ "seafile"
133[snip]
134Storage> seafile
135** See help for seafile backend at: https://rclone.org/seafile/ **
136
137URL of seafile host to connect to
138Enter a string value. Press Enter for the default ("").
139Choose a number from below, or type in your own value
140 1 / Connect to cloud.seafile.com
141   \ "https://cloud.seafile.com/"
142url> http://my.seafile.server/
143User name (usually email address)
144Enter a string value. Press Enter for the default ("").
145user> me@example.com
146Password
147y) Yes type in my own password
148g) Generate random password
149n) No leave this optional password blank (default)
150y/g> y
151Enter the password:
152password:
153Confirm the password:
154password:
155Two-factor authentication ('true' if the account has 2FA enabled)
156Enter a boolean value (true or false). Press Enter for the default ("false").
1572fa> true
158Name of the library. Leave blank to access all non-encrypted libraries.
159Enter a string value. Press Enter for the default ("").
160library> My Library
161Library password (for encrypted libraries only). Leave blank if you pass it through the command line.
162y) Yes type in my own password
163g) Generate random password
164n) No leave this optional password blank (default)
165y/g/n> n
166Edit advanced config? (y/n)
167y) Yes
168n) No (default)
169y/n> n
170Remote config
171Two-factor authentication: please enter your 2FA code
1722fa code> 123456
173Authenticating...
174Success!
175--------------------
176[seafile]
177type = seafile
178url = http://my.seafile.server/
179user = me@example.com
180pass =
1812fa = true
182library = My Library
183--------------------
184y) Yes this is OK (default)
185e) Edit this remote
186d) Delete this remote
187y/e/d> y
188```
189
190You'll notice your password is blank in the configuration. It's because we only need the password to authenticate you once.
191
192You specified `My Library` during the configuration. The root of the remote is pointing at the
193root of the library `My Library`:
194
195See all files in the library:
196
197    rclone lsd seafile:
198
199Create a new directory inside the library
200
201    rclone mkdir seafile:directory
202
203List the contents of a directory
204
205    rclone ls seafile:directory
206
207Sync `/home/local/directory` to the remote library, deleting any
208excess files in the library.
209
210    rclone sync -i /home/local/directory seafile:
211
212
213### --fast-list
214
215Seafile version 7+ supports `--fast-list` which allows you to use fewer
216transactions in exchange for more memory. See the [rclone
217docs](/docs/#fast-list) for more details.
218Please note this is not supported on seafile server version 6.x
219
220
221### Restricted filename characters
222
223In addition to the [default restricted characters set](/overview/#restricted-characters)
224the following characters are also replaced:
225
226| Character | Value | Replacement |
227| --------- |:-----:|:-----------:|
228| /         | 0x2F  | /          |
229| "         | 0x22  | "          |
230| \         | 0x5C  | \           |
231
232Invalid UTF-8 bytes will also be [replaced](/overview/#invalid-utf8),
233as they can't be used in JSON strings.
234
235### Seafile and rclone link
236
237Rclone supports generating share links for non-encrypted libraries only.
238They can either be for a file or a directory:
239
240```
241rclone link seafile:seafile-tutorial.doc
242http://my.seafile.server/f/fdcd8a2f93f84b8b90f4/
243
244```
245
246or if run on a directory you will get:
247
248```
249rclone link seafile:dir
250http://my.seafile.server/d/9ea2455f6f55478bbb0d/
251```
252
253Please note a share link is unique for each file or directory. If you run a link command on a file/dir
254that has already been shared, you will get the exact same link.
255
256### Compatibility
257
258It has been actively tested using the [seafile docker image](https://github.com/haiwen/seafile-docker) of these versions:
259- 6.3.4 community edition
260- 7.0.5 community edition
261- 7.1.3 community edition
262
263Versions below 6.0 are not supported.
264Versions between 6.0 and 6.3 haven't been tested and might not work properly.
265
266{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/seafile/seafile.go then run make backenddocs" >}}
267### Standard options
268
269Here are the standard options specific to seafile (seafile).
270
271#### --seafile-url
272
273URL of seafile host to connect to.
274
275- Config:      url
276- Env Var:     RCLONE_SEAFILE_URL
277- Type:        string
278- Default:     ""
279- Examples:
280    - "https://cloud.seafile.com/"
281        - Connect to cloud.seafile.com.
282
283#### --seafile-user
284
285User name (usually email address).
286
287- Config:      user
288- Env Var:     RCLONE_SEAFILE_USER
289- Type:        string
290- Default:     ""
291
292#### --seafile-pass
293
294Password.
295
296**NB** Input to this must be obscured - see [rclone obscure](/commands/rclone_obscure/).
297
298- Config:      pass
299- Env Var:     RCLONE_SEAFILE_PASS
300- Type:        string
301- Default:     ""
302
303#### --seafile-2fa
304
305Two-factor authentication ('true' if the account has 2FA enabled).
306
307- Config:      2fa
308- Env Var:     RCLONE_SEAFILE_2FA
309- Type:        bool
310- Default:     false
311
312#### --seafile-library
313
314Name of the library.
315
316Leave blank to access all non-encrypted libraries.
317
318- Config:      library
319- Env Var:     RCLONE_SEAFILE_LIBRARY
320- Type:        string
321- Default:     ""
322
323#### --seafile-library-key
324
325Library password (for encrypted libraries only).
326
327Leave blank if you pass it through the command line.
328
329**NB** Input to this must be obscured - see [rclone obscure](/commands/rclone_obscure/).
330
331- Config:      library_key
332- Env Var:     RCLONE_SEAFILE_LIBRARY_KEY
333- Type:        string
334- Default:     ""
335
336#### --seafile-auth-token
337
338Authentication token.
339
340- Config:      auth_token
341- Env Var:     RCLONE_SEAFILE_AUTH_TOKEN
342- Type:        string
343- Default:     ""
344
345### Advanced options
346
347Here are the advanced options specific to seafile (seafile).
348
349#### --seafile-create-library
350
351Should rclone create a library if it doesn't exist.
352
353- Config:      create_library
354- Env Var:     RCLONE_SEAFILE_CREATE_LIBRARY
355- Type:        bool
356- Default:     false
357
358#### --seafile-encoding
359
360This sets the encoding for the backend.
361
362See the [encoding section in the overview](/overview/#encoding) for more info.
363
364- Config:      encoding
365- Env Var:     RCLONE_SEAFILE_ENCODING
366- Type:        MultiEncoder
367- Default:     Slash,DoubleQuote,BackSlash,Ctl,InvalidUtf8
368
369{{< rem autogenerated options stop >}}
370
371