Comments on How to Install Seafile on Ubuntu 16.04 (Xenial Xerus)
This tutorial shows the installation of Seafile on Ubuntu 16.04. Seafile is a private cloud software, it supports encrypted file libraries to store data securely. To encrypt files in a library, you need to set a password when you create the library. The password won't be stored on Seafile cloud, so even the administrator of the servers cannot view your encrypted data without the password.
15 Comment(s)
Comments
Why the java/jdk dependency? I'm not seeing **any** reason this would be needed. Also, I'd use mariaDB over mysql every day of the week.
Seafile requires Java for Elasticsearch only according to their website. If you don't use Elasticsearch, then you might be able to leave out the jdk dependency.
Honestly, at this time, you guys probably should refrain from posting anything about seafile, seeing as two different groups currently claim ownership over this program, thus making it nearly impossible to know which is the right code. From security to basic stability in the program, you never know whats going on until this dust settles.
According Wikipedia the mayor issue has been solved: https://en.wikipedia.org/wiki/Seafile.
Great work!
But I don't know why "Step 6 - Configure Seafile and Seahub Service Files" doesn't work for me. Ubuntu 16.04. LTS. No errors shown, but seafile/seahub won't start at bootup automatically.
I tried "systemctl enable seafile-service" and "systemctl enable seahub-service" (is this part is missing in the manual?) but that doesn't help.
Starting seafile.sh/seahub.sh manually works fine.
Thank you!
Hi,
I'm writing because I have the same problem of Henrik at "Step 6".
I found the solution of the seafile startup
Modify "seafile.service" in this mode:
-----------------------------------------------------------------------------------
[Unit]
Description=Seafile Server
After=network.target mysql.service
[Service]
Type=oneshot
ExecStart=/home/seafile/seafile-server/seafile.sh start
ExecStop=/home/seafile/seafile-server/seafile.sh stop
RemainAfterExit=yes
User=seafile
Group=seafile
[Install]
WantedBy=multi-user.target
----------------------------------------------------------------------------------
And file "seahub.service" in this mode:
----------------------------------------------------------------------------------
[Unit]
Description=Seafile Hub
After=network.target seafile.service
[Service]
Type=oneshot
ExecStart=/home/seafile/seafile-server/seahub.sh start
ExecStop=/home/seafile/seafile-server/seahub.sh stop
RemainAfterExit=yes
User=seafile
Group=seafile
[Install]
WantedBy=multi-user.target
----------------------------------------------------------------------------
Reboot and enjoy!!
Thats all!!
Merioz's and Henrik's problem is caused by an error in the description.
Description=Seafile HubAfter=network.target seafile.targetis bad, because seafile is a service, not a target. Please correct the line to
After=network.target seafile.service
and the automatic start will work.
Not sure where I messed up.. but at the end when I go to my URL, I got the following:
Welcome to nginx!If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.Commercial support is available at nginx.com.
Thank you for using nginx.
I even tried to tailor this towards mine.. the only thing I am unsure about is the following as I tried using both files, one at a time (not same time)
mysubdomain.my-domain.conf
and
cloud.mydomain.conf
This is missing:
Delete /etc/nginx/sites-enabled/default: rm /etc/nginx/sites-enabled/default
Thanks for the detailed document. I got two issues after following all instructions to install seafile server on Ubuntu 16.04.1 LTS (Xenial Xerus).
Problem one: Default is still showing Nginx.
I have to manully delete the default: rm /etc/nginx/sites-enabled/default
Problem two: Can see the files in browser, but cannot upload any new file.
I have to modify ccnet.conf and seahub_setting.py according to seafile server manual. The following is the two modified files. Hope it helps.
ccnet.conf
[General]
USER_NAME = seafile-server
ID = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NAME = seafile-server
SERVICE_URL = http://192.168.5.6
[Client]
PORT = 13419
[Database]
ENGINE = mysql
HOST = 127.0.0.1
PORT = 3306
USER = seacloud
PASSWD = yourpassword
DB = ccnet_db
CONNECTION_CHARSET = utf8
seahub_setting.py
SECRET_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
#Added according to Server Manual
FILE_SERVER_ROOT = 'http://192.168.5.6/seafhttp'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'seahub_db',
'USER': 'seacloud',
'PASSWORD': 'yourpassword',
'HOST': '127.0.0.1',
'PORT': '3306'
}
}
Dunstan : Your solution didnt work for me :(( i can manual start by command :
systemctl start seafilesystemctl start seahub
but after reboot system seafile and seahub doesnt start automaticly :(
u forgot:
#systemctl enable seahub.service (2017-08-09 16:15:47)Created symlink from /etc/systemd/system/multi-user.target.wants/seahub.service to /lib/systemd/system/seahub.service.# systemctl enable seafile.service (2017-08-09 16:15:54)Created symlink from /etc/systemd/system/multi-user.target.wants/seafile.service to /lib/systemd/system/seafile.service.
This activates the autostart of the service.
I tried everything to get it to work as a service on Ubuntu 16 and could not get it to work. I had it working on CentOS7 fine previously. So I instead made it work work with a cron job and a script.
First create a bash script called start.sh - the start scripts for seafile will not run from a full path so I used the CD command first.
#vi start.sh
cd /home/seafile/seafile-server./seafile.sh start./seahub.sh start
___________
Now create a cron job ....
#crontab -e
*/2 * * * * /home/seafile/start.sh > /dev/null
______________
This runs it every 2 minutes (I know it's quick and dirty, but it works)
You could also use @reboot (should work).
After your netstat --plntu statement you write that seafile will listen on 8002, when it actually listens on 8082, your screenshot shows that to. It also happens to be that way on the standard installation im working through right now.
Thanks for the guide btw <o