Running jabberd AND mu-conference (chat room server) on Fedora

I recently needed to set up a jabberd, the Jabber (XMPP) daemon, on my home server running Fedora 14 Linux. I also needed to set up a chat room server using MU-Conference. Jabberd is available in the Fedora Yum repository, but documentation for setting it up is somewhat sparse, and MU-Conference isn’t available in Yum, so you have to compile and install it yourself.

Since it took me a number of hours to figure everything out and get it all working, I figured it would be worthwhile for me to try to document what I did to help anyone else who might need to do this.

If you encounter any errors or omissions in these instructions, please tell me so that I can update them for others!

Install jabberd

yum install jabberd

If you don’t know what this means, you shouldn’t be trying to do this. 🙂

Configure jabberd

  1. Pick the domain you’re going to use for your jabber server. For example, I use “”. It needs to be a domain for which you can add SRV records to DNS.
  2. Create the necessary SRV records:
    1. _xmpp-server._tcp.your.domain priority 5, weight 0, port 5269, target the FQDN of your server
    2. _jabber._tcp.your.domain same as above
    3. _xmpp-client._tcp.your.domain same as above but port 5222 instead of 5269
    4. There’s an SRV record generator you might find useful.
  3. Update the config files for your domain:
    1. Replace “localhost.localdomain” with your domain in /etc/jabberd/c2s.xml.
    2. Replace “<id>localhost.localdomain</id>” with “<id>your.domain</id>” in /etc/jabberd/sm.xml.
  4. Decide what authentication back-end you want to use and configure /etc/jabberd/c2s.xml appropriately.
    • I opted to use PAM, which means that usernames and passwords in jabberd are the same as Linux usernames and passwords in /etc/passwd and /etc/shadow. To enable PAM authentication, you need to:
      • change “<module>sqlite</module>” to “<module>pam</module>”; and
      • make it possible for jabberd’s c2s process to read /etc/shadow:
        • on Fedora 18 or newer: either modify /usr/lib/systemd/system/jabberd-c2s.service to run the service as root instead of jabber, or create a new group called shadow, add root and jabber to it, change /etc/shadow to that group, and make sure /etc/shadow is group-readable; or
        • on Fedora 17 or earlier: Change the “C2S_AS_ROOT” setting to “yes” in /etc/sysconfig/jabberd.
    • If you don’t want to use PAM, you’re on your own — I can’t tell you how to do it, since I didn’t have to figure it out for myself. (updates welcome!)
  5. Find the “<acl type=’all’>” section in /etc/jabberd/sm.xml and change “admin@localhost.localdomain” to a Jabber ID which should be able to administer the server.
  6. If you want users to be created automatically in Jabberd when they are used the first time, uncomment the “<auto-create/>” tag in /etc/jabberd/sm.xml.
    • If you don’t use auto-create, you need to figure out for yourself how to add new users and passwords; I didn’t figure it out. (updates welcome!)
  7. Run “/sbin/chkconfig jabberd on”.
  8. Run “/sbin/service jabberd start”.
  9. Use an XMPP client to connect to your server, and it should Just Work.

Install MU-Conference

  1. Download and install this this x86_64 RPM, or download, compile and install this SRPM.
  2. Email me and let me know you’re using my RPM, so I can let you know if/when I update it.

Configure MU-Conference

  1. Add “mu-conference” to the end of the “START_DAEMONS” setting in /etc/sysconfig/jabberd (before the closing quotation mark).
  2. Pick the domain you’re going to use for your chat server.
    • You need to be able to create SRV records in it. At least,I think you need to be able to create SRV records in it, but it’s possible that XMPP software is smart enough to inherit them from the parent domain. I’m not certain. (if you know, please let me know!)
    • The convention seems to be “conference.your.domain“, where “your.domain” is the domain you picked before for your jabber server.
    • I don’t know whether you’re supposed to be able to use the same domain for both your jabber server and your chat server, but I tried it and it caused all sorts of problems, so I don’t think it’s a good idea. (if you know more about this, please send me an update to include here!)
  3. Create SRV records for your chat server that are identical to the SRV records for the jabber server described above, except they should be, e.g., _jabber._tcp.conference.your.domain instead of _jabber._tcp.your.domain.
  4. Find “conference.localhost” everywhere it appears in /etc/jabberd/mu-conference.xml and replace it with your chat domain.
  5. Find the “<sadmin>” section in /etc/jabberd/mu-conference.xml, and replace “admin@localhost” with the Jabber ID that should be able to administer the chat service.
  6. Find the “<item category=’conference'” line in /etc/jabberd/sm.xml, uncomment it, and replace “” with your chat domain.
  7. There is a bug in MU-Conference which sometimes causes problems with the shared secret used by all of the daemons to authenticate to each other is more than 15 characters long. Therefore:
    1. Find all of the “<pass>” nodes in /etc/jabberd/c2s.xml, /etc/jabberd/s2s.xml, and /etc/jabberd/sm.xml which do not say “Database username and password” above them, and truncate them at 15 characters long (if you change the “Database” ones, and you’ve already configured database storage when setting up jabberd above, you will break your database storage).
    2. Find the “<secret>” node in /etc/jabberd/mu-conference.xml and change its contents to match the 15-character shared secret in the other files.
  8. Run “/sbin/service jabberd restart”.
  9. Use an XMPP client to connect to a chat room in the conference.your.domain domain, and it should create the chat room automatically.

Please send me feedback about these instructions via email or in a comment.

Print Friendly, PDF & Email

6 thoughts on “Running jabberd AND mu-conference (chat room server) on Fedora

  1. Marko

    Thanks a lot for the excellent summary of these config tasks Jonathan! Those were indeed purely documented on jabberd2/mu-conference site, with many missing details.

    I have a question about your RPM for mu-conference. I was trying to build it from src initially, but was hitting a run-time problem where the MUC component stops communicating with router soon after successful registration. Noting is indicated in logs on either end, but users are not able to create conf rooms at all. All MUC related XMPP messages seem to time-out and neither router or MUC component indicate anything in logs. Btw, this was not a well-known too-long-secret issue. And I’m obsering the same problem regardless of what mu-conf release in use (0.7, 0.8, 0.8.81, …) from their site:

    This problem doesn’t occur when I’m using your RPM! But after unpacking the RPM with 7ZIP, I don’t see any installer script, so I was wondering where’s all the magic? 🙂 Does your RPM only contain 4 binary files that get distributed to appropriate folders during the install? Also, can you please tell me what Linux distribution and make flags were you using when making binaries for tour RPM? I’m using the RPM on CentOS 7 (minimal install), with dependencies added separately (I think jabberd rpm brings those actually).

    Thanks in advance,

    1. jik Post author

      As the article says, I used Fedora 14.

      I’m afraid I can’t explain the problem you’re running into. It’s been years since I worked on this, so I don’t remember the details — which is why I documented it in writing contemporaneously. So all the advice I can offer is what’s written above, I’m afraid.

  2. Donald Burr

    I have just spent the past four hours or so figuratively (and at the end very nearly literally) beating my head against a brick wall trying to get jabberd and mu-conference going. I was about to give up and go check myself into the funny farm, when I happened across your website. If only I had found your site sooner! Anyway your RPM worked perfectly and I now have a working jabberd and mu-conference instance running. (BTW I am happy to report that your RPM works just fine with CentOS 6.5 and the version of jabberd rpm from epel.) Thank you for restoring my sanity and saving what is left of what started off as being a rather nice weekend day.

  3. Thomas

    Many thanks! The hint torwards not using the same domain for the chat server, but conf….. was perfect! This was driving me nuts!

  4. Pingback: HOWTO: run jabberd and MU-Conference on Fedora « Something better to do

Leave a Reply

Your email address will not be published.