Install ejabberd on macOS using Homebrew package manager
Homebrew is now the de facto package manager for open source software on macOS. Thus, we have discontinued our macOS binary installer to focus on improving further ejabberd experience on macOS by polishing Homebrew ejabberd package.
We recently updated ejabberd on Homebrew and we will keep it in sync with ejabberd official releases. As of today, if you install ejabberd with Homebrew, you will always get the latest release.
If you have any suggestion on how to make ejabberd with Homebrew experience better, please open a Github issues, with the tag Packaging:Homebrew
.
We have not yet tested it with Homebrew on Linux or on WSL, but still, pleae submit issues if you find some.
Here is the cheat sheet regarding ejabberd management with Homebrew.
Installing ejabberd
The following command will install ejabberd and its dependencies:
$ brew install ejabberd
Starting ejabberd and launching it on macOS start
brew services start ejabberd
Starting ejabberd
Alternatively, the following command start ejabberd in background, with trying to restart it automatically after reboot:
$ /usr/local/sbin/ejabberdctl start
You can check the status with the command:
$ /usr/local/sbin/ejabberdctl status
The node ejabberd@localhost is started with status: started
ejabberd 20.01 is running in that node
If ejabberd is not running the status command will display a nodedown error:
$ /usr/local/sbin/ejabberdctl status
Failed RPC connection to the node ejabberd@localhost: nodedown
Commands to start an ejabberd node:
start Start an ejabberd node in server mode
debug Attach an interactive Erlang shell to a running ejabberd node
iexdebug Attach an interactive Elixir shell to a running ejabberd node
live Start an ejabberd node in live (interactive) mode
iexlive Start an ejabberd node in live (interactive) mode, within an Elixir shell
foreground Start an ejabberd node in server mode (attached)
Optional parameters when starting an ejabberd node:
--config-dir dir Config ejabberd: /usr/local/etc/ejabberd
--config file Config ejabberd: /usr/local/etc/ejabberd/ejabberd.yml
--ctl-config file Config ejabberdctl: /usr/local/etc/ejabberd/ejabberdctl.cfg
--logs dir Directory for logs: /usr/local/var/log/ejabberd
--spool dir Database spool dir: /usr/local/var/lib/ejabberd
--node nodename ejabberd node name: ejabberd@localhost
Stopping ejabberd
/usr/local/sbin/ejabberdctl stop
Configuration file
To change the configuration file, you can edit /usr/local/etc/ejabberd/ejabberd.yml
If you have upgraded ejabberd and want to apply possible change to config file, you can check the new ejabberd.yml
default file ejabberd.yml-new
in the same directory.
Checking the logs
To troubleshoot ejabberd, you can check the logs in the directory /usr/local/var/log/ejabberd/