This installer script offers a quick and easy way to set up the Seafile Server Community Edition on a Debian Jessie (64bit), using MariaDB, Memcached and NGINX as a Reverse Proxy in under 5 minutes. We're also adding an init script that starts Seafile when starting the server.
Installing the Seafile Server Community Edition on a Debian Jessie (64bit) in a standard and more secure manner then the out of the box setup scripts offer. Instead of SQLite we're using MariaDB and instead of Gunicorn we're using NGINX.
There are just too many ways to misconfigure a manual Seafile server installation. We've notices that many people don't realize that the default installation is unsecure. In other cases people get stuck during the installation or forget a step like changing "FILE_SERVER_ROOT" or use IP addresses instead of resolvable DNS names. This script is derived from our reference installation for Seafile Server Professional. It helps us to standardize the installation procedure and helps with identifying debugging errors easier.
The installation time will vary depending on your internet connection speed and hardware. On our SSD-based servers we were able to install a production-ready Seafile server in roughly 5 minutes.
It's meant to run on a Debian Jessie minimal installation. No desktop environment or other weird stuff like hosting panels (Plesk, ISPConfig, etc.)...
- Newest Seafile Server Community Edition
- NGINX
- MariaDB
- Memcached
- HTTPS-Proxy on port 443
- Forced redirect from unenrypted port 80 to port 443
- Seahub with FastCGI
- SeafDAV with FastCGI
- Memcached
- Seafile autostart
- Update and upgrade Debian
- Install NGINX from http://nginx.org/packages/mainline/debian/
- Create Seafile init script and add it to systemd startup
- Create unprivilieged system user "seafile" with home directory "/opt/seafile"
- Download and extract latest Seafile server sources from https://download.seafile.com.de/seafile-server_latest_x86-64.tar.gz
- Create "seafile" database user and Seafile databases (DB-Credentials in ~/.my.cnf)
- Initialize various Seafile files
- Enable SeafDAV, Memcached and MariaDB
- Setup Seafile to listen to IP (hostname -i) instead of DNS (Switch this to DNS before live deployment)
- Create Seafile admin with individual password
- Display setup infos and what to do next.
cd /tmp wget --no-check-certificate https://raw.githubusercontent.com/alexanderjackson/seafile-server-community_debian-jessie-amd64/master/seafile-server-community_debian-jessie-amd64 time bash seafile-server-community_debian-jessie-amd64
Never run the script on a production server. It's more or less a one trick pony and can seriously damage productions systems. So run it only one time and delete it afterwards. As a precaution I have added a few simple checks to abort installation if the unprivileged Seafile user or Seafile installation directory pre-exist:
- Check if you're running this acript as root. If not, abort.
- Check if the user "seafile" exists. If yes, abort.
- Check if the directory "/opt/seafile" exists. If yes, abort.
You will have to handle Seafile updates/upgrades manually after the initial installation. Consult http://manual.seafile.com/deploy/upgrade.html on how to upgrade Seafile.
- Delete installer script. You wont need it anymore and might even seriously damage your system if you ran it again.
- Follow the suggested steps at the end of the installation to finalize your Seafile server installation. As a bare minimum you most definitely will want to change the listening IP to a valid DNS name. Run "seafile-server-change-address" as root to change the DNS name...
- Install a firewall. TCP-Port 443 needs to be accessible. Optionally you can open TCP-Port 80 which redirects to HTTPS
Contact me at [email protected] or create an Issue on Github.