Start |
You are here: Start » Cloud

Seafile - Your Cloud on Raspberry Pi

Seafile is an open source file syncing and collaboration platform for teams. It comes with Dropbox-like file syncing, but is designed to be better suited to teamwork. You can build a file sharing and syncing service for your team on your servers.

Used Tools/Material:

- Win 7/8 PC with Chrome Browser
- Android Tablet: Nexus 7 2G
- Raspberry Pi (China made) with 32 GB SDcard (30 MB/sec)

Configuration Screen

Raspi Configuration: Select the followings:
Expand: Yes (we need all memory for Seafile)
Overscan: No
Configure keyboard: Whatever you have
Change_pass: Yes (change password for pi user)
Time zone: Yes (change to your time zone)
Memory split: No (we need all memory for Seafile)
SSH: Yes (to access from a Desktop PC or Android Tablet)
Boot behavior : No (you can always start it from the prompt with startx.
Update: Yes (takes about 10 minutes, LAN cable should be connected)

set password root: sudo passwd root

Tutorial in German language
other tutorial in German language

Server Setup in 7 Steps
Client Setup
Android Client Setup


Seafile Server Configuration

PDF Download [177 KB] (in colours)

Step 1

update Packet description: sudo apt-get update

Seafile needs some packets

pi@raspberrypi ~ $ sudo apt-get install python2.7 python-setuptools python-simplejson python-imaging sqlite3

Packets will be installed. You have to confirm with 'Y'


Step 2
Since Seafile runs as a service in the background, it is recommended to create a new user, under which Seafile then will be started.
We create the user 'seafile', log in as user 'seafile' and change to its home directory

pi@raspberrypi ~ $ sudo adduser seafile

Promt:
Adding user `seafile' ...
Adding new group `seafile' (1002) ...
Adding new user `seafile' (1001) with group `seafile' ...
Creating home directory `/home/seafile' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: xxxxxxxx
Retype new UNIX password: xxxxxxxx
passwd: password updated successfully
Changing the user information for seafile
Enter the new value, or press ENTER for the default

pi@raspberrypi ~ $ sudo su seafile
seafile@raspberrypi /home/pi $ cd

seafile@raspberrypi ~ $

Step 3
Now, we create a new folder in which we download the Seafile program

seafile@raspberrypi ~ $ mkdir seafile

The actual version of seafile can be found here:
http://www.seafile.com/en/download/

Right click 'Server for Raspberry Pi' and copy the URL of the link:
e.g. http://seafile.googlecode.com/files/seafile-server_2.0.3_pi.tar.gz


Step 4
Then we download the Seafile server and unpack it.

seafile@raspberrypi ~ $ wget http://seafile.googlecode.com/files/seafile-server_2.0.3_pi.tar.gz

seafile@raspberrypi ~ $ tar -xvf seafile-server_2.0.3_pi.tar.gz

Seafile program will be unzipped ......
seafile@raspberrypi ~ $


Step 5
We jump into the just unpacked folder and run the configuration of the server by Seafile

seafile@raspberrypi ~ $ cd seafile-server-2.0.3

seafile@raspberrypi ~/seafile-server-2.0.3 $ ./setup-seafile.sh

-----------------------------------------------------------------
This script will guide you to config and setup your seafile server.
Make sure you have read seafile server manual at
https://github.com/haiwen/seafile/wiki
Note: This script will guide your to setup seafile server using sqlite3,
which may have problems if your disk is on a NFS/CIFS/USB.
In these cases, we sugguest you setup seafile server using MySQL.

Press [ENTER] to continue
-----------------------------------------------------------------

After selecting a server name, your (internal) IP-address and the default ports (if not used anywhere else), you will get a table as follow:

Seafile and Seahub Configuration

Enter to proceed with the Seahub webserver configuration

-----------------------------------------------------------------
Seahub is the web interface for seafile server.
Now let's setup seahub configuration. Press [ENTER] to continue
-----------------------------------------------------------------

Step 6 - Start
Now we can start Seafile (File synchronization service) and Seahub (Web Interface):

seafile@raspberrypi ~ $ ./seafile.sh start
seafile@raspberrypi ~ $ ./seahub.sh start


Step 7 - Reboot
Finally, we createo a Cronetab to start Seafile on reboot:

seafile@raspberrypi ~ $ crontab -e

Enter the following lines:
@reboot /home/seafile/seafile-server-2.0.3/seafile.sh start
@reboot /home/seafile/seafile-server-2.0.3/seahub.sh start
Save (Ctrl/O and exit (Ctrl/X)

___________________________________________________________________

Manueller Start Seafile and Seahub:
root@raspberrypi:~# cd /home/seafile/seafile-server-2.0.3
root@raspberrypi:/home/seafile/seafile-server-2.0.3# ./seafile.sh start

root@raspberrypi:/home/seafile/seafile-server-2.0.3# ./seahub.sh start

___________________________________________________________________

Change 'ccnet.config'
User_name, service_url, ports, ....

seafile@raspberrypi ~ $ sudo nano /home/seafile/ccnet/ccnet.conf





Step 7
For cloud access from the outside world you must open the following TCP ports:
10001 ccnet
12001 seaf-server
8000 seahub
80082 httpserver

Seafile Client Configuration for Windows

Download Client for Windows from the Seafile Download page and install it.

Access with Browser (I use Chrome)
Enter thr (internal) IP-address with port number of the seafile server.
In my case: 192.168.1.106:8000

Picture: ......

more to come

Seafile Client Configuration for Android

Client Login

Download Seafile Client from Google Play and login with the Email address and password defined in configuration step 5. Now you can upload/download all sorts of files.

Android Client

SGS 4

Android Client

Nexus 7