Software Requirements + Install-Guide: Ubuntu 18.04

Dear Forum-Members,

I’m trying to setup and clean and tight Ubuntu 18.04 for Seafile Professional Server.
If you want to use this as a Installation Guide read to the bottum and then start from the top.

There are two Manuals for Setting up and I’m trying to get them together:

I don’t want to install unneeded stuff an I’m trying to make sure I get the right stuff since there are many different ways to install packages. Nevertheless instead of opening a discussion for each software uncertainty I find in the manuals, I thought I’d rather open a topic for all. This is what I have written together so far:

Third-Party-Tools / Analyses:
According to the Manual for Ubuntu 16.04 the following is needed:

  • openjdk-8-jre (Java Open JDK 8 is needed for Seafile: What java version should I choose? Upgrade to PRO version - #4 by Nytrm)
  • poppler-utils (PDF rendering library)
  • libpython2.7 (In Ubuntu 18.04 version 3.6 is preinstalled, Python 2.7 has to be installed manually. Seafile is not yet 3.0 compatible: Python 3 support - #11 by rdb)
  • python-pip (python package manager)
  • mysql-server (we need mysql as DB for Seafile)
  • python-setuptools
  • python-pil (Former Imaging has been deprecated in Ubuntu 18.04, use python-pil instead)
  • python-memcache
  • python-mysqldb (Python interface to MySQL)
  • python-setuptools
  • python-ldap (LDAP interface module for Python)
  • python-urllib3 (HTTP library with thread-safe connection pooling for Python)

// not installed so far / unclear / to be claryfied:

  • python-requests (was mentioned in the Manual 14.04 but not in the 16.04 Manual and therefore is unclear if needed) I didn’t install it
  • ffmpeg (was mentioned in the Manual 14.04 but not in the 16.04 Manual and therefore is unclear if needed) I didn’t install it
  • pip install pillow moviepy (Here two packages are to be installed: pillow and moviepy) are they needed and for what?

Other Stuff:
AWS Support:
sudo pip install boto requests (Python interface to Amazon’s Web Services)
// unclear if this is mandatory even if one is not going to use AWS

JAVA Symlink:
sudo ln -sf /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java /usr/bin/
// this doesn’t seem to be needed anymore since, I have /usr/bin/java after installation openjdk-8-jre setup
// the seafile setup-scripts mentions that it found java, not a garantee but a good support

The Java-Diskussion:
I tested different variants, but the way to go is still JRE Version 8 due to elasticseach 2.4.5 in Seafile:

You can go with either the variant from Oracle or OpenJDK. I went with OpenJDK

_OpenJDK variant install:
sudo add-apt-repository universe
sudo apt install openjdk-8-jre

_Oracle variant install:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
update-java-alternatives --list
sudo apt-get install oracle-java8-installer

It still remains unclear if one can go with openjdk-8-jre-headless but I was to lazy to test that.
The Headless install is 275MB less on HDD. It might also use less CPU/RAM and have less attack ground, since it doesn’t have the GUI. But that’s just my theory.

The install command I used:
For Java and some other Package the following is also required before running the installations:
sudo add-apt-repository universe

The actual installation command i use (basicly from manual with some adjustments):
sudo apt-get install openjdk-8-jre poppler-utils libpython2.7 python-pip \
mysql-server python-setuptools python-pil python-mysqldb python-memcache python-ldap \

MYSQL Preparation:
I was not able to login to MySQL as root via seafile-setup (even with sudo mysql_secure_installation done before setup). This Link shows more why is: MySQL Server without Password for Root on Ubuntu Linux Essentially what you need to do before mysql_secure_installation and seafile-setup is this:

Logon to MySQL server by running the commands below:
sudo mysql -u root

Send the following SQL-Commands:
USE mysql;
UPDATE user SET plugin='mysql_native_password' WHERE User='root';

Restart and run the commands below to set a new password:
sudo systemctl restart mysql.service

Run the Secure Installation of MYSQL:
sudo mysql_secure_installation

Answer the questions below by following the guide:
Enter current password for root (enter for none): Just press Enter // I didn’t get this question
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y

Seafile Data-Folder preparation.
If your seafile-data Folder is outside your HomeDir, make sure that the parentfolder has enough permission for the current/installing user. In my case I needed to add permission for my user to the mounted external drive as only root had permission:
sudo chown -cR myuser:mygroup /mymount
as the user has also a group named the same, it was like:
sudo chown -cR tom:tom /data

Run seafile setup:
If you need to or want to the setup as sudo you are doing it wrong. Make sure MySQL-preparations and folder permissions are done a described above, before running the setup, like this:

Maybe this helps others and I hope to get more feedback on the following Item:

  • boto requests
  • python-requests
  • ffmpeg
  • pillow moviepy

With all these steps I was able to setup a working Seafile under Ubuntu 18.04. I used a VM with a lot of snapshots to rewind stuff and to test command easily. I documented everything exactly, to make sure I can setup the real Server later identically. In future I will do maintenance, changes and updates to the VM and then repeat the same commands on the real server if the result on the VM was satisfying. If something happens to the VM I don’t like I go back to the snapshot. Maybe you also find this an interesting point for your project. You can use Oracles Virtual Box as it supports Snapshots and is free. I use VMware Virtual Machine just because I already had it installed but it’s not free.

Kind regards and good luck,

This is my running config. I haven’t tested everything throughoutly, but so far it works. I have done some more steps after these above (certbot and nginx) that I have not documented here yet. I will add these steps as soon as possible.


thank you! Way better than official docs :frowning:
But webdav / seafdav is not working.
Cant Connect via NGINX and SSL