I have previously hacked around some on my own open source Dropbox clone, but I haven’t had the time lately. I came across a project called Seafile, which looks promising as an open-source Dropbox alternative. Unfortunately, they don’t package their installation for Arch Linux, so I had to get my hands a little dirty to try it out. I created four AUR packages for seafile and its dependencies:
For the curious, my installation instructions and packages are based on the directions at https://github.com/haiwen/seafile/wiki/Build-and-deploy-seafile-server-from-source and https://github.com/haiwen/seafile/wiki/Build-and-use-seafile-client-from-source. In these instructions, I assume you are using Arch Linux, and that you are familiar with how to use makepkg, pacman & friends to build and install packages from the AUR.
Build/install the Seafile package
You must install the seafile package above, along with all its dependencies. The easiest way to do this is using the AUR helper of your choice, but you can also do this manually if you wish. For most of the AUR helpers, this will look something like
pacaur -S seafile
or
yaourt -S seafile
Install the Seafile server
If you simply want to use the seafile client with seafile.com and are not interested in hosting your own server, skip to the next section. Otherwise, read on to install the seafile server on your machine.
Now that the seafile package and all its dependencies are installed, create a directory where you wish to serve the seafile files out of. This should be somewhere with plenty of space, as all the files served by your seafile installation will ultimately live here. This directory should be owned by the user you want your seafile server to run as. In fact, you should su into that user and run the rest of these commands from there. I’ll refer to the directory you just created as $SEABASE from here on out.
Download seahub, the web server portion of the seafile server.
mkdir -p $SEABASE/seafile-server
cd $SEABASE/seafile-server
wget http://seafile.googlecode.com/files/seahub-latest.tar.gz
tar xf seahub-latest.tar.gz
mv seahub-${version} seahub
cd ..
Run the setup script to generate all the configuration files:
seafile-admin setup
Fill out the requested fields following the provided directions. You may now start/stop the seafile server using the following commands:
seafile-admin start
seafile-admin stop
Note that the seafile-admin commands must be run from the $SEABASE directory.
For more information, consult the Seafile wiki page for installing from source (but remember that the top part of the page won’t apply to you since your AUR helper has downloaded, built, and installed all necessary packages for you).
Using the Seafile client
At this point, the Seafile client shouldn’t need further installation. Running
seafile-applet
should start the client, presenting a configuration screen on the first time it is run.
Enjoy! And, of course, let me know if you encounter any problems.
Update (2013.03.08): Updated seahub-latest.tar.gz download URL.
Tags: arch linux, dropbox, file, installation, seafile, synchronization
Thanks! I just wonder how to package Seafile server for Debian while not changing the configuration process. This article gives me a good hint.
Thanks for the helpful post. Is there a way to enable https on seahub (default port 8000) with the way the AUR package is configured?
jmsq: Most (all?) of the web server configuration is done via seahub, which isn’t included in my AUR packages. Is https://github.com/haiwen/seafile/wiki/Enable-Https-on-Seafile-web what you’re looking for?
You’re right. Apparently the default built-in seahub webserver doesn’t support https, so you have to do the following:
1. Install and setup nginx as described here: https://github.com/haiwen/seafile/wiki/Deploy-Seafile-Web-with-nginx-apache#wiki-Start_Seafile_and_Seahub
2. Edit that config for https as described here: https://github.com/haiwen/seafile/wiki/Enable-Https-on-Seafile-web#wiki-Enable_https_on_Seahub
3. Install python2-flup
4. Edit ccnet.conf with the new SERVICE_URL (now on default 443 instead of 8000)
5. Start nginx, then start seafile with “seafile-admin start –fastcgi”
Hope that helps.
JM
Hrm, the bottom half of https://github.com/haiwen/seafile/wiki/Enable-Https-on-Seafile-web seems to indicate https is also supported with their built-in httpserver in seafile versions >=1.4. Does it not work properly?
That does, but it is only for the httpserver component running on port 8082, not seahub. I enabled that before doing the instructions above.
Thanks a lot for the instructions! Is there a chance you might release an AUR package without the client? Otherwise you are forced to install gtk and it’s dependencies when you only want to use the server. I removed gtk2 and libnotify from the PKGBUILD and added “–disable-client” to the configuration options and it seems to work so far.
Hey is it possible to use seafile with lighttpd instead of nginx?
Apache\Nginx is a little bit Overdoozed for my machine
I don’t know. You should contact the developers – I just packaged it and installed it once or twice.
Hey Aaron thx for replay
some little issue in the tut. In the line:
wget http://seafile.googlecode.com/files/seahub-latest.tar.gz loads only the sehub 2.0 version
if someone used this tut with a newer seafile-server in aur (currently 2.1.3) you have to go to
https://github.com/haiwen/seahub/tags and search the right webserver. For Seafile 2.1.3 need the 2.1.3 webserver.
In run in this trap and run a seafile 2.1.3 sever with a 2.0 web server which will lead in an argument exception.
Aaron, thanks for the work.
But please, can you make this point more clear:
What are the steps to install only the client?
Forget the previoues question, I found:
https://aur.archlinux.org/packages/seafile-client/
Thanks!