CLI Client with NAS folder


CLI client

I setup CLI client to synchronize with a folder that is on a NAS share(mounted with CIFS).
Changes (create, delete folders/files) that I do on the NAS share directly are not synced with Seafile server.
However, changes that I do using say Seafile app on the phone or Web app get synchronized fine and I see these changes in the NAS share.

If I stop CLI client and start it, prior changes made on the NAS share directly then get synced to Seafile
I mean, I could create a cron job to stop and start the CLI client every so often, but that is a pretty silly solution.
Any help?


anyone? or the CLI client isn’t famous in these parts.

File changes are not reported to the seafile client if the filesystem is on a CIFS network drive. This is a system limitation! This problem is also present with the seafile GUI.

The seafile GUI works around this problem by setting a sync interval, see:

As I have no clue how to set this option with the CLI client I would try:

  1. stop the CLI client
  2. Install the seafile GUI (use the same version as the CLI!!!)
  3. start GUI
  4. set sync interval
  5. stop GUI
  6. start CLI
  7. hope for the best! :wink:
1 Like

Thank you very much for this! That makes sense.
I wish there was a CLI command to specify this. Unfortunately, I cannot install GUI on a headless server as I’d assume it would require some sort of basic xwindows?
Very useful information nevertheless.

Yes, but you don’t need to run a local X windows if you are coming from another linux client with a running X. Simply install the GUI and login from a host running X with “ssh -X $headlesshost” and start the GUI.

1 Like

I honestly never used the -X option. Thanks for that!

Just tried it and got GUI to come up. That said, it displays a whole lotta symbols instead of readable letters and I cannot input anything. I think I need to configure something in the options I pass via SSH.

No the X11 forwarding is working fine. The problem is that the needed fonts are not installed on your $headlesshost.

On my ubuntu laptop these fonts are beeing used by the seafile GUI:

1 Like

Thanks Germeier. That did it!
Now, changes that are done directly on NAS share getting picked up and updated on the library!
You are my hero.
The question now is, whether it is possible to specify this “sync interval” somewhere in the config files without going through the below trouble as it does not look like a sane solution.

I’ve documented what I had to do to make it work from the very beginning. Here it is:

-OS: CentOS 7.3.1511
-seafile 6.0.6 installed and running
-NAS is mounted using CIFS and located in /mnt/nasshare

  1. ssh into the server running seafile

  2. add repo for seafile CLI/GUI for CentOS7 client from here

  3. install cli client
    yum install seafile

  4. initialize seaf-cli client to create config file(~/.config/Seafile) as well as specify where to store client data
    seaf-cli init -d /opt/seaf-client

  5. start seaf-cli client
    seaf-cli start

  6. create library to sync with this client
    seaf-cli create -s http://x.x.x.x:8000 -n LibraryTest -u -p password

  7. list the library id I just created to sync with this client (a long alphanumeric number)
    seaf-cli list

  8. sync above library with this the NAS share (using library id)
    seaf-cli sync -l 645gf65g-f87g-454e-gb54-76fcg5y8b524 -s http://x.x.x.x:8000 -d /mnt/nasshare/seafile/ -u -p password

  9. stop seaf-cli client
    seaf-cli stop

  10. install seafile-client-qt (GUI) from repo in step 1
    yum install seafile-client-qt

  11. Install xauth for X11 forwarding
    yum install xauth

  12. reconnect via SSH now with X forwarding options
    ssh -X -A root@x.x.x.x
    attempting to run seafile-applet launches the GUI but I cannot type anything in in the fields, the fonts are all messed up and there are errors on the CentOS side.

  13. after a bit of reading, I did the following
    yum install qtcreator
    export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
    Now running seafile-applet launches the GUI client and I am able to type but the fonts are still messed up

  14. as per germeier’s direction, I copied below fonts from my linux machine (Linux Mint 17) to CentOS into the same path
    CentOS did not have truetype/dejavu, truetype/liberation folders so I had to create them

  15. launch seafile-applet again
    Now I am able to type and actually see what I am typing.
    Specified my server, and connected successfully.

  16. specify sync interval as per this, I went with 60 seconds.

  17. close GUI client

  18. start seaf-cli
    seaf-cli start

All done. I tested and it indeed worked as intended. More testing needed tho.
Please feel free to correct and suggest a different method of doing this.
Once again, Germeier, thank you so very much for lending a hand!

An easier (but still “hacky”) way to do this should be:

→ sqlite3 seafile/Seafile/.seafile-data/repo.db
SQLite version 3.11.0 2016-02-15 17:29:24
Enter “.help” for usage hints.
sqlite> INSERT INTO “RepoProperty” VALUES(‘$REPOID’,‘sync-interval’,‘$SECONDS’);

or change the value

UPDATE “RepoProperty” SET value = ‘$SECONDS’ WHERE repo_id = ‘$REPOID’ AND key = ‘sync-interval’;


You, sir, are awesome. I was about to go and analyze all the structures by myself, but thanks to you I don’t have to.

I tried it and it works perfectly. :slight_smile: But be careful to stop the daemon first, just to be safe.