apt update apt install jabberd2
While jabberd2 is configured by default to use an sqlite db, it doesn't automatically create the tables it needs to work.
zcat /usr/share/doc/jabberd2/db-setup.sqlite.gz | sqlite3 /var/lib/jabberd2/sqlite.db
SSL certs are usually distributed as separate pem and key files, but jabberd2 expects them as one file.
cat /etc/letsencrypt/live/your.domain.invalid/privkey.pem /etc/letsencrypt/live/your.domain.invalid/fullchain.pem > /etc/jabberd2/server.pem
You will probably want to do that as part of a post-renew hook.
<local> (around line 77) to your FQDN. In
<id> around line 145 to your FQDN, and add the property
/etc/jabberd2/server.pem. Reload the files using
service jabberd2 restart.
If you are behind NAT, forward the TCP ports 5222 and 5269.