<- back

You, Prosody and Caddy: a guide

A little guide on how to run a Prosody XMPP server with Caddy One of these things is not like the other...

Since some tutorials are meh or (even worse) slop, here's a little guide throught my own circustances on how to setup a Prosody XMPP server with Caddy dealing with the certs

Done on Debian, though you can probably do all of this on any other distro

DNS setup

Before even thinking about instaling Prosody, you should get all of the DNS stuff done first.

Server setup

Ok, now you can download the server and all that good stuff.

I cant really go through every little configuration option, the documentation already does a pretty good job at that, but i will share my (barely changed) config file so you can have an example and enjoy the great default paragraphs of comments included.

Do make note of this list in particular, if you are using a subdomain and you want filesharing to work, you gotta do this.

Certs setup

And now the fun part, open up your Caddyfile and do the jiggy.

As you might know, after you reload Caddy, it will do all that certificate generation stuff for you.

The problem is: where do you find the certificates and how do you point them at Prosody?

First you gotta find the cert: sudo find /var/lib/caddy -type d -name "chat.yourdomain.moe", and then you point it at the server: sudo prosodyctl --root cert import chat.yourdomain.moe (cert filepath) (you gotta do this for all the domains you need btw)

Final steps

Now you just create your admin user: sudo prosodyctl adduser admin@chat.yourdomain.moe and restart your server (since you changed the config a bunch in the meanwhile): sudo systemctl restart prosody

But you do not want to do that whole rigamarole every week, right?

Just put a script like this on your cronjobs and you are all set.

If you want to send me a DM: tossa (at symbol) chat.bossatossa.moe 🙂