Seafile Server in Docker is ready for testing on Windows 10!

I’ve got the same error:

main : Unable to find type [CommandNotFoundException].
At C:\seafile\launcher.ps1:602 char:1

  • main @args
  •   + CategoryInfo          : InvalidOperation: (CommandNotFoundException:TypeName) [main], RuntimeException
      + FullyQualifiedErrorId : TypeNotFound,main

ok,

It has been a while (5+ years ago) since I seriously coded in PowerShell :wink:

I am running on Windows 10 Pro with Hyper-V installed. It is the version of windows that has Linux subsystem beta and this subsystem is installed.

If developer’s would always follow one golden rule: “never ever eat exceptions” and when you do leave a note promising that error has been reported already :slight_smile:

The problem is in this function in “launcher.ps1”:

function program_exists($exe) {
    try {
        Get-Command "$exe" -CommandType Application 2>&1>$null
    } catch [CommandNotFoundException] {
    }
    return $?
}

It hides reason for the error. If fixed to look:

function program_exists($exe) {
    Get-Command "$exe" -CommandType Application 2>&1>$null
    return $?
}

It properly reports an error message:

PS C:\seafile> .\launcher.ps1 bootstrap
Get-Command : The term 'git.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At C:\seafile\launcher.ps1:152 char:9
+         Get-Command "$exe" -CommandType Application 2>&1>$null
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (git.exe:String) [Get-Command], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

So, if you installed GIT for windows to the default location and don’t want to put it into the path, then execute this line before running launcher script from PowerShell command prompt:

$env:Path += ";C:\Program Files\Git\bin"

That’s it.

Удачи!

I have to say that Docker on Windows solution makes no sense.

Docker requires Hyper-V. ok. If I have Hyper-V, then why would I suffer learning Docker if I can simply install Linux VM and put Seafile on it? Or I can take a Hyper-V image for current FreeBSD release and install Seafile port. Close to zero effort.

With Docker besides issues already mentioned, there is a good chance to run into file permissions issues (I run into and had to rebuild container; granted I moved it from C: to A:).

Docker seems to have a well known issue with accessibility of its container’s IP addresses to rest of the home network. I run into this one and decided to give up. It is just not worth it to jump through many hoops. Yes, I could try to mess with Docker Hyper-V network bridge configuration, but I will not…

Native Windows port is always behind. Add to this various restrictions on Python to install and VM on Hyper-V, VirtualBox or VMware is looking better and better.

So, I think the best solution for windows is to use a virtual machine. Seafile shall not worry about anything else.

my 2c.

A heck of a lot more people have Windows experience and zero unix experience. And I would guess very little interest in running a unix virtual machine on top of their existing environment in order to run seafile.

I’m in the middle, with some unix experience going all the way back to DEC Ultrix and even the original Apple unix (A/UX), and plenty of Mac OS X experience, plus some ongoing experience with Redhat and I personally still greatly prefer to have Seafile under Windows.

In my case my “server” is also incapable of running HyperV since the chipset doesn’t support SLAT, so even if I wanted the overhead of being a unix admin I couldn’t run it on my Windows 10 “server”. And the Docker version has the same limitation.

Docker might work for some people on Windows and that’s great for them, though no one seems to have posted about their successes despite over 8000 people having read this thread which is a bit odd.

2 Likes

Your guess is wrong. Linux subsystem in Windows 10 has not enough capabilities to run linux containers. Docker on windows uses hyper-v vm with linux internally.

2 Likes

PS, looks like the Windows Subsystem for Linux might be an option for those with a Windows box and a reasonable amount of Linux expertise:

2 Likes

The irony is so in your face that it’s too much.
You’re the one trying to push a platform (windows) that the devs clearly don’t feel like supporting. That’s the whole point of this conversation

I’m well aware their support for Windows has been poor the last year or so, but Danial has said they will be updating it so I live in hope…

1 Like

It would be fantastic for those of us on a current Windows Server edition (2016) to get updated native Windows support. Most of us server admins have a heavily invested in ecosystem - it’s not like a hobbist who can just pick up and move over to Linux at any time.

1 Like

Folks, I love Seafile, enough that I would recommend it to small businesses in my city if any of them actually had Linux admins on staff (I know of none that do so that is a moot point).

