How to install Seafile with MySQL and SSL

    • OMV 2.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • You don't need a password, as there is no password for this user.
      So you cannot sign in with this user via ssh for example.

      If you're connected/signed in as root, just execute this command
      su - seafile -s /bin/bash

      And you are signed in as seafile-user
      OMV 3.x | Banana PI (M1) | | | Seafile Server
      OMV 4.x | ShuttlePC SH55J2

      The post was edited 1 time, last by sieben ().

    • I got error: 502 Bad Gateway after boot up.
      It only work with port 8000 if I restart .sh.


      Source Code

      1. /opt/seafile$ ls -la
      2. total 52
      3. drwxr-xr-x 9 seafile users 4096 Jun 3 18:41 .
      4. drwxr-xr-x 5 root root 4096 Jun 3 18:07 ..
      5. -rw------- 1 seafile users 343 Jun 3 18:41 .bash_history
      6. -rw-r--r-- 1 seafile users 220 Sep 25 2014 .bash_logout
      7. -rw-r--r-- 1 seafile users 3392 Sep 25 2014 .bashrc
      8. drwx------ 3 seafile users 4096 Jun 3 20:18 ccnet
      9. drwx------ 2 seafile users 4096 Jun 3 18:51 conf
      10. drwxr-xr-x 2 seafile users 4096 Jun 3 18:33 installed
      11. drwxr-xr-x 2 seafile users 4096 Jun 3 18:44 logs
      12. drwxr-xr-x 2 seafile users 4096 Jun 3 20:18 pids
      13. -rw-r--r-- 1 seafile users 675 Sep 25 2014 .profile
      14. drwxr-xr-x 6 seafile users 4096 May 29 23:49 seafile-server-5.1.3
      15. lrwxrwxrwx 1 seafile users 20 Jun 3 18:36 seafile-server-latest -> seafile-server-5.1.3
      16. drwxr-xr-x 3 seafile users 4096 Jun 3 18:36 seahub-data
      Display All


      Source Code

      1. ​ls -la /etc/init.d/seafile-server
      2. -rwxr-xr-x 1 root root 1860 Jun 3 18:55 /etc/init.d/seafile-server
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 4 times, last by tinh_x7 ().

    • @tinh_x7 We need more information to be able to help...
      What is the output of ​netstat -tulpen after you started nginx server and seafile server?
      And what do the seafile logs tell you?

      @baldman:
      In the very last part Step 7. There is no need to reboot the system.
      Simply test nginx config and restart the service (as I am not using the nginx plugin: I'd guess that the service is restarted after you save your new settings in the plugin anyway)

      nginx -t
      ​service nginx restart
      OMV 3.x | Banana PI (M1) | | | Seafile Server
      OMV 4.x | ShuttlePC SH55J2
    • I"m looking at the netstat, my SSL ports and port 8000 are not started on startup.
      After I ran it, I still can't access my port 7443.



      Source Code

      1. tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 114 1769312 3720/mysqld
      2. tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 116 1766247 4060/redis-server
      3. tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 65534 1765853 3159/memcached
      4. tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 0 18221 2781/smbd
      5. tcp6 0 0 :::111 :::* LISTEN 0 14763 2372/rpcbind
      6. tcp6 0 0 :::80 :::* LISTEN 0 1769694 3135/nginx
      7. tcp6 0 0 :::81 :::* LISTEN 0 1769698 3135/nginx
      8. tcp6 0 0 :::7443 :::* LISTEN 0 1769697 3135/nginx
      9. udp 0 0 127.0.0.1:11211 0.0.0.0:* 65534 1765855 3159/memcached
      10. tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN 0 1784336 7988/seaf-server
      11. tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 0 1784445 8073/python2.7
      Display All
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 3 times, last by tinh_x7 ().

    • My ipv6 is disabled in the OMV & in router.
      I try again with the installation, when I signed in as seafile in SSH and download the package, it's said permission denied.
      @ Part 2.

      Source Code

      1. seafile@server:/$ wget https://bintray.com/artifact/download/seafile-org/seafile/seafile-server_5.1.3_x86-64.tar.gz
      2. --2016-06-04 10:14:25-- https://bintray.com/artifact/download/seafile-org/seafile/seafile-server_5.1.3_x86-64.tar.gz
      3. Resolving bintray.com (bintray.com)... 75.126.118.184, 108.168.194.93
      4. Connecting to bintray.com (bintray.com)|75.126.118.184|:443... connected.
      5. HTTP request sent, awaiting response... 302 Found
      6. Location: https://dl.bintray.com/seafile-org/seafile/seafile-server_5.1.3_x86-64.tar.gz [following]
      7. --2016-06-04 10:14:25-- https://dl.bintray.com/seafile-org/seafile/seafile-server_5.1.3_x86-64.tar.gz
      8. Resolving dl.bintray.com (dl.bintray.com)... 75.126.118.188, 108.168.243.150
      9. Connecting to dl.bintray.com (dl.bintray.com)|75.126.118.188|:443... connected.
      10. HTTP request sent, awaiting response... 302
      11. Location: https://akamai.bintray.com/b4/b4b4be62592a6720d2db333c9a27592d5d142380354e352956779ad259f0ad3e?__gda__=exp=1465050386~hmac=45f93ce53706ed8e3f33fffa07775c7409757c743b0d20ff2d0d30115ba3b37f&response-content-disposition=attachment%3Bfilename%3D%22seafile-server_5.1.3_x86-64.tar.gz%22&response-content-type=application%2Foctet-stream [following]
      12. --2016-06-04 10:14:26-- https://akamai.bintray.com/b4/b4b4be62592a6720d2db333c9a27592d5d142380354e352956779ad259f0ad3e?__gda__=exp=1465050386~hmac=45f93ce53706ed8e3f33fffa07775c7409757c743b0d20ff2d0d30115ba3b37f&response-content-disposition=attachment%3Bfilename%3D%22seafile-server_5.1.3_x86-64.tar.gz%22&response-content-type=application%2Foctet-stream
      13. Resolving akamai.bintray.com (akamai.bintray.com)... 104.98.112.72
      14. Connecting to akamai.bintray.com (akamai.bintray.com)|104.98.112.72|:443... connected.
      15. HTTP request sent, awaiting response... 200 OK
      16. Length: 21693528 (21M) [application/octet-stream]
      17. seafile-server_5.1.3_x86-64.tar.gz: Permission denied
      18. Cannot write to `seafile-server_5.1.3_x86-64.tar.gz' (Permission denied).
      Display All
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10
    • Then the seafile user doesn't have sufficient permission in the current directory.
      You are in the root "/" directory --> no permissions for seafile user.

      You should install seafile either to the home directory of seafile /home/seafile/
      or like the tutorial says:
      in /opt/seafile (create this directory with root and give seafile-user the permissions)
      OMV 3.x | Banana PI (M1) | | | Seafile Server
      OMV 4.x | ShuttlePC SH55J2
    • sieben wrote:

      Then the seafile user doesn't have sufficient permission in the current directory.
      You are in the root "/" directory --> no permissions for seafile user.

      You should install seafile either to the home directory of seafile /home/seafile/
      or like the tutorial says:
      in /opt/seafile (create this directory with root and give seafile-user the permissions)


      If you follow the tutorial seafile will get /opt/seafile as home directory.

      you can use

      Source Code

      1. cd ~seafile
      to go to the seafle home directory.
    • is -rwxr-xr-x 1 root root 1860 Jun 3 18:55 /etc/init.d/seafile-server suppose to be root:root or seafile:users?
      My SSL ports are working for OwnCloud/Pydio, but not on Seafile.


      Source Code

      1. ​Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
      2. tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 0 18451 -
      3. tcp 0 0 0.0.0.0:32400 0.0.0.0:* LISTEN 113 1775623 -
      4. tcp 0 0 127.0.0.1:32401 0.0.0.0:* LISTEN 113 1775624 -
      5. tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN 0 1781704 -
      6. tcp 0 0 0.0.0.0:1556 0.0.0.0:* LISTEN 113 1773684 -
      7. tcp 0 0 0.0.0.0:32469 0.0.0.0:* LISTEN 113 1773691 -
      8. tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 1770805 -
      9. tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 1770456 -
      10. tcp 0 0 127.0.0.1:2812 0.0.0.0:* LISTEN 0 1773912 -
      11. tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 0 16249 -
      12. tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 0 1780896 -
      13. tcp 0 0 0.0.0.0:54945 0.0.0.0:* LISTEN 108 18480 -
      14. tcp 0 0 127.0.0.1:3493 0.0.0.0:* LISTEN 0 1766999 -
      15. tcp 0 0 127.0.0.1:45735 0.0.0.0:* LISTEN 113 1773666 -
      16. tcp 0 0 0.0.0.0:4200 0.0.0.0:* LISTEN 0 19622 -
      17. tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 114 1767015 -
      18. tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 116 1770699 -
      19. tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 65534 1766871 -
      20. tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 0 16251 -
      21. tcp6 0 0 :::111 :::* LISTEN 0 18458 -
      22. tcp6 0 0 :::80 :::* LISTEN 0 1785065 -
      23. tcp6 0 0 :::7443 :::* LISTEN 0 1785069 -
      24. tcp6 0 0 :::22 :::* LISTEN 0 1770807 -
      25. tcp6 0 0 ::1:25 :::* LISTEN 0 1770458 -
      26. tcp6 0 0 :::443 :::* LISTEN 0 1785067 -
      27. tcp6 0 0 :::4443 :::* LISTEN 0 1785066 -
      28. tcp6 0 0 :::445 :::* LISTEN 0 16245 -
      29. tcp6 0 0 :::5443 :::* LISTEN 0 1785068 -
      Display All
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 2 times, last by tinh_x7 ().

    • I just want to add this to the tutorial>>
      Reset admin password through email or you can reset it from the server, if applicable, with this: /seafile/seafile-server-latest/ ./reset-admin.sh

      1. Go to: nano /opt/seafile/conf/seahub_settings.py

      2. Add the following (Change the appropriate settings accordingly):

      For Gmail, try port 465.

      For Yahoo:


      Source Code

      1. # Email Sending
      2. EMAIL_USE_TLS = True
      3. EMAIL_HOST = 'smtp.mail.yahoo.com'
      4. EMAIL_HOST_USER = 'abc@yahoo.com'
      5. EMAIL_HOST_PASSWORD = 'xyz!'
      6. EMAIL_PORT = 587
      7. DEFAULT_FROM_EMAIL = 'abc@yahoo.com'
      8. SERVER_EMAIL = 'abc@yahoo.com''
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10

      The post was edited 2 times, last by tinh_x7 ().

    • sea file with mysql and ssl

      Hi Baldman,

      May i please kindly ask for your help...

      I installed omv-erasmus on an odroid c2 (the specs says 64 bit).
      I was able to install pydio through the kind help of tinh_x7...

      I wanted to try sea file also, and thus tried to follow your guide...

      however...my MYSQL plug in does not show a data directory drop down menu....(as shown on my attachment)

      i went on with the guide though... when i reached the step..

      - Hit enter to finish the Seafile installation


      i get this error message on the terminal

      Press ENTER to continue, or Ctrl-C to abort

      ---------------------------------

      Generating ccnet configuration ...

      Traceback (most recent call last):

      File "setup-seafile-mysql.py", line 1438, in <module>

      main()

      File "setup-seafile-mysql.py", line 1391, in main

      ccnet_config.generate()

      File "setup-seafile-mysql.py", line 787, in generate

      if Utils.run_argv(argv, env=env_mgr.get_binary_env()) != 0:

      File "setup-seafile-mysql.py", line 84, in run_argv

      env=env)

      File "/usr/lib/python2.7/subprocess.py", line 710, in __init__

      errread, errwrite)

      File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child

      raise child_exception

      OSError: [Errno 8] Exec format error

      seafile@openmediavault:~/seafile-server-5.1.3$



      what do I do now... i tried to google the error errno 8 and they seem to say there is no shebang line on the python script... i don't even know what a shebang line is, more so how to fiddle with the script...

      thanks very much for your time and assistance...please bear with me as i am not an IT person...
      Images
      • Screen Shot 2016-07-05 at 7.01.44 AM.png

        52.26 kB, 1,153×473, viewed 101 times

      The post was edited 1 time, last by imcv ().

    • Thank you Zoki,

      i tried to install the raspberry pi ISO on the odroid c2 running on erasmus... and it failed too.

      The installation worked though if i use the raspberry pi ISO on an older Odroid C1 running on Kralizec (wheezy)... and thanks to people like you, get to learn something new everyday..

      the only problem is, i can't seem to upload files on the seafile server... there is no settings menu on the admin page as shown on the tutorial... attached is an image of my web admin interface....


      also using this command....nano /opt/seafile/conf/seahub_settings.py
      from the tutorial shows an empty file...

      i hope you can help figure out how to upload files, thanks again very much...
      Images
      • Screen Shot 2016-07-07 at 8.56.35 AM.png

        66.86 kB, 1,036×367, viewed 86 times

      The post was edited 1 time, last by imcv ().