Managing files in the Seafile personal cloud

Install Seafile

Create the root directory for seafile (it must be the same path you give for this directory in the Nginx config file:

# mkdir -p /var/www/sea

Change to the newly created directory and download the latest Seafile packages (check the download page [5] for the latest packages).

# wget\

Then extract the files:

x# tar xzvf seafile-server*

Now change to the extracted seafile-server directory and run the following script, which will create the required databases and directories for the Seafile server:

# ./

The script will create some sub-directories in the root directory and tables in the database. You will get the following output, where you will be required to take some actions. Provide new values for the server name and IP address and leave the rest to the default values. The script will ask if you want to use an existing database or create a new one. Choose to create a new database.

You will get more questions, asking for the hostname of the MySQL server (localhost, in this case) and the port number for the MySQL server (the default value of 3306 is fine in most cases). Provide the current database root password, and create a new user for the Seafile database (don't leave it as root). In this example, I created a user named sea. Accept the default values for the database name prompts.

Then, open the ccnet.conf file as root and edit the SERVICE_URL line to use HTTPS instead of HTTP and remove the 8000 port. Also, cross-check that the site URL is pointing to your domain.

Next, open the file and add the following line before DATABASES:


Save and close the file. Restart Nginx with:

# service nginx restart

Then start Seafile and Seahub:

# /var/www/sea/seafile-server-latest// start
# /var/www/sea/seafile-server-latest// start-fastcgi

When you run the second command for the first time, it will create the admin account for your Seafile server. Provide this account with an existing email address and a new password, which you will use to log into your server.

Open a browser and enter the site URL. If everything is running fine on your server, it will open the web interface of your Seafile cloud server. Log into your account using the email ID and password. Congratulations on your very own Seafile cloud server.

By default, you will need to start Seafile manually between server reboots. To avoid the need for a manual restart, you'll need to create an init script.

How to Use Seafile

When you log into your Seafile web interface, you will see the page shown in Figure 1. Seafile comes with a default library, which you can delete if you are looking for client-side encryption. The Starred link shows the files or directories you selected as favorites for quicker access.

Figure 1: The Seafile web interface.

The Messages link shows all the messages you sent or received on the server. Devices shows all the devices you use to log into the sever. You can block access to any device by deleting it from the server. Contacts allows you to manage address books of other users on the server for messaging and easy sharing.

Click Share Admin to manage your sharing activities – the libraries, folders, files, and links you have shared.

The top bar in Figure 1 shows that you are on the My Home page. Choose the Groups option to create and manage groups. The Organization option shows all the activities going on within the groups on the server; you won't see libraries or documents created by individual members.

Sharing and Collaborating

Users can easily collaborate with other users on the same Seafile server through Group or by sharing files with individuals. Sharing is not restricted to the users of the cloud server. Files and documents can be shared with outsiders through links. By default, these shared file become public and anyone with the link can access them; however, you can restrict access to the file using a password.

Seafile comes with a built-in text editor that supports several file types, including RTF, markdown, and simple text files. Users can edit each other's documents, which are shared within Groups, through libraries. Seafile online editing does not feature real-time editing, but it does offer a neat editing experience with support for discussion.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Seafile 9

    Seafile offers file sharing and synchronization like Nextcloud and ownCloud, but its speed leaves the competition far behind.

  • simpleDrive

    If you value data security and privacy, you might want to build your own cloud storage. SimpleDrive offers a workable alternative to this time-consuming project.

  • Comparing Cloud Providers

    Many companies now offer data storage in the cloud. We tested seven alternatives with a close look at security features.

  • Nginx

    The fast and practical Nginx web server is easy to configure and extend.

  • Introduction

    This month in Linux Voice.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Find SysAdmin Jobs