Browse Source

updated to reflect new debian stable

pull/1/head
rra 7 years ago
parent
commit
56e0b737c0
  1. 24
      raw/configuring_an_xmpp_server.md

24
raw/configuring_an_xmpp_server.md

@ -5,7 +5,7 @@ Tags: xmpp, chat, guide, instant messaging, prosody
Slug: configuring-a-modern-xmpp-server Slug: configuring-a-modern-xmpp-server
Description: Hands-on step-by-step guide that shows how to configure Prosody for security, mobile messaging and ease of use. Description: Hands-on step-by-step guide that shows how to configure Prosody for security, mobile messaging and ease of use.
This is a guide to set up a modern XMPP server focused on security and mobile messaging. The whole guide assumes Debian running on the server, the fact that you will end up hosting a few of your friends and that you have some basic skills working on a linux command line. This is a guide to set up a modern XMPP server focused on security and mobile messaging. The whole guide assumes Debian stable running on the server, the fact that you will end up hosting a few of your friends and that you have some basic skills working on a linux command line.
To make your server communicate make sure following ports are open in your firewall: To make your server communicate make sure following ports are open in your firewall:
@ -25,15 +25,14 @@ This is among others required for Gajim plugins to work properly; self-generated
Install Certbot and get new certificates for your domain (replace myserver.org with your own): Install Certbot and get new certificates for your domain (replace myserver.org with your own):
:::console :::console
wget https://dl.eff.org/certbot-auto sudo apt-get update && sudo apt-get install certbot
chmod a+x certbot-auto certbot certonly -d muc.myserver.org -d dump.myserver.org -d myserver.org
certbot-auto certonly -d muc.placeholderdomain.org -d dump.placeholderdomain.org -d placeholderdomain.org
Should you succeed, you will be able to read something like: Should you succeed, you will be able to read something like:
:::console :::console
Congratulations! Your certificate and chain have been saved at Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/placeholderdomain.org/fullchain.pem. Your cert will /etc/letsencrypt/live/myserver.org/fullchain.pem. Your cert will
expire on 2017-02-13. To obtain a new or tweaked version of this expire on 2017-02-13. To obtain a new or tweaked version of this
certificate in the future, simply run certbot-auto again. To certificate in the future, simply run certbot-auto again. To
non-interactively renew *all* of your certificates, run non-interactively renew *all* of your certificates, run
@ -119,7 +118,7 @@ Install the newest prosody plugins:
cd /usr/src cd /usr/src
hg clone https://hg.prosody.im/prosody-modules/ prosody-modules hg clone https://hg.prosody.im/prosody-modules/ prosody-modules
Make a backup of the default prosody configuration and install [the one by the homebrewserver.club]({filename}/downloads/prosody.cfg.lua) Make a backup of the default prosody configuration and install [the one by the homebrewserver.club](https://homebrewserver.club/downloads/prosody.cfg.lua)
:::console :::console
cd /etc/prosody cd /etc/prosody
@ -196,13 +195,13 @@ The homebrewserver.club prosody config:
"*syslog"; "*syslog";
} }
VirtualHost "placeholderdomain.org" VirtualHost "myserver.org"
-- Enable http_upload to allow image sharing across multiple devices and clients -- Enable http_upload to allow image sharing across multiple devices and clients
Component "dump.placeholderdomain.org" "http_upload" Component "dump.myserver.org" "http_upload"
---Set up a MUC (multi-user chat) room server on conference.example.com: ---Set up a MUC (multi-user chat) room server on conference.example.com:
Component "muc.placeholderdomain.org" "muc" Component "muc.myserver.org" "muc"
compression_level = 9 compression_level = 9
@ -211,7 +210,7 @@ The homebrewserver.club prosody config:
Replace all instances of the placeholder domain name and passwords in the config file with your own: Replace all instances of the placeholder domain name and passwords in the config file with your own:
:::console :::console
sed -i 's/placeholderdomain.org/yourdomain.net/g' prosody.cfg.lua && sed -i 's/userPassword/yourownpassword/g' prosody.cfg.lua sed -i 's/myserver.org/yourdomain.net/g' prosody.cfg.lua && sed -i 's/userPassword/yourownpassword/g' prosody.cfg.lua
Alternatively you can change them by hand. They are on line 61, 69, 72, 75 of prosody.cfg.lua Alternatively you can change them by hand. They are on line 61, 69, 72, 75 of prosody.cfg.lua
@ -226,7 +225,7 @@ After you've set up all of the above it is time to start the server:
Users can be added from the command line, you will also be prompted for a password: Users can be added from the command line, you will also be prompted for a password:
:::console :::console
prosodyctl adduser me@placeholderdomain.org prosodyctl adduser me@myserver.org
Alternatively you can change "allow_registration = false;" to "allow_registration = true;" in the config (line 35) to allow users to register accounts on your server via their clients. Alternatively you can change "allow_registration = false;" to "allow_registration = true;" in the config (line 35) to allow users to register accounts on your server via their clients.
@ -235,3 +234,6 @@ Now you can try connecting to your own server by using a client like Gajim or Co
If you have questions about Prosody, the project's [documentation](http://prosody.im/doc) is quite good. If you can't find answers there, try contacting prosody developers and users directly via [the Prosody XMPP chatroom](xmpp://prosody.conference.prosody.im?join) If you have questions about Prosody, the project's [documentation](http://prosody.im/doc) is quite good. If you can't find answers there, try contacting prosody developers and users directly via [the Prosody XMPP chatroom](xmpp://prosody.conference.prosody.im?join)
This guide is a companion to our article [Have You Considered The Alternative?](http://homebrewserver.club/have-you-considered-the-alternative.html) on instant messaging. Also check out our guide on [XMPP clients](http://homebrewserver.club/picking-modern-xmpp-clients.html). This guide is a companion to our article [Have You Considered The Alternative?](http://homebrewserver.club/have-you-considered-the-alternative.html) on instant messaging. Also check out our guide on [XMPP clients](http://homebrewserver.club/picking-modern-xmpp-clients.html).
**edit 10th of december 2017**
updated instructions for new debian stable
Loading…
Cancel
Save