ejabberd
This commit is contained in:
parent
14d8e83b5f
commit
283f0572dd
1 changed files with 6 additions and 4 deletions
|
@ -4,7 +4,7 @@ These are the ports needed for ejabberd to work.
|
|||
Ports 80 and 443 are needed for deploying and SSL certificate with certbot.
|
||||
|
||||
```shell
|
||||
declare -a ports=("80" "443" "5222:5443/udp" "5222:5443/tcp" "3478" "49152:65535/udp" "49152:65535/tcp")
|
||||
declare -a ports=("80" "443" "5222" "5223" "5269" "5280" "5443" "1883" "8883" "3478" "5349" "7777")
|
||||
|
||||
for port in "${ports[@]}"; do ufw allow "$port" ; done
|
||||
ufw reload
|
||||
|
@ -16,7 +16,7 @@ Debian conveniently offers the packages in the official repositories!
|
|||
|
||||
```shell
|
||||
apt update
|
||||
apt install ejabberd python3-certbot-nginx
|
||||
apt install ejabberd python3-certbot erlang-p1-pgsql
|
||||
systemctl enable --now ejabberd
|
||||
```
|
||||
|
||||
|
@ -32,7 +32,7 @@ DOMAIN="example.org"
|
|||
declare -a subdomains=("" "conference." "proxy." "pubsub." "upload." "stun." "turn.")
|
||||
|
||||
for i in "${subdomains[@]}"; do
|
||||
certbot --nginx -d $i$DOMAIN certonly
|
||||
certbot -d $i$DOMAIN certonly --standalone --register-unsafely-without-email --agree-tos
|
||||
mkdir -p /etc/ejabberd/certs/$i$DOMAIN
|
||||
cp /etc/letsencrypt/live/$i$DOMAIN/fullchain.pem /etc/ejabberd/certs/$i$DOMAIN
|
||||
cp /etc/letsencrypt/live/$i$DOMAIN/privkey.pem /etc/ejabberd/certs/$i$DOMAIN
|
||||
|
@ -108,11 +108,13 @@ mod_mam:
|
|||
|
||||
## Postgresql database
|
||||
|
||||
Set postgresql as database.
|
||||
Set postgresql as database. WARNING. I can't get this to work.
|
||||
Don't bother if you have few users anyway.
|
||||
|
||||
```shell
|
||||
sudo -i -u postgres psql -c "CREATE USER ejabberd WITH PASSWORD 'DB_PASSWORD';"
|
||||
sudo -i -u postgres psql -c "CREATE DATABASE ejabberd OWNER ejabberd;"
|
||||
su -c "curl -s https://raw.githubusercontent.com/processone/ejabberd/master/sql/pg.sql | psql ejabberd" postgres
|
||||
```
|
||||
|
||||
```yaml
|
||||
|
|
Loading…
Reference in a new issue