An XMPP server written in Go.
jackal is a free, open-source, high performance XMPP server which aims to be known for its stability, simple configuration and low resource consumption.
jackal supports the following features:
- Customizable
- Enforced SSL/TLS
- Stream compression (zlib)
- Database connectivity for storing offline messages and user settings (BadgerDB, MySQL 5.7+, MariaDB 10.2+, PostgreSQL 9.5+)
- Cross-platform (OS X, Linux)
To start using jackal, install Go 1.13+ and run the following commands:
$ go get -d github.com/ortuman/jackal
$ cd $GOPATH/src/github.com/ortuman/jackal
$ make install
This will retrieve the code and install the jackal
server application into your $GOPATH/bin
path.
By default the application will try to read server configuration from /etc/jackal/jackal.yml
file, but alternatively you can specify a custom configuration path from command line.
$ jackal --config=$GOPATH/src/github.com/ortuman/jackal/example.jackal.yml
Grant right to a dedicated 'jackal' user (replace password
with your desired password).
echo "CREATE USER IF NOT EXISTS 'jackal'@'localhost' IDENTIFIED BY 'password';" | mysql -h localhost -u root -p
echo "GRANT ALL ON jackal.* TO 'jackal'@'localhost';" | mysql -h localhost -u root -p
Create 'jackal' database (using previously created password).
echo "CREATE DATABASE jackal;" | mysql -h localhost -u jackal -p
Download lastest version of the MySQL schema from jackal Github repository.
wget https://raw.githubusercontent.com/ortuman/jackal/master/sql/mysql.up.sql
Load database schema into the database.
mysql -h localhost -D jackal -u jackal -p < mysql.up.sql
Your database is now ready to connect with jackal.
Create a user and a database for that user:
CREATE ROLE jackal WITH LOGIN PASSWORD 'password';
CREATE DATABASE jackal;
GRANT ALL PRIVILEGES ON DATABASE jackal TO jackal;
Run the postgres script file to create database schema. In jackal's root directory run:
psql --user jackal --password -f sql/postgres.up.psql
Configure jackal to use PostgreSQL by editing the configuration file:
storage:
type: pgsql
pgsql:
host: 127.0.0.1:5432
user: jackal
password: password
database: jackal
That's it!
Support for XEP-0357: Push Notifications is not yet available in jackal
.
However there's a chance to forward offline messages to some external service by configuring offline module as follows:
mod_offline:
queue_size: 2500
gateway:
type: http
auth: a-secret-token-here
pass: http://127.0.0.1:6666
Each time a message is sent to an offline user a POST
http request to the pass
URL is made, using the specified Authorization
header and including the message stanza into the request body.
Set up jackal
in the cloud in under 5 minutes with zero knowledge of Golang or Linux shell using our jackal Docker image.
$ docker pull ortuman/jackal
$ docker run --name jackal -p 5222:5222 ortuman/jackal
- RFC 6120: XMPP CORE
- RFC 6121: XMPP IM
- RFC 7395: XMPP Subprotocol for WebSocket
- XEP-0004: Data Forms 2.9
- XEP-0012: Last Activity 2.0
- XEP-0030: Service Discovery 2.5rc3
- XEP-0049: Private XML Storage 1.2
- XEP-0054: vcard-temp 1.2
- XEP-0077: In-Band Registration 2.4
- XEP-0092: Software Version 1.1
- XEP-0138: Stream Compression 2.0
- XEP-0160: Best Practices for Handling Offline Messages 1.0.1
- XEP-0163: Personal Eventing Protocol 1.2.1
- XEP-0191: Blocking Command 1.3
- XEP-0199: XMPP Ping 2.0
- XEP-0220: Server Dialback 1.1.1
- XEP-0237: Roster Versioning 1.3
The jackal developer community is vital to improving jackal future releases.
Contributions of all kinds are welcome: reporting issues, updating documentation, fixing bugs, improving unit tests, sharing ideas, and any other tips that may help the jackal community.
Help us keep jackal open and inclusive. Please read and follow our Code of Conduct.
jackal is licensed under the GNU General Public License, Version 3.0. See LICENSE for the full license text.
If you have any suggestion or question:
Miguel Ángel Ortuño, JID: [email protected], email: [email protected]