Howto install Seafile + autostart + move to HTTPS with valid certificate

This howto describes thi installation of seafile on Nethserver 7.
Installation is fully described on page
My howto adjust some Nethserver specifities.

You will need root access to Mariadb

1. Install dependencies

For Seafile 7.1.x

yum install python python-setuptools MySQL-python python-urllib3 python-ldap -y
pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy django-pylibmc django-simple-captcha python3-ldap

2. Create installation folder

mkdir /opt/seafile
cd /opt/seafile

3. Download and install

Download server package from

tar -xzf seafile-server_*
mkdir installed
mv seafile-server_* installed
cd seafile-server-*
./  # run the setup script & answer prompted questions
./ stop # stop Seahub website
./ stop # stop Seafile processes

4. Adjust Firewall

On firewall we need create service object with ports 8000 and 8082

Now create rule to allow Seafile object in firewall.

After all is done, you have running seafile on http://your_server_ip:8000

5. Run seafile after boot

Don´t forget rename your seafileuser.

sudo vim /etc/systemd/system/seafile.service


# add mysql.service or postgresql.service depending on your database to the line below mysqld.service


ExecStart=/opt/seafile/seafile-server-latest/ start
ExecStop=/opt/seafile/seafile-server-latest/ stop


sudo vim /etc/systemd/system/seahub.service
Description=Seafile hub seafile.service


# change start to start-fastcgi if you want to run fastcgi

ExecStart=/opt/seafile/seafile-server-latest/ start

ExecStop=/opt/seafile/seafile-server-latest/ stop





systemctl enable seafile.service
systemctl enable seahub.service

6. Enable https

Stop seafile service:

cd / opt/ seafile/seafile-server-latest/

./ stop

./ stop

Create new virtual host under Web server section

Request new certificate for you server.

Reverse proxy

nano /etc/e-smith/templates-custom/etc/httpd/conf.d/virtualhosts.conf/15_seafile

<VirtualHost *:443>


DocumentRoot /var/www

SSLEngine On

SSLCertificateFile /etc/letsencrypt/live/

SSLCertificateKeyFile /etc/letsencrypt/live/

Alias /media /opt/seafile/seafile-server-latest/seahub/media

<Location /media>

Require all granted


RewriteEngine On


# seafile fileserver


ProxyPass /seafhttp

ProxyPassReverse /seafhttp

RewriteRule ^/seafhttp - [QSA,L]


# seahub


SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

ProxyPreserveHost On

ProxyPass /

ProxyPassReverse /


Modify settings

In this step when I changed ccnet.conf and, seafile was not running on https. I need also change settings in webpage of seafile under System admin section.




Start Seafile

./ start
./ start

All done.


Thank you @Miko10 , going to try this soon!
(Because of the PHP requirements of nextcloud) I have been looking around for a web-based file sharing solution for arm-installations.
And never had the guts to take Seafile on…

Question up front:
Is there some kind of integration with the nethserver’s user-accounts?

If you talk about Nextcloud/Nethserver user account, Seafile is able to connect to LDAP

But I don´t use it.

1 Like