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.

    • I notice one thing that the seafile doesn't restart after OMV reboot because the path in the script is call seafile-server-latest but the installation directory is named seafile-server-5.1.2.

      Therefore, you need to do this change: mv seafile-server-5.1.2/ seafile-server-latest
      Then reboot the server or perform: service seafile-server restart
      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 wrote:

      I notice one thing that the seafile doesn't restart after OMV reboot because the path in the script is call seafile-server-latest but the installation directory is named seafile-server-5.1.2.

      Therefore, you need to do this change: mv seafile-server-5.1.2/ seafile-server-latest
      Then reboot the server or perform: service seafile-server restart


      Usually the update script creates a link from .../seafile-server-<Version> to seafile-latest. Do not move any directory if you plan to use the seafile update scripts.
      Please check the seafile installation manual even if this mentions an older version it is still correct. If you do not have the link, your initial install or update is bogus.

      This is how it looks after a few updates:

      Source Code

      1. drwx------ 3 seafile users 4096 Mai 26 22:52 ccnet
      2. drwx------ 2 seafile users 4096 Mär 1 19:36 conf
      3. drwxr-xr-x 2 seafile users 4096 Mär 1 19:30 installed
      4. drwxr-xr-x 2 seafile users 4096 Mär 1 21:28 logs
      5. drwxr-xr-x 2 seafile users 4096 Mai 26 22:52 pids
      6. drwxr-xr-x 6 seafile users 4096 Mär 9 17:47 seafile-server-5.0.4
      7. drwxr-xr-x 6 seafile users 4096 Mär 1 03:45 seafile-server-5.0.5
      8. -rw-r--r-- 1 seafile users 22351420 Mär 1 11:10 seafile-server_5.0.5_x86-64.tar.gz
      9. drwxr-xr-x 6 seafile users 4096 Mai 11 06:12 seafile-server-5.1.2
      10. -rw-r--r-- 1 seafile users 21689998 Mai 12 12:28 seafile-server_5.1.2_x86-64.tar.gz
      11. lrwxrwxrwx 1 seafile users 20 Mai 23 10:21 seafile-server-latest -> seafile-server-5.1.2
      12. drwxr-xr-x 4 seafile users 4096 Apr 8 18:34 seahub-data
      Display All
    • Mine didn't create a symbolic link:

      Source Code

      1. root@server:~/seafile# ls -la
      2. total 36
      3. drwxr-xr-x 9 root root 4096 May 31 08:32 .
      4. drwx------ 6 root root 4096 May 31 08:26 ..
      5. drwx------ 3 root root 4096 May 31 08:51 ccnet
      6. drwxr-xr-x 2 root root 4096 May 31 08:51 conf
      7. drwxr-xr-x 2 root root 4096 May 31 08:27 installed
      8. drwxr-xr-x 2 root root 4096 May 31 08:36 logs
      9. drwxr-xr-x 2 root root 4096 May 31 08:53 pids
      10. drwx------ 7 root root 4096 May 31 08:32 seafile-data
      11. drwxrwxr-x 6 500 500 4096 May 29 23:49 seafile-server-5.1.3
      Display All


      Since it didn't create automatically for me, I've to created a symbolic link myself.

      Source Code

      1. ​root@server:~/seafile# ls -la
      2. total 36
      3. drwxr-xr-x 9 root root 4096 May 31 09:13 .
      4. drwx------ 6 root root 4096 May 31 08:26 ..
      5. drwx------ 3 root root 4096 May 31 08:51 ccnet
      6. drwxr-xr-x 2 root root 4096 May 31 08:51 conf
      7. drwxr-xr-x 2 root root 4096 May 31 08:27 installed
      8. drwxr-xr-x 2 root root 4096 May 31 08:36 logs
      9. drwxr-xr-x 2 root root 4096 May 31 08:53 pids
      10. drwx------ 7 root root 4096 May 31 08:32 seafile-data
      11. drwxrwxr-x 6 500 500 4096 May 29 23:49 seafile-server-5.1.3
      12. lrwxrwxrwx 1 root root 21 May 31 09:13 seafile-server-latest -> seafile-server-5.1.3/
      Display All
      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 ().

    • Hi,

      I have a question concerning Part 4, Step 3:
      isn't there supposed to be a

      Source Code

      1. location /media {
      2. root /opt/seafile/seafile/seafile-server-latest/seahub;
      3. }

      section in the nginx extras option? According to the seafile installation manual at manual.seafile.com/deploy/https_with_nginx.html there is one.

      Another thing: I don't know if you are aware of the "official" installation script of seafile at github.com/seafile/seafile-ser…/master/seafile_v5_debian
      It should only be run on a freshly installed machine, but you could certainly grab some hardened configurations out of it. It is rather complex and I certainly don't understand all of its content but I thought it would we worth mentioning this.

      Thanks a lot for all your work, I will be testing this procedure soon!
    • Sorry you're you are having trouble. I'm still updating the guide. My character limit is full in the guide so i had to remove the warning about it being updated.

      I must admit, that is one section of the guide I haven't touched cause its worked since day one. You think I should append your suggestion?

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

    • nasty_vibrations wrote:

      location /media {
      root /opt/seafile/seafile/seafile-server-latest/seahub;
      }


      Yes your server configuration for seafile should include this!

      @tinh_x7:
      1. you should run seafile with a seafile user
      2. Therefore the whole /seafile directory should've the seafile user as owner and group
      --> command would be chown seafile:seafile <seafile_directory>
      3. Please consider the seafile server manual for the upgrade scripts. There is a script for every upgrade step (to be executed with the specific seafile user)!
      --> manual.seafile.com/deploy/upgrade.html
      - There are specific scripts for Major (2.x.x -> 3.x.x), Minor (2.0.x --> 2.1.x) and Maintenance upgrades (2.1.0 --> 2.1.1)
      - You should never have to manually change or add any symbolic links

      So when upgrading, you should
      - extract it with: tar xzf ...
      - update the permissions of the extracted new directory: chown seafile:seafile ....
      - STOP seafile server
      - use the correct upgrade script inside the new directory: e.g. .../seafile-server-5.1.2/upgrade
      --> THIS will update symbolic links you need
      - START seafile server
      OMV 3.x | Banana PI (M1) | | | Seafile Server
      OMV 4.x | ShuttlePC SH55J2
    • baldman wrote:

      sieben, just so i understand that code the "root" means root user yeah?... So should that be changed to the seafile user?... I works as is though :)


      I am not sieben, but: No this is not the root user.

      The code

      Source Code

      1. location /media {
      2. root /opt/seafile/seafile/seafile-server-latest/seahub;
      3. }

      just declares that the directory /opt/seafile/seafile/seafile-server-latest/seahub should be used when the browser requests urls like http://<your server>/media/<something>

      If you change it to seafile, nginx will compain about not beeing able to interpret the configuration.
    • I already installed Seafile as root.
      It's working fine.

      What's the difference to install it as user root vs user seafile ?

      Two features that I see Seafile missing are external storage mounting and an antivirus.
      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 ().

    • you don't have to "install" it again...
      change the permissions, change your init-script, and that's it. And if you start it manually with the seafile-start script, just use the seafile user and not root.

      The difference is the fundamental thought of security in your system, that nothing should run with root privileges, which doesn't have to.

      Do you mean to have a second/third/... external storage?
      OMV 3.x | Banana PI (M1) | | | Seafile Server
      OMV 4.x | ShuttlePC SH55J2
    • Maybe I re-install it again.
      OwnCloud and Pydio have the feature that let you mount local storage to use your existing data.
      Don't know why the dev of Seafile not implement this feature for users.
      Some users say you can symbolic link the existing data drive to /seafile-data as a work around.
      But no luck for me.
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10
    • I think I found the external storage guide, not sure if this work on the community edition.
      manual.seafile.com/deploy_pro/seaf_import.html



      Source Code

      1. Import Directory To Seafile
      2. Since seafile 5.1.3 pro edition, we support importing a local directory on the server to seafile.
      3. It's a handy tool for the system admin to import files from existing file servers (NFS, Samba etc.).
      4. To import a directory, use the seaf-import.sh script in seafile-server-latest directory.
      5. usage :
      6. seaf-import.sh
      7. -p <import dir path, must set>
      8. -n <repo name, must set>
      9. -u <repo owner, must set>
      10. The specified directory will be imported into Seafile as a library. You can set the name and owner of the imported library.
      11. Run ./seaf-import.sh -p <dir you want to import> -n <repo name> -u <repo owner>,
      12. Login to seafile server with the specified library owner, you will find a new library with the specified name.
      13. +
      Display All
      OMV v3.0
      Asus Z97-A/3.1; i3-4370
      32GB RAM Corsair Vengeance Pro
      4x3TB RAID10
    • tinh_x7 wrote:

      Maybe I re-install it again.
      OwnCloud and Pydio have the feature that let you mount local storage to use your existing data.
      Don't know why the dev of Seafile not implement this feature for users.
      Some users say you can symbolic link the existing data drive to /seafile-data as a work around.
      But no luck for me.


      Hi @tinh_x7 Seafile uses a completely different aproach in storing files than owncloud. It stores files in an internal format only.
      If you wish to share existing data you have to create a library and import your data into it. This results in double storage requirements and does not have a sync feature.
      You can install the seafile cli client to synchronize an existing directory with a seafile library.

      The seafile-import feature you mentioned is a pro feature (payed version), but can easyly be simulated using an client or the API.