Seafile-server install 'one-liner'

server

#1

‘Shameless plug’-time: I am working on this framework called freckles, which does all sort of configuration-management stuff. Among other things, it has a so-called ‘adapter’ (basically a plug-in) which can setup a new instance of a Seafile server for you, without any of the pain a Seafile install usually brings. Bold claim, I know :slight_smile:

I always was slightly annoyed that Seafile doesn’t provide proper distribution packages, and needs a lot of manual intervention to be installed with all its bells and whistles. I think there’s a Docker package now, but I don’t like to use Docker for use-cases like this, unfortunately. So, if that is you too, you might be interested in the following.

Small caveat: only Debian Stretch is supported for now (Jessie would probably work as well). Extending this to other platforms would be fairly easy, and I’d be super keen to work with anybody who is interested to help me improve this.

Anyway, long story short, here’s what you have to do to setup Seafile on a new (Debian) machine/VM/LXC container (you obviously need ‘curl’ installed, would work with ‘wget’ too though):

bash <(curl https://freckles.io) freckelize -pw true -r frkl:seafile -f blueprint:seafile_mysql -t /var/lib/freckles

I’ve written more about how all this works here: https://freckles.io/blog/example-seafile

Now, you might be reluctant to just copy and paste and execute something like this, and you are right to be. There’s not much I can do to make you trust me enough to do this in the short term, and the freckles project is too new to have any sort of reputation either. I’d suggest using this in a VM, or on a VPS that you can just delete and re-install after you’ve given it a go. Up to you though, obviously :slight_smile:

If you decide to try it out, this will happen:

  • freckles will bootstrap itself, which might take a while (into $HOME/.local/inaugurate – after everything is done you can safely delete that folder if you want – it won’t affect Seafile)
  • the bootstrap script will execute the freckelize command with the options you see above
  • freckelize will ask you a few questions about your setup (email address, domain name, port, whether you want to setup https and request a “Let’s encrypt” certificate – which you should only say true to if your server is publicly available, and DNS is setup to the domain name you provided earlier)
  • MySQL, Seafile and it’s dependencies will be installed and configured, as well as ‘nginx’, a “Let’s encrypt” certificate might be requested (depending on your input earlier), nginx will be configured to use it, and a cron job will be setup that makes sure that the certificate will be renewed before it expires

Once all that is done, you can go to http://domain_name:port, probably:

http://127.0.0.1

Hopefully this opens up the Seafile login page. The username to login is the email address you provided earlier. Password is ‘change_me’, and you should, well, … change it. Now-ish.

Check out the other posts on https://freckles.io or visit the freckles documentation pages if you want to know more about freckles itself, what it is and how it works.

Feedback welcome. Contributions even welcomer.


#2

Really? It’s easiest thing to get running and optimize/customize ever. 100x easier than Nextcloud etc


#3

Fair enough. I guess I was mainly talking about doing it in an automated, reproducible way (which is, I think, something we should all strive to do as soon as a minimum of reliability is required of a service). I’ve written a docker compose thing for Seafile a while back, and that was such a pain to do compared to most of the other software I packaged in the same way, can’t even begin to describe…
Don’t know about Nextcloud, never used that. But even if it is worse, that doesn’t mean installing Seafile is quick and easy.

Even if I’d wanted to do it manually though… In my mind, the gold standard of installing a service is ‘apt install package’ (or yum, or whatever), and that should be it, except for a bit of configuration if you want something out of the ordinary.

For Seafile I have to download the archive, unpack it, manually create a user/group. I have to take care of the init system. File system permissions for the log folder if I want it under /var/log. Configure log rotation. If I use selinux or apparmor I need to do that myself too. Getting webdav running reliably, esp. with a web-server as a reverse proxy.

Updates, too, for those I need to run the mysql migration script manually every time there is a minor version number change (not sure if that’s still the case though). Application data and configuration are more or less in the same folder, configuration files can’t really be under /etc. Granted, that last one has gotten a bit better recently (I mean, the separation of app and config), but still.

Don’t get me wrong, I love Seafile, and have used it for ages. And I can accept that the team doesn’t want or can’t to spend a lot of time on the non-dev-related tasks. I just don’t think it’s a very pleasant experience to get running. After that, all good :slight_smile:


#4

Will this work with the pro version?? If not, do you have a working Professional Version???


#5

Heya,

no, sorry, not at the moment. I’m about to re-visit this, and my plan was to add options for the pro version, as well as the office suites and potential other features.

Might take a while bit though (few weeks I reckon), as I’m currently busy re-working the ‘freckles’ framework itself.

Probably too late for you, but if you subscribe to this topic you’ll get notified when I put updates in here.


#6

Ok thanks for the reply. I’ll give the other installation choices a try.