How to run Lychee server on a windows 10 computer

I would like to run the Lychee server on my Windows 10 desktop, with minimum impact on that machine. Lychee’s requirements include Linux, PHP, MySQL, and Apache. Despite being pretty ignorant about Docker, it seems to me that running the linuxserver/lychee container might be all I need. However, the overview presented on that page leaves me with many questions.

Is there more detailed information on how to use the containers from linuxserver site? in general and Lychee server in particular? (it is very clear that I am a Docker novice :slight_smile:)

Well, none of us run docker on Windows, as we’re “Linux” guys as our name implies. So in order to even think about running any of the containers you’re going to have to figure out Docker on Windows for yourself (Not sure if the WSL is helpful here)

There’s nothing special about our containers from a running point of view, but for Lychee you also need a MySQL/MariaDB database as well.

Might be better if you tell us what your questions are to be honest.

I am minimally skilled with Docker on Windows (using Linux Containers alternative) and I am pretty sure that I could build my Lychee server from its GitHub source. In that case, I would also have to install PHP, MySQL and some web server (Apache / nginx) and perhaps a few more “parts”.

My (maybe naive) perception about Docker is that I could grab this complete container and have instant solution with all needed components already configured.

Yeah, our Lychee container contains Nginx and PHP, and personally I use our MariaDB container as the database component. So you’re almost correct. :wink:

1 Like

I’ve been dabbling in windows for docker a bit lately. Containers work great with bridge networking. But you need to pay attention to the paths as they differ from linux.

I would recommend first creating a “user defined bridge network” via docker network create network-name. And then when you create the two containers, attach them to that network with --net=network-name in docker run/create. Then the containers can reach each other via container name through the docker network.

So in lychee, you just use mariadb as the mysql url and use the container port 3306

1 Like

Heretic… :stuck_out_tongue:
I’m not angry mate, I’m disappointed… :grin:

How serious is the offense of using “anything windows” in the linux world? I get that @chbmb is (at least semi) joking here, but I remember early days of linux, when we “real unix” people looked down on linux.

I’m just joking, I think only a couple of us linuxserver guys use the Linux desktop exclusively, I’m one and the other works for RHEL, so I guess he is kind of duty bound to, most run Windows desktop machines. I ditched Windows about three years ago now, after a Win10 update hosed my dual boot setup. Since then I’ve become a bit of a zealot I confess. I still have to use Windows at work (I don’t work in tech, and the proprietary software needed at work is only available for Windows.)

In all seriousness though, I was wondering why you want to run Lychee on your Windows desktop, it’s a server application, I would have thought it would be better installed on a 24/7 machine or even something like the Raspberry Pi. Don’t take that as a criticism, just a suggestion.

Now at a risk of disappointing @chbmb, I want to ask @aptalca a few application architecture questions as relevant to my specific case, where I want to run Lychee server on my development (windows 10) machine, that I am using almost exclusively for open source javascript projects - where I do not want to run any of the Lychee components natively.

At the moment, I am guessing that I should start with linuxserver/lychee running as the do@mcker container. As @chbmb confirmed, I will also have PHP and Nginx running in that same container. @aptalca suggests to get MySQL (or mariadb) in a different container and use bridge network to allow the needed communications.

Why should I not add mySQL to the first, already running container instead - to have all Lychee server components in a single container. I realize that making several smaller components (sorry - containers) makes my application more moduler (I could use the database component elsewhere), but I do not expect to ever get there, as I am firmly wedded to platform independent javascript frameworks and dotnet core 2.0 for all my non-hobby development.

Would it make sense to publish my " single container Lychee server" - I would be happy had I found this for my need? :smiley:

I’d advise against “multi-application” containers, it’s very much against the “ethos” of docker and in our experience adds unnecessary complications, with no discernable benefit. We tried it a few years back with one or two applications and, for want of a better phrase, it was a bit of a fustercluck.

Although, I can see where you’re coming from and it’s a common question, mainly stemming from the fact a common analogy for docker containers is like a “mini-vm” which does lend to thinking of installing everything in one container, whereas I guess a more accurate analogy is a sandboxed process.

@chbmb asks

In all seriousness though, I was wondering why you want to run Lychee on your Windows desktop, it’s a server application, I would have thought it would be better installed on a 24/7 machine or even something like the Raspberry Pi. Don’t take that as a criticism, just a suggestion.

This is a good question and I believe that I have a good answer: my Lychee server will be hosted at some real hosting service. As I am preparing for a really large data set, I want the freedom of modeling all that on my own machine. I may change the front end, modify the schema, etc and that is a lot more comfortable do to in privacy of my machine. If what i am planning to do gets done right, you may think of this as the distributed development environment for Lychee :smirk:

Makes perfect sense now. :wink:

Well, your evaluation does make even better sense (my background of application architect agrees with you wholeheartedly). I am however slightly “afraid” of having to deal with the connectivity between containers as this (from my viewpoint of course) does not look intuitive and well behaved. So, I guess I will simply bite the bullet - however not to the point that I will switch to a Linux workstation :smirk:

I got to say @aptalca’s suggestion of linking the containers with a custom docker network is the way I do things now and I’ve never had any issues, but an alternative is to just use regular IP:PORT to connect them. Only gotcha is even if they’re on the same host, you can’t use localhost as that would refer to the local docker IP which is individual to each container.

You know you want to… :stuck_out_tongue:

Well, that is a big one and I have no idea of how to solve this - unless using 127.0.0.1 instead would do the trick

No, 127.0.0.1 won’t work either.

Just use the host machines IP, ie 192.168.1.36

Hey! I use only Linux on the desktop also mate! And also @hackerman I believe. Disappointed you don’t know your teammates better… :stuck_out_tongue_winking_eye:

What distro/DE you rocking @saarg?

I was using Solus KDE but switched back to Solus Budgie a couple of days ago. Torn between the two to be honest.

I really should have thought that myself :frowning_face: