Howto install Openfire on NethServer

,

@Wellington_Rodrigues reminded me of Openfire in Doubt about openfire, which is a nice chat server with postgresql and LDAP/AD support.

HowTo Updates

30.3.2020 - Added chapter for Openfire 4.4.4 including inverse plugin

Installation and database setup

wget -O openfire-4.2.1-1.noarch.rpm https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-4.2.1-1.noarch.rpm
yum -y install openfire-4.2.1-1.noarch.rpm nethserver-postgresql
su - postgres -c "createuser openfire"
su - postgres -c psql
alter user openfire with encrypted password 'openfire';
\q
su - postgres -c "createdb -T template0 -E UNICODE -O openfire openfire"
psql -U openfire -d openfire -f /opt/openfire/resources/database/openfire_postgresql.sql

Enter Password: openfire

Firewall settings and enabling/starting service

config set openfire service status enabled TCPPorts 5222,5223,7070,7443,5269,5275,5276,5262,5263,9090,9091,7777,5229 access green
signal-event firewall-adjust
systemctl enable openfire
systemctl start openfire

Setup

Browse to http://YOURNETHSERVER:9090

  • Select your language
  • Server settings should be autofilled
  • Choose Standard Database Connection
  • Setup database:
    grafik
  • In profile settings you have to choose between db users or LDAP/AD

For AD you may use following settings:

  • Enter AD data that could be found out via account-provider-test dump
  • Don’t forget to set “Use SSL” to “Yes”
  • If you want full names to be shown change name from {cn} to {displayname}
  • The correct mail field is {userPrincipalName}
    grafik
  • Continue
  • Group mapping is ok so continue
  • Add administrator admin or another user you like and continue
  • Login to admin console

Restart openfire with systemctl restart openfire to activate secure port 9091 so you can browse to https://YOURNETHSERVER:9091

Applications button

This step is not necessary, it just creates an Openfire button in Nethgui “Applications”.

Create /usr/share/nethesis/NethServer/Module/Dashboard/Applications/Openfire.php

<?php
namespace NethServer\Module\Dashboard\Applications;

class Openfire extends \Nethgui\Module\AbstractModule implements \NethServer\Module\Dashboard\Interfaces\ApplicationInterface
{

  public function getName()
  {
    return "Openfire";
  }

  public function getInfo()
  {
    $host = explode(':',$_SERVER['HTTP_HOST']);
    return array(
      'url' => "https://".$host[0].":9091",
    );
  }
}

Todos

  • Change port 9090 because of cockpit, which uses same port
  • LDAP
  • Test untested update

Untested update to 4.4.4 including inverse plugin - converse for openfire

wget -O openfire-4.4.4-1.noarch.rpm https://www.igniterealtime.org/downloadServlet?filename=openfire/openfire-4.4.4-1.noarch.rpm
yum -y install openfire-4.4.4-1.noarch.rpm nethserver-postgresql

su - postgres -c "createuser openfire"
su - postgres -c psql
alter user openfire with encrypted password 'openfire';
\q
su - postgres -c "createdb -T template0 -E UNICODE -O openfire openfire"
psql -U openfire -d openfire -f /opt/openfire/resources/database/openfire_postgresql.sql

config set openfire service status enabled TCPPorts 5222,5223,7070,7443,5269,5275,5276,5262,5263,9095,9096,7777,5229 access green
signal-event firewall-adjust
sed -i -e 's!<port>9090</port>!<port>9095</port>!' -e 's!<securePort>9091</securePort>!<securePort>-1</securePort>!' /opt/openfire/conf/openfire.xml
systemctl enable openfire
systemctl start openfire

Inverse plugin:

Get and enable inverse plugin:

wget -O /opt/openfire/plugins/inverse.jar https://www.igniterealtime.org/projects/openfire/plugins/5.0.5.1/inverse.jar
systemctl restart openfire
9 Likes

I was about to post because bells and whistles were ringing, just to read in your last remarks:

Great howto!

1 Like

Nice topic about how to install Openfire.

1 Like

I like this option.
I tested here today at the company and it was cool

1 Like

Hi @mrmarkuz, how are you?
Sorry for reviving this topic but I found it better than creating a new one.
In the company where I work we are with version 7.4.1708 and we want to migrate to version 7.5. I created a VM to test first and I’m having problems when installing Openfire. Even following the installation steps, it gives the following error:

Would you know or anyone how to resolve this problem?

Active Directory local accounts provider for test.local
Samba DC version
4.7.8
DNS domain name
ad.test.local
NetBIOS domain name
TEST
Domain Controller IP address
192.168.1.6

I noticed that on the old server Samba DC is in version 4.7.7

Hi @Wellington_Rodrigues,

it works for me when disabling strong auth:

and disabling SSL and TLS in the openfire settings:

Another solution would be to let samba use letsencrypt certs (I didn’t test with openfire):

4 Likes

I’ll test this option, thank you

1 Like

@mrmarkuz, thank you :grinning:
It worked disabling strong auth! :grin:

2 Likes