Support #539
Installing Ejabberd XMPP Server on FreeBSD
Description
Install Ejabberd¶
- Install the Ejabberd server. Use the following command:
pkg install ejabberd openssl
- Enable ejabberd to start at boot:
echo 'ejabberd_enable="YES"' >> /etc/rc.conf
When pkg finishes, the Ejabberd server will have been successfully installed, and will be ready for configuration.
Configuring Ejabberd¶
- Create a configuration file from the example config:
cp /usr/local/etc/ejabberd/ejabberd.yml.example /usr/local/etc/ejabberd/ejabberd.yml
- Edit the new configuration file:
vi /usr/local/etc/ejabberd/ejabberd.yml
- Add the XMPP domain to be served:
hosts: - "localhost" - "example.com"
- Add the XMPP domain to be served:
NOTE: Ejabberd is very feature rich, so adjust the configuration to suit whatever the use case may be.
Adding Users¶
- Register a new user:
su - ejabberd ejabberdctl register admin example.com SuperSecretPassword
- Then add this to /usr/local/etc/ejabberd/ejabberd.yml:
admin: user: - "admin": "example.com"
- Then add this to /usr/local/etc/ejabberd/ejabberd.yml:
- Now that the admin user has been added, the web interface can be accessed at http://example.com:5280/admin