With the Windows version not having been updated in a ridiculously long time I’m also getting pretty nervous about continuing to use it myself.

This is not a reflection on the developers. I really appreciate that they made Seafile available for Windows and supported it properly for a number of years, but also understand they aren’t interested in putting much (if any) time into something they aren’t directly earning $ from these days.

Are there any reasonable alternatives for Windows based environments?

Alternatively has anyone actually managed to get it working well enough under Windows 10 inside a Docker container without HyperV installed that they would recommend it’s use still? (I’ve not seen any replies on the list that confirm this actually works yet).

1 Like

Hi folks.

I now have a test PC with Windows 10 to start testing the docker version of Seafile on, but the instructions are not docker-noob friendly and result in a container that starts and then immediately exits.

Can anyone tell me how you access setting the configuration for seafile container once you’ve reached the following point?

My aim is to build a seafile installation that stores the files and data outside the container on a user defined path (likely C:\seafile or D:\seafile), uses a custom port (not 80/443 so it suits hosting a website on the same server), uses a LetsEnctypt cert, and redirects HTTP to HTTPS

Assuming I get this working I’ll document and make the steps available with pretty screenshots for the next person interested in doing some testing :slight_smile:

Cheers,
Mark

Hi folks.

The Windows instructions are out of date and incorrect but I’ve managed to get my 6.2.5 test environment tantalisingly close to a working start point by:

Add to hosts so you have a friendly URL in your test environment:

127.0.0.1 seafile-test.mine

Create a folder c:\seafile then run this command in powershell:

docker run -d --name seafile -e SEAFILE_SERVER_HOSTNAME=seafile-test.mine -e SEAFILE_ADMIN_EMAIL=me@example.com -e SEAFILE_ADMIN_PASSWORD=a_very_secret_password -p 8000:8000 -p 8080:8080 -p 8082:8082 -p 9000:9000 -v c:/seafile:/shared seafileltd/seafile:6.2.5

When prompted to allow access to the local file system enter the credentials of an account with access to the c:\seafile folder.

Navigate to http://seafile-test.mine:8000 in your browser (may need to wait for seafile to finish initialising) and log in using the username and password above (me@example.com and a_very_secret_password).

You should have a basic seafile installation at this point and it will be storing content in the local file system. Navigate to c:\seafile and you should fine content has been generated inside that folder.

There is still a bit of extra work to get this going - I was unable to upload content to the library or download seafile-tutorial.doc at this point.

Docker chews up 2GB of memory by default; not sure if that can be safely reduced.

There is apparently a way to have autogenerate letsencrypt certificates in this container and that also presumably means https is supported with something inside the container. If I have time to figure out why nothing can be up or downloaded I’ll look into that next…

You can experiment with docker using commands like these:

docker run --rm -v c:/seafile:/data seafileltd/seafile:6.2.5 ls /data
docker container start seafile
docker container stop seafile
docker container ls -all
docker inspect seafileltd/seafile:6.2.5

See https://docs.docker.com/engine/reference/commandline/docker/ for more.

If anyone has somethign useful to contribute feel free to speak up.

Cheers,
Mark

1 Like

Letsencrypt changed their methods back in Jan due to a security issue. I’ve successfully installed and also helped others use the new method since the manual has not been updated to use the new method. I’ve helped others through the use of certbot, which now uses certbot-auto rather than certbot. I saw a letsencrypt-auto out there somewhere as well, but I have not yet tried that route, and I’ve certainly never done it with docker.

As for Windows, there are a lot of issues with running a webserver via Windows. Due to instability issues, I finally gave in and installed a Linux box and moved two of my webservers there and the rest I use in a hosted CPanel account, and have not had a problem since.

Problems I’ve encountered with all webservers in Windows:

  • IIS just does not work well in a Windows desktop environment. And, it’s a pain in the rear to configure it and get it working properly.
  • NGinx and Apache for Windows work a lot better, but keeping them running without a frequent reboot is almost non-existent.
  • Windows webservers are slow… That might be fine if your web page is informational and suitable for browsing, but for file transfers, such as Seafile does, it’s just painfully slow.
  • Running Linux in a VM under Windows does work, but keeping the VM running not only eats up a nice chunk of memory, it’s also unstable and slow, not to mention it’s also a pain in the rear to get it working properly.

