SSL how to: install ssl on eJabberd

Article describes how to get StartSSL certificates working with eJabberd. First of all read how to get free ssl certificate from StartSSL and actually create certificates or you can read to create self-signed certificate and use self-signed certificates and use them here changed the steps accordignly.

Now we should prepare the file containing all required certificates. Pay attention that order of the certificates in this file is important!

$ cat www_privatekey.pem www_certificate.pem sub.class1.server.ca.pem > /etc/ejabberd/ejabberd.pem
$ chown ejabberd:ejabberd /etc/ejabberd/ejabberd.pem
$ chmod 400 /etc/ejabberd/ejabberd.pem

The SSL portion of the eJabberd config should look something like this.

{5222, ejabberd_c2s, [
                        {access, c2s},
                        {shaper, c2s_shaper},
                        {max_stanza_size, 65536},
                        starttls, {certfile, "/etc/ejabberd/ejabberd.pem"}
                       ]},

 {s2s_use_starttls, true}.
 {s2s_certfile, "/etc/ejabberd/ejabberd.pem"}.
Posted by:
Enjoyed this post? Share and Leave a comment below, thanks! :)