ejabberd 支持https

使用certbot生成SSL/TLS证书,文件夹在/etc/letsencrypt/live目录下面

备份server.pem文件,然后再生成新的文件

cat /etc/letsencrypt/live/chat123.zone/privkey.pem /etc/letsencrypt/live/chat123.zone/fullchain.pem > /opt/ejabberd/conf/server.pem

最后重启ejabberd即可

Ubuntu安装ejabberd

先决条件:ubuntu 16.04,  ejabberd-18.12.1

wget https://www.process-one.net/downloads/downloads-action.php?file=/18.12.1/ejabberd_18.12.1-0_amd64.deb
dpkg -i ejabberd_18.12.1-0_amd64.deb

vi ~/.bashrc
添加如下:
export PATH=$PATH:/opt/ejabberd-18.12.1/bin/

cat /etc/letsencrypt/live/huangqiang.zone/privkey.pem /etc/letsencrypt/live/huangqiang.zone/fullchain.pem > /opt/ejabberd/conf/server.pem

vi /opt/ejabberd/conf/ejabberd.yml
修改如下:

hosts:
– “huangqiang.zone”

acl:
admin:
user:
– “admin@huangqiang.zone”

启动服务:
ejabberdctl start

增加管理员:
ejabberdctl register admin huangqiang.zone yourpassword

增加用户
ejabberdctl register user01 huangqiang.zone yourpassword
ejabberdctl register user02 huangqiang.zone yourpassword

 

web查看ejabberd信息

http://ip-address:5280/admin