With that being said, installing a Linux server is the best thing I ever did for my webservers… Pretty much install and forget. Runs solid, and internal Seafile uploads/downloads/syncs are nearly 80-90% of my network bandwidth. With large files, I push about 80-90 MB/s with bursts close to 100. When I was on Seafile for Windows, my transfer rates were typically 45-60. Much slower, as you can see.

1 Like

That’s interesting. For my own modest needs I’ve not noticed any significant difference between modern versions of Apache web server and IIS under Windows in performance after tuning, and haven’t found either any more difficult to configure than the other, with both being bullet proof in terms of reliability.

Anyway, for those using Windows and wanting to test the Docker version:

I solved the last problem with Seafile. Turns out the default settings are wrong.

Changing the FILE_SERVER_ROOT value inside System Admin\Settings\ from http://seafile-test.mine/seafhttp to http://seafile-test.mine:8082 resolved the issue with downloading or uploading via the web interface.

Good luck!

I wouldn’t hold my breath waiting for non Docker versions of Seafile in future since this is also the way the developers are heading with the Unix side. If there are security flaws discovered maybe they will release point releases for those.

Cheers,
Mark

Maybe it’s gotten better, and Apache/IIS have matured. I was using Win 8.1 and Win 7 the last time I used webservers on Windows. I had much better luck with IIS in a domain environment with Windows Server. But, Windows desktops just didn’t cut it. I started out with Owncloud and ajax on 7 and 8.1. Switched to Seafile, which was more reliable, but still wasn’t where it shouldn’t be. Linux solved the issues.

Possibly. I was using both with Windows 7 Pro before reluctantly biting the bullet and moving to Windows 10. On the whole 10 is proving robust and tolerable once you add Classic Shell.

Your use case may have been the biggest factor in performance: IIS on non-server versions of Windows is limited in terms of number of simultaneous connections which doesn’t impact on my usage since my requirements are modest.

Cheers,
Mark

Yeah, Windows 10 is the best Windows yet, in my opinion. But, on my Cloud path through Windows, here are the things I tried in this order:

  • Windows Seafile, without IIS or another web server - Results: Easy to setup; Worked ok… Transfer speeds about 60% of bandwidth.

  • Windows Seafile with IIS - Results: Pain in the rear to get IIS working properly; stability issues; Transfer speeds about 60% of bandwidth.

  • Windows Seafile with NGinx - Results: NGinx was unstable and young on the Windows platform; Transfer speeds about 60% of bandwidth.

  • Upgraded Windows machine with a new MB and processor. Same results.

  • Linux Seafile under a VM in Windows - Results: Pain in the rear to configure; stability issues; Transfer speeds around 40% of bandwidth

  • Linux (Debian) Seafile, at recommendation of a programmer in the forum, and on a machine roughly 5 years older than my new Windows machine - Results: Easier to set up; much more stable; Transfer speeds around 90% of bandwidth.

I never looked back after that.

3 Likes

After trying several solutions:

  • Debian server
  • Virtual machine
  • Docker

I come back to Seafile 6.0.7 for Windows Server.
It’s just easier for me to manage and back up everything, I just need to copy the root folder to somewhere.
Hopefully it doesn’t have any serious security issues.

1 Like

Seriously, you really stop supporting Windows? That’s really crap! Seafile was the only for me known alternative to Nextcloud etc. that supports Windows, so I’ve decided to use it instead of wasting time to learn Linux syntaxes. Now I’ve read that you quit the support and that is really crappy and sad.

I don’t have the time to work in Linux or want to setup my Root Server (Windows Server 2012 RC2) with Linux. I’m a Windows specialist and won’t chance it for other’s egoism, mulishness etc.

Now I have to look for another Windows Cloud Solution and transfer all my data after setup to it. Over 133 GB!!!

You can still use docker on windows.

I keep 4TB of data on seafile, on top of ZFS (RAIDZ), I’ve never had any kind of issues with the data. This is the most robust cloud server I’ve ever built considering the environment (power surges are a common problem in third world countries). It’s been well worth the initial rather steep steps on the learning curve.

I really recommend learning to use linux as server OS, otherwise just use something like Syncthing or git-annex. Windows is great for the desktop, but linux is unbeatable on the server.

2 Likes