mjl- / mox

modern full-featured open source secure mail server for low-maintenance self-hosted email
https://www.xmox.nl
MIT License
3.7k stars 111 forks source link

How to switch to "existing-webserver" from the ordinary one? #137

Closed naddika closed 8 months ago

naddika commented 9 months ago

I initially set up my instance without -existing-webserver. And now I need to add or switch to this option. How will I do this properly? What's described in the documentation won't work, will it? Because there it assumes that -existing-webserver to be used from the beginning.

And I can't use the built-in webserver of Mox, I have to use my own nginx instance as well as LetsEncrypt certificates.

mjl- commented 9 months ago

You could try this: Run the quickstart in a new/temporary directory with the -existing-webserver flag. That will generate new configuration files. Then diff the two, and apply the changes from the new file to your existing config file.

I did this just now locally. Two quickstart invocations, one without and one with -existing-webserver. Summary of the differences:

Was there anything in particular missing/wrong with the mox webserver that nginx is needed? It's good to know what people run into, maybe I can add missing functionality to the mox webserver in the future.

naddika commented 9 months ago

Alright

Was there anything in particular missing/wrong with the mox webserver that nginx is needed?

I run https websites on the same machine. Therefore, the 443 port is already occupied by nginx.

naddika commented 8 months ago

How to generate a config file which won't overwrite the existing one, though? How to specify its name? I could, of course, temporarily rename the existing one.

mjl- commented 8 months ago

Run the quickstart in a new/temporary directory with the -existing-webserver flag

Have you tried this previous suggestion? Or is there a reason you can't run the quickstart elsewhere?

I run https websites on the same machine. Therefore, the 443 port is already occupied by nginx.

Is there a reason you cannot use the mox webserver? It does https too, and automated TLS cert management with ACME.

naddika commented 8 months ago

Run the quickstart in a new/temporary directory

Ok. Initially I'd missed this part.

Is there a reason you cannot use the mox webserver? It does https too, and automated TLS cert management with ACME.

Do you suggest that I replace nginx, the server that's been around for decades, fast, robust, tested and one of the most popular web servers, with yours? Simply because mox web server is really nice and supports https? How about config files? Performance? Integrations? Community? And dozens of other things. If it was a blog about my cat, and it was the only website, I would've done it.

mjl- commented 8 months ago

Do you suggest that I replace nginx ...

Well, I asked why it wasn't an option. And you said you need to run https websites. So I responded that mox can do that too. (: I was also triggered because as far as I know the open source nginx doesn't do automatic TLS cert management with ACME (but my info is likely outdated). I assumed you weren't running big websites on that machine because you initially ran the quickstart without the existing-webserver option on that machine and wanted to keep that config, so I thought it had run OK at some point. Anyway, I do understand why you would rather run long-time proven software, no worries.