VOOZH about

URL: https://thenewstack.io/tutorial-set-up-cloud-storage-on-a-linux-server-using-seafile/

⇱ Tutorial: Set up Cloud Storage on a Linux Server, Using Seafile - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2020-07-22 09:17:23
Tutorial: Set up Cloud Storage on a Linux Server, Using Seafile
tutorial,
Edge Computing / Linux / Storage

Tutorial: Set up Cloud Storage on a Linux Server, Using Seafile

A tutorial on how to use the open source cloud storage system Seafile as your in-house cloud platfor
Jul 22nd, 2020 9:17am by Jack Wallen
👁 Featued image for: Tutorial: Set up Cloud Storage on a Linux Server, Using Seafile

The open source cloud storage system Seafile could easily serve as your in-house cloud platform. Written with the Python Django framework, Seafile is powerful, includes a user-friendly web frontend, and offers features like:

  • File syncing
  • Strong file encryption
  • Easy collaboration
  • Team Wiki
  • Small footprint server, for high performance
  • AD/LDAP integration
  • Create groups with file syncing, online file editing, and more
  • Create libraries (for separate syncing)
  • Automatic file conflict resolution
  • Share libraries, subdirectories, links, files, and more

Seafile is used by the likes of Kaspersky, Humboldt University, Gutenberg University, University of Strasbourg, and more, and with over 1 million users and thousands of teams, Seafile is ready to become your go-to, on-premise cloud solution.

I want to walk you through the process of installing the Seafile cloud storage server on Linux. I’ll be demonstrating on Ubuntu Server 18.04.

Download and Unpack the Server

The first thing to do is download the Seafile server with the command:

wget https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_7.1.4_x86-64.tar.gz

Make sure to check the official Seafile download page, so that you’re downloading the latest version of the server.

Once the file downloads, unpack it with the command:

tar xvfz seafile-server_7.1.4_x86-64.tar.gz

This will create a new directory, named seafile-server-7.1.4. Change into that directory with the command:

cd seafile-server-7.1.4

Create a new directory to house Seafile with the command:

sudo mkdir /srv/seafile

Move the entire contents of the directory with the command:

sudo mv * /srv/seafile/

Installing the Dependencies

Seafile depends on a database server, so let’s install it with the command:

sudo apt-get install mysql-server -y

Install the remaining dependencies with the commands:

sudo apt install python python-{pip,pil,ldap,urllib3,setuptools,mysqldb,memcache,requests} -y

sudo apt install libpython3.6 ffmpeg python3-django-captcha -y

When that installation completes, secure the MySQL database server with the command:

sudo mysql_secure_installation

Make sure to give the database admin user a strong password and answer Y for the remaining questions.

Creating the Databases

It’s time to create the Seafile databases. Log in to the MySQL console with the command:

sudo mysql -u root -p

Create the necessary databases and grant the necessary permissions with the commands:

CREATE DATABASE seafile_server;
CREATE DATABASE ccnet_server;
CREATE DATABASE seahub_server;
CREATE USER 'seafile'@'localhost' IDENTIFIED BY 'PASSWORD';
GRANT ALL ON seafile_server.* TO 'seafile'@'localhost';
GRANT ALL ON ccnet_server.* TO 'seafile'@'localhost';
GRANT ALL ON seahub_server.* TO 'seafile'@'localhost';
QUIT;

…where PASSWORD is a strong/unique password.

Configuring Seafile

With everything out of the way, it’s time to configure Seafile. To do this, change into the /srv/seafile directory with the command:

cd /srv/seafile

Issue the command:

sudo ./setup-seafile-mysql.sh

When prompted, hit Enter on your keyboard and the installation will begin. You will be asked a number of questions (such as server name, server address, server port, etc.). When asked about initializing the databases, type 1 to create new. You will then be asked questions regarding the database server. Those questions (and answers) are:

  • mysql server host: localhost
  • mysql server port: 3306
  • root password: the root password for the MySQL server
  • mysql user for Seafile: seafile
  • password for Seafile user: PASSWORD
  • ccnet database name: ccnet-db
  • Seafile database name: seafile-db
  • Seahub database name: seahub-db

Where PASSWORD is a strong/unique password.

That’s it for the configuration.

Running the Seafile Server

Now that Seafile is configured, it’s time to run the server. To do this, you must start two components: seafile and seahub. To start these components, remain in the /opt/cloud directory and issue the following commands:

sudo ./seafile.sh start

sudo ./seahub.sh start

When you run the seahub.sh script for the first time, you’ll be asked to set up a new admin user (you’ll enter an email address and password for that user).

Install NGINX

We’ll use NGINX as our web server, which will need to be configured as a reverse proxy. Install the server with the command:

sudo apt-get install nginx -y

Once NGINX is installed, start and enable it with the commands:

sudo systemctl start nginx

sudo systemctl enable nginx

Create a new configuration file with the command:

sudo nano /etc/nginx/conf.d/seafile.conf

In that file, paste the following:

server {
    listen 80;
    listen [::]:80;
    server_name  SERVERADDRESS;
    autoindex off;
    client_max_body_size 100M;
    access_log /var/log/nginx/seafile.com.access.log;
    error_log /var/log/nginx/seafile.com.error.log;

     location / {
            proxy_pass         http://127.0.0.1:8000;
            proxy_set_header   Host $host;
            proxy_set_header   X-Real-IP $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Host $server_name;
            proxy_read_timeout  1200s;
        }

     location /seafhttp {
            rewrite ^/seafhttp(.*)$ $1 break;
            proxy_pass http://127.0.0.1:8082;
proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_connect_timeout  36000s;
            proxy_read_timeout  36000s;
            proxy_send_timeout  36000s;
            send_timeout  36000s;
        }

    location /media {
            root /srv/seafile-server-latest/seahub;
        }
}

Where SERVERADDRESS is either the domain or IP address of the hosting server.

Save and close the file. Restart NGINX with the command:

sudo systemctl restart nginx

Accessing Seafile

You can now access your newly-installed Seafile platform. Open a web browser and point it to http://SERVER_IP (Where SERVER_IP is either the domain or IP address of the hosting server). You will be prompted to log in (Figure A).

👁 Image

Figure A: Logging into our newly-installed Seafile server.

Use the email/password credentials you created after running the ./seahub.sh start script and you’ll find yourself on the main Seafile page, where you can start working with your on-premise cloud platform.

More Storage Tutorials

Tutorial: Deploy a Highly Availability GlusterFS Storage Cluster

Tutorial: Create a Docker Swarm with Persistent Storage Using GlusterFS

Tutorial: Dynamic Provisioning of Persistent Storage in Kubernetes with MiniKube

TRENDING STORIES
Jack Wallen is what happens when a Gen Xer mind-melds with present-day snark. Jack is a seeker of truth and a writer of words with a quantum mechanical pencil and a disjointed beat of sound and soul. Although he resides...
Read more from Jack Wallen
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Real, Docker.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.