Complete install script for Seafile

In the past i have always used the script from Seafile germany (written by Alexander Jackson)
Seafile germany is history and now called syncwerk
the script has installed https, postfix, fail2ban, nginx and so on in one step and was very helpful specially for beginners

i believe it would be a great idea to have this kind of script also within seafile ltd

There is one in the manual
https://manual.seafile.com/deploy/
I never try it but it shoulde work…it is a copy with some changes…e.g. postfix is not installed…
Direct Link

many thanks
i try it tomorrow

I tried the install script now
It seems that seafile has not installed correct
ccnet dont exist
when i https://servername i got a 502 bad gateway message
I do the seafile_debian script on a fresh installed debian 8 machine
i uploaded the installation log on my dropbox account

should i copy the install script in a defined folder ?
i start it from /usr/src

Should the seafile package downloaded before starting the script and is it expected in a defined folder ?

@Norbert_Ruthers

I’ve just tried the debian script and it is working. There are a few things you need to notice though. I’ve only tried it with the Professional version though so I’m not sure if it will work with the community version the same way.

First you need to download the latest Professional package and place it in /usr/src/seafile/ (you will need to create the directory)

Then download the scrip (i used wget --no-check-certificate https://raw.githubusercontent.com/haiwen/seafile-server-installer/master/seafile_debian); You can place it anywhere, just be sure to run as root. I’ve personally run it from /opt

Edit the variables in the script - most likely you will only need to edit the following fields:
SEAFILE_SERVER_ADMIN=you@youremail.ltd (this will be your admin username to log in)
SEAFILE_SERVER_TIME_ZONE=“Europe/Berlin” (just use your own timezone
Also, make sure that the hostname in your VPS is properly configured and you have a DNS record for it as the script will use it. otherwise you can edit the variables accordingly

Make the script executable by running chmod +x seafile_debian

Run the script with the command “bash seafile_debian 6.1.4” and wait until it finishes. It will give you all login details and password at the end. I like to wait a couple minutes and I reboot the server afterwards; not sure if it is needed but I’ve had instances in other seafile versions that I couldn’t get it working without rebooting.

You will also need to configure the nginx file as this was giving an error and preventing nginx from starting - I think it has an issue with the ssl keys installed. I solved this by getting a certbot certificate (letsencrypt) and edit the the file at

/etc/nginx/conf.d/seafile.conf

Start nginx and log in.

Then just configure postfix, firewall and fail2ban. I rather use iptables so i just uninstalled the ufw firewall that is installed by the script.

Good luck.

Hello Fred
I have now installed the pro version successful with your tipps:slight_smile:
its interesting to start the script with bash seafile_debian 6.1.4
because the script is named seafile_debian ----without 6.1.4

Next time i try it with the Community version and hope it will work too

many thanks

unfortunately the upload of any file in seafile pro via the WebGiu (Seahub) dont work
breaks up with unknown error

I just test it and works perfectly fine. I’ve tested uploading both a single file and a folder with several files. Everything uploaded correctly without an issue.

Hi,

I used the install script for the PRO install for Debian 9. I have the Let’s Encrypt SSL installed successfully, however I am getting a ccnet-db error when starting ./seafile.sh start

Anybody have any ideas on this error? Thanks in advance.

** Message: seafile-controller.c(1157): loading seafdav config from /opt/seafile/conf/seafdav.conf

[12/04/19 03:49:13] …/common/session.c(139): using config file /opt/seafile/conf/ccnet.conf
[12/04/19 03:49:13] …/common/license.c(406): Loading license file /opt/seafile/seafile-license.txt …
[12/04/19 03:49:13] …/common/license.c(409): License file /opt/seafile/seafile-license.txt does not exist, allow at most 3 trial users
License file /opt/seafile/seafile-license.txt does not exist, allow at most 3 trial users
[12/04/19 03:49:13] …/common/ccnet-db.c(316): Error exec query SELECT COUNT(id) FROM EmailUser WHERE is_active = 1 AND email NOT LIKE ‘%@seafile_group’: mysql_stmt_prepare failed: Table ‘ccnet-db.EmailUser’ doesn’t exist.
[12/04/19 03:49:13] user-mgr.c(104): Failed to get user number from DB.
failed to run “ccnet-server -t”