Seafile Installation

    • Offizieller Beitrag

    Probably ought to name that repo a little better now since it's not just btsync.


    It is just "sync" in OMV 3.x. There is no btsync plugin for OMV 3.x either.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • That was it.... Thanks! Looks like it's working just fine. I'm gonna test this a couple of days in VM, then install it on my NAS, as I can get some use out of this.


    It's really not difficult at all to install... the instructions you wrote are solid (when followed :))


    Cheers KM0201, I'm glad you got it sorted ... Now if I could just get this startup script for part 3 working I might be able to update the Guide to another "solid" installation..lol :)


    At least for now I can update the MySQL part of the guide to be simpler :)


  • @baldmanHere it is: You are running the seafile install script as root, which creates all the files with owner root.


    Execute this scipt as user seafile and you are done.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Can you guys tell me the differences between Seafile and Syncthing???


    • The main difference is:
    • Seafile is a client - server system doing it's file transfer via http(s), no peer to peer transport like syncthing.
    • Seafile does allow to share "Libraries", directories or files with other seafile users (has it's own user management)
    • Seafile allows to shre Files with anonymous users providing up- / download links possibly password protected.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Zoki, you said earlier "If you give the seafile user an no login shell, you have to use the -s parameter of su to continue with the install as seafile (or call sudo all the time)" I'm not sure what you are saying here?


    If I installed seafile with just this ./setup-seafile-mysql.sh it installs with errors and missing files and wont start up manually. If I use sudo it asks for the seafile user password which doesn't exist. If I use su it installs as root with no errors. Forgive me I'm not a Linux wiz but I'm good with coping & pasting and trial & erroring...lol

    • Offizieller Beitrag


    Cheers KM0201, I'm glad you got it sorted ... Now if I could just get this startup script for part 3 working I might be able to update the Guide to another "solid" installation..lol :)


    At least for now I can update the MySQL part of the guide to be simpler :)


    What's wrong with the script in part 3? It works fine.


    Sent from my Nexus 6 using Tapatalk

  • I just got the install to work successfully using the new seafile user. I had to give the seafile user & group write permissions to the Seafile-Data directory in OMV. Is there away we can do this when creating the user?

  • I've got part 3 working too now so its all good.


    I created the new seafile user with help from Zoki using this cmd: useradd -m -d /opt/seafile -c "Seafile Service Account" -s /usr/sbin/nologin -r seafile
    Then before I continued the install I did this: su -s /bin/bash seafile
    Is there a way add the seafile user/group permissions to the seafile-data directory during the user creation above or will I need a separate command line?

    • Offizieller Beitrag

    Hmm.. not sure on that... As with most things, there's more than one way to skin a cat.. Here's how I did it


    1. Create the user and group "seafile" in the webUI.. make sure the user has shell access in in the options at the bottom (/bin/bash) and you make it a member of the group you created.
    2. SSH as root.
    3. mkdir /home/seafile
    4. chown -R seafile:seafile /home/seafile
    5. su seafile (to log in as the seafile user)
    6. cd /home/seafile
    7. Follow you're instructions starting at "wget" to download the .tar file. (This is where it might get confusing for some users... as if they follow your tutorial.. they'll have to change to root, install the php, etc. stuff.. then go back to being user seafile, to complete the seafile installation... maybe putting the install stuff for php, at the beginning of the tutorial?)
    8. After php installs, log back in as user seafile in the shell and run all the commands for installing seafile as the user "seafile"
    9. Start the services seafile and seahub as user "seafile"
    10. Follow your instructions for creating the script. Since at that point in the instructions you've not setup SSL yet, all you have to do is change the "user" to seafile, and then set the install path for whatever path you chose.



    (the startup script above currently has SSL running, which is the only difference)

  • It alright, I just realized you cant do it during user creation because everybody's Seafile-Data directory location is different... I knew this...lol


    I'm good to go now on updating the Guide, I'll do it ASAP :)

    • Offizieller Beitrag

    Ah, you meant the database directory... I honestly didn't change anything on that. I assume when you run the service as the user seafile, it automatically has read-write access..



    Code
    root@omv-test:~# cd /media/30c8f67a-dc7a-4ba9-8dac-4b6f2b7dbec7/
    root@omv-test:/media/30c8f67a-dc7a-4ba9-8dac-4b6f2b7dbec7# ls -l
    total 28
    -rw-------  1 root    root  6144 Jun  2 10:40 aquota.group
    -rw-------  1 root    root  7168 Jun  2 10:40 aquota.user
    drwxrwsr-x  7 mysql   mysql 4096 Jun  2 10:41 MySQL-Data
    drwxrwsr-x  3 root    users 4096 Jun  2 06:07 Seafile-Data
    root@omv-test:/media/30c8f67a-dc7a-4ba9-8dac-4b6f2b7dbec7#


    I'm assuming "user" got access when the database was created as a user? I didn't do that manually, that I know.

  • I've got part 3 working too now so its all good.


    I created the new seafile user with help from Zoki using this cmd: useradd -m -d /opt/seafile -c "Seafile Service Account" -s /usr/sbin/nologin -r seafile
    Then before I continued the install I did this: su -s /bin/bash seafile
    Is there a way add the seafile user/group permissions to the seafile-data directory during the user creation above or will I need a separate command line?


    Maybe it will work, if we do not create a new group "seafile" for the user seafile, but add him to the group users.
    Another thing to think about is that if someone is using user homes in OMV the home direcory might end up on a OMV managed share, which does not allow to execute code.


    Can you try this command to create the user:

    Code
    useradd -m -d /opt/seafile -c "Seafile Service Account" -s /usr/sbin/nologin -r -g users seafile


    The flag are:

    • -m: create home folder
    • -d /opt/seafile: the home folder should be /opt/seafile
    • -c "...": the description of the user seafile
    • -s /usr/sbin/nologin: do not allow the user seafile to log in
    • -r: make seafile a system user
    • -g users: make seafile a member of group users.


    If you do some chown later on, you would have to use chown seafile:users


    another option to solve the permission issue would be to do a

    Code
    chown -R seafile /media/<UID>/seafile/data


    @baldmanHow dows the new seafile installation store the location of the seafile-data folder. If you can tell me if it is a symlink in the home or the seafile.ini file in folder ccnet, i can give you the command to do the chown thing without having to enter the seafile-data location manually. It is eigther

    Code
    chown -R seafile $(cat ~seafile/ccnet/seafile.ini)


    or

    Code
    chown -R seafile $(readlink -f ~seafile/seafile-data)


    @KM0201 You do not have to change the permissions of the MySQL-Data directory. seafile will not write to this, but the mysql database user will. Seafile will only talk to the database process wich in turn writes to disk.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

    2 Mal editiert, zuletzt von Zoki ()

  • Zoki, I've already gone ahead and updated the guide. If you look there you will see what I've done. Its probably fine the way I've done it but if you think there's a way around it i'm happy to give it a go. Perhaps I shouldn't have updated the guide yet =O

  • Zoki, I've already gone ahead and updated the guide. If you look there you will see what I've done. Its probably fine the way I've done it but if you think there's a way around it i'm happy to give it a go. Perhaps I shouldn't have updated the guide yet =O


    Hi @baldman,

    the guide is really nice and the writing is better than I could do it.

    I looked through it and there are some things which I would like to add:

    • In part one, step 3 you are using ACLs to allow the user seafile to write to the share seafile-data. As I understand more experienced users than I reccomend not to use ACLs. If you make the seafile user part of the group users it will work without ACLs.
    • In part one, step 5 formatting got messed up with the color. Don't you think, putting the text into one code block would make it more readable?
    • In part two, step 1 you download the 64-bit version of seafile. This should be ok for most users, but please take a note, that if you have a 32-bit installation, you need to download the 32-bit version of seafile. Maybe you place an note, that one should take the most recent version of seafile when installing.
    • In part two, step 2 you are creatin an additional directory seafile, which is not necessary. The code should read

      Code
      tar -xzf seafile-server_*
      mkdir installed
      mv seafile-server_* installed


      Again, put this into one code block for cut and paste.

    • In part two, step 5 there is no need to start a new terminal session. This should be enough

      Code
      ./seafile.sh start
      ./seahub.sh start


    • In part two, step 6 the init script is empty.
    • In part two, step 4, reboot is optional and not required to continue.
    • In part 4, step 6 you can use this command to modify the fastcgi-setting without editor (just cut and paste)

      Code
      replace "fastcgi=false" "fastcgi=true"  -- /etc/init.d/seafile-server


    • In part 4, step 9 SERVICE_URL has https:// twice

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

    • Offizieller Beitrag

    I followed the new instructions to the letter on a new VM


    Only hiccup I ran into, is Part 1, step 5... creating the root password with the commands. At the very end, you've got "exit;" I kept getting syntax errors when I used that... "exit" worked just fine and exited me properly. Everything else was as written.


    WAY BETTER on the database creation and creation of the mysql user. The other way I think, while it worked, was unnecessarily complex.


    The Service URL, had https:// twice in the previous instructions as well... it works as the guide is written.. but not sure if having two https:// is necessary or not.


    As for the code blocks.. I prefer it the way it's written... If you start putting a bunch of stuff in a single code block, you're going to get new users who not familiar w/ command line, copy/pasting the whole code box at the same time, resulting in errors.



    Good job!

  • Zoki, Thanks for the tips... nice :) ... I'll reference your numbers in my response.


    1. That's what i was trying to do last night. You want me to try this with your code? useradd -m -d /opt/seafile -c "Seafile Service Account" -s /usr/sbin/nologin -r -g users seafile (done)
    2. I made the color red there so people take note that the password needs changing before copying & pasting. The forum keeps telling me that im at my character limit but ill try to be more descriptive.
    3. Thanks for the reminder, I was going to add the 32bit option :)(character limit reached, added link)
    4. Thanks for the conformation. I've been wondering myself why its like that. I copied that from somewhere else i think! (Done
    5. Some people make mistakes and reboot or close the terminal. I assume if they open a new terminal they would need to start seafile as the seafile user?.... I need to be more descriptive.
    6. Whats empty?... The spoiler or the actual file? Maybe i need to put in the instructions to su first? (this works without su)
    7. If you mean part 4 then reboot is to test seafile is starting up before continuing to the next step. I can add an optional tag there but i think its good to reboot and check :)
    8. Great thanks. I never stop learning :) (done)
    9. Typo Sorry. Im at my character limit so lots of coping and pasting and refreshing. (done)


    I think line by line copying is the way to go. Some people will copy the whole box and wonder whats wrong. Maybe i'll make downloadable text or pdf file for advanced users :)



    KM0201, sorry.. that's another typo. Its supposed to just say exit not exit;.... Ill fix

    • Offizieller Beitrag

    I agree w/ you on the reboot... at least there if it's not working... you can start trouble shooting it, before messing w/ SSL, etc (maybe put a caveat there to reboot and test?, since that is really the only reason to reboot, is to test the startup script). That's how I done it anyway when I was working on getting it working as a user.


    I see now why you put the installation directory under /opt instead of /home... I never thought about that interfering w/ OMV Home's (which are on the data drives)...

  • I got seafile working thanks to your instructions. Now, I have version 5.0.4 running and the latest version seems to be 5.1.3.


    When I try to run the upgrade script, I get the following error:

    Code
    [ERROR] Error:
     ccnet is using MySQL
     seafile is using SQLite3
     seahub is using MySQL
    
    
    Failed to upgrade your database


    Any ideas?


    ETA: Ok I fixed it by following the steps here (for the seafile db only): http://manual.seafile.com/depl…from_sqlite_to_mysql.html
    For some reason, the seafile.conf file was not pointing to the mysql server after the installation. You guys might want to check your installation. The upgrade went well after that.


    ETA2: Well, nope... The upgrade went well, but the new version gives an "Unhandled exception" message. So rolling back to 5.0.4 then...

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!