Seafile Client on Raspberry PI


The Raspberry PI is often used as a server for seafile. For this case there are ready-to-use binaries (http://seafile.com/en/download/) and good tutorials how to do so.

Unfortunately this is not the case for the client on raspberry. This article describes how to easily setup the seafile client on raspberry. It is also possible to install the client in parallel to the server on the same raspberry.

Make sure you have python installed:

sudo apt-get -y install python2.7 python-setuptools python-simplejson python-imaging sqlite3

Install the following packages. For the cli-version of the client only the first three are needed (and I have not yet tested the visual seafile-client):

Seafile 5.0.1 (current)

Seafile 4.0.x (old)

Seafile 3.1.x (old)

dpkg -i libsearpc-3.0_3.0.4-1_armhf.deb
dpkg -i ccnet_4.0.6-1_armhf.deb
dpkg -i seafile_4.0.6-1_armhf.deb
dpkg -i seafile-client_4.0.6-1_armhf.deb

These packages are created using checkinstall and following the steps on http://manual.seafile.com/build_seafile/linux.html

If you have dependency errors try to also install the following (however most should be only needed for the build):

sudo apt-get install autoconf automake libtool libevent-dev libcurl4-openssl-dev libgtk2.0-dev uuid-dev intltool libsqlite3-dev valac libjansson-dev libqt4-dev cmake libfuse-dev libssl-dev

Now you can start the seafile client:

# choose a folder where to store the seafile client settings e.g ~/.seafile-client
mkdir ~/.seafile-client            # create the settings folder
seaf-cli init -d ~/.seafile-client  # initialise seafile client with this folder
seaf-cli start

And sync your library:

seaf-cli sync -l "the id of the library" -s  "the url + port of server" -d "the folder where the library folder will be downloaded" -u "username on server" -p "password"

More information on the client usage is available on: https://seacloud.cc/group/3/wiki/seafile-cli-manual


12 Antworten zu “Seafile Client on Raspberry PI”

  1. Hi, thank you for your post.
    Unless following commandline by commandline your tutorial, I get error at this step:
    seaf-cli sync -l […]
    This is what is returnet on the shell when I try to synchronise one of my library on a separate server:
    Traceback (most recent call last):
    File „/usr/bin/seaf-cli“, line 723, in
    main()
    File „/usr/bin/seaf-cli“, line 719, in main
    args.func(args)
    File „/usr/bin/seaf-cli“, line 460, in seaf_sync
    token = get_token(url, username, password, conf_dir)
    File „/usr/bin/seaf-cli“, line 193, in get_token
    device_id = get_peer_id(conf_dir)
    File „/usr/bin/seaf-cli“, line 188, in get_peer_id
    info = ccnet_rpc.get_session_info()
    File „/usr/lib/python2.7/dist-packages/pysearpc/client.py“, line 110, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
    File „/usr/lib/python2.7/dist-packages/ccnet/rpc.py“, line 71, in call_remote_func_sync
    client = self.pool.get_client()
    File „/usr/lib/python2.7/dist-packages/ccnet/pool.py“, line 27, in get_client
    client = self._create_client()
    File „/usr/lib/python2.7/dist-packages/ccnet/pool.py“, line 19, in _create_client
    client.connect_daemon()
    File „/usr/lib/python2.7/dist-packages/ccnet/client.py“, line 120, in connect_daemon
    return self.connect_daemon_with_pipe()
    File „/usr/lib/python2.7/dist-packages/ccnet/client.py“, line 102, in connect_daemon_with_pipe
    raise NetworkError(„Can’t connect to daemon“)
    ccnet.errors.NetworkError: Can’t connect to daemon

    So what do you think? Where is the issue, and how to deal with?
    Cheers,

  2. The last error message is: „Can’t connect to deamon“

    Have you started seafile on the client (with „seaf-cli start“)?
    Did it start without problems?

    • Yes, that’s what I ‚ve done:
      $cd ~/.seafile-client
      $seaf-cli start
      starting ccnet daemon …
      Started: ccnet daemon …
      starting seafile daemon …
      Started: seafile daemon …
      $mkdir ~/synced-folder
      $seaf-cli sync -l id-of-my-library -s https://hostname.net -u user-enregistred-on-my-server -p mypasswd -d /home/pi/synced-folder
      Traceback (most recent call last):
      File „/usr/bin/seaf-cli“, line 723, in
      main()
      File „/usr/bin/seaf-cli“, line 719, in main
      args.func(args)
      File „/usr/bin/seaf-cli“, line 460, in seaf_sync
      token = get_token(url, username, password, conf_dir)
      File „/usr/bin/seaf-cli“, line 193, in get_token
      device_id = get_peer_id(conf_dir)
      File „/usr/bin/seaf-cli“, line 188, in get_peer_id
      info = ccnet_rpc.get_session_info()
      File „/usr/lib/python2.7/dist-packages/pysearpc/client.py“, line 110, in newfunc
      ret_str = self.call_remote_func_sync(fcall_str)
      File „/usr/lib/python2.7/dist-packages/ccnet/rpc.py“, line 71, in call_remote_func_sync
      client = self.pool.get_client()
      File „/usr/lib/python2.7/dist-packages/ccnet/pool.py“, line 27, in get_client
      client = self._create_client()
      File „/usr/lib/python2.7/dist-packages/ccnet/pool.py“, line 19, in _create_client
      client.connect_daemon()
      File „/usr/lib/python2.7/dist-packages/ccnet/client.py“, line 120, in connect_daemon
      return self.connect_daemon_with_pipe()
      File „/usr/lib/python2.7/dist-packages/ccnet/client.py“, line 102, in connect_daemon_with_pipe
      raise NetworkError(„Can’t connect to daemon“)
      ccnet.errors.NetworkError: Can’t connect to daemon

      The id of the library is from an external server that I manage (debian).

  3. Thank you very much. I searched for something linke this for months, but im not a geek enough to do everything on my own.
    After i downloaded libsearpc-3.0_3.0.4-1_armhf.deb, ccnet_3.1.7-1_armhf.deb, and
    seafile_3.1.7-1_armhf.deb via wget and installed the packages i tried to start the seafile-client like you described. Now i got an error-Message, that libjansson.so was not found. So i installed libjansson-dev – and after that it worked!
    Now i have running seafile as server and client on my RaspberryPi.

    THANK YOU!

  4. Should this terminal client also work on a bananaPi?

    I’ve tried this, but it seems that i couldn’t start the ccnet/seafile deamon correctly. When i start the deamon everything seems to be fine:

    pi@bananapi:~$ seaf-cli start
    starting ccnet daemon ...
    Started: ccnet daemon ...
    starting seafile daemon ...
    Started: seafile daemon ...

    via htop i can also see a command that wasn’t there before i run seaf-cli start:

    seaf-deamon –deamon -c /home/pi/.ccnet -d….

    But with seaf-cli status i get errormessages:

    pi@bananapi:~$ seaf-cli status
    Traceback (most recent call last):
    File „/usr/bin/seaf-cli“, line 791, in
    main()
    File „/usr/bin/seaf-cli“, line 787, in main
    args.func(args)
    File „/usr/bin/seaf-cli“, line 603, in seaf_status
    tasks = seafile_rpc.get_clone_tasks()
    File „/usr/lib/python2.7/dist-packages/pysearpc/client.py“, line 110, in newfunc
    ret_str = self.call_remote_func_sync(fcall_str)
    File „/usr/lib/python2.7/dist-packages/ccnet/rpc.py“, line 71, in call_remote_func_sync
    client = self.pool.get_client()
    File „/usr/lib/python2.7/dist-packages/ccnet/pool.py“, line 27, in get_client
    client = self._create_client()
    File „/usr/lib/python2.7/dist-packages/ccnet/pool.py“, line 19, in _create_client
    client.connect_daemon()
    File „/usr/lib/python2.7/dist-packages/ccnet/client.py“, line 120, in connect_daemon
    return self.connect_daemon_with_pipe()
    File „/usr/lib/python2.7/dist-packages/ccnet/client.py“, line 102, in connect_daemon_with_pipe
    raise NetworkError(„Can’t connect to daemon“)
    ccnet.errors.NetworkError: Can’t connect to daemon

    The same ccnet.errors.NetworkError i get when i try seaf-cli stop or when i try to sync a libary.
    If i try to start the seafile-terminal client again (seaf-cli start) i get the same success-message like in the beginning – and after that i see two seaf-deamon processes in htop…

    • Okay, this evening i tried to compile everything on my own on my BananaPi. Now it works. Thank you for the checkinstall-hint. That may help me to deinstall that stuff again. It took me about three hours… Maybe i write a longer blogentry about that later.

      • Glad to hear that it works now!
        Honestly, I don’t know how much the architecture of raspberry and banana is varying, but I guess this was the issue while the precompiled versions are not working for you.

    • Honestly, I have no clue.

      Does seaf-cli start give any outout other than?
      starting ccnet daemon …
      Started: ccnet daemon …
      starting seafile daemon …
      Started: seafile daemon …

      Did you use the provided packages or compile it yourself?

      The connection between the two RPIs works? E.g. ping or a wget of the servers url (e.g. https://xx.no-ip.org:8010)

  5. Den Community Server gibt es fur die Linux Distributionen Debian, Ubuntu und CentOS. Auf GitHub gibt es daruber hinaus von der Seafile Community bereitgestellte Pakete fur die Installation auf Raspberry Pi. Eine detaillierte Gegenuberstelllung der Funktionen und Eigenschaften von Professional Edition und Community Edition finden Sie im Editionenvergleich .

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert