Student needs assistance: Caddy with iRedMail & Wordpress on VPS

1. Output of caddy version:

N/A Caddy Not Yet Installed

2. How I run Caddy:

N/A Not Yet Running Caddy

a. System environment:

Debian 11 - No Docker - Running on Private Virtual Server - 1core - 4gb

b. Command:

Not yet running caddy

c. Service/unit/compose file:

N/A

d. My complete Caddy config:

Not yet there :slight_smile:

3. The problem I’m having:

As part of a student project (and hopefully future production project) I am attempting to install a private Linux cloud system: 2 email addresses served by iRedMail (2 different domains), and 2 Wordpress websites (2 different domains).

My VPS has 1 core and 4gb of RAM. So far I have successfully installed iRedMail and is serving 1 email address, though I cannot use webmail with HTTPS.

At this point I do not even know, and I would love help assessing:

  • Is this setup possible / reasonable / reliable?
  • Is my VPS powerful enough to handle such setup?
  • How would I go about switching from nginx for iRedMail to Caddy?
  • How would I go about installing Wordpress on Caddy once I have made the switch from nginx?

4. Error messages and/or full log output:

N/A

5. What I already tried:

I have already installed iRedMail on nginx.

My next logical step would be to install Caddy, and make iRedMail run on Caddy instead of nginx. How to migrate from one server to the other… gives me the chills! :wink:

I have been told I could keep using nginx and use Caddy as an SSL layer, but I need to save resources because my VPS is only 1 core and 4gb. I do not need 2 servers running at the same time. Also I think it is good to learn how to be performant, am I correct? :slight_smile:

6. Links to relevant resources:

How to run Wordpress with Caddy
Using iRedMail with Caddy

I appreciate your guidance and wisdom. I am a fascinated newbie and I am in awe of all the knowledge required to make something like this work. Thank you in advance.

BigSpaces

I guess, though I am not familiar with iRedMail. Just keep in mind that you have a single point of failure (SPoF).
If your server goes down, you will not be able to receive mails - over the period of that downtime.
However, mail servers usually don’t give up on the first try, but retry multiple times instead.
It’s just something to keep in mind.
Plus mail IP/sender reputation and so on.

Again, I don’t know the recommended requirements of iRedMail.
But it should work just fine.

I guess you have some sort of nginx config already?
Make yourself familiar with the Caddyfile Directives — Caddy Documentation, if you haven’t already, and just start porting that nginx config to a Caddyfile.
Feel free to ask any question that come up while doing so :innocent:

Ye, you absolutely could just do that.
Both Caddy and nginx are very efficient. So realistically speaking, you wouldn’t really notice any significant difference running them both at the same time, even on your VPS.

Also, please be aware that

is for Caddy v1 not v2.
The Caddyfile syntax is different between those versions.


I would argue, just YOLO it and see how it goes.
You can always just keep nginx running and use reverse_proxy (Caddyfile directive) — Caddy Documentation
Especially if it is a student project and not a prod system (yet?), as you said :slight_smile:

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.