An XMPP server written in Go (Golang).
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github refactorized config. May 7, 2018
app minor changes Jan 14, 2019
auth Small corrections (#72) Jan 23, 2019
c2s fixed S2S module iq routing. Jan 23, 2019
cluster Added cluster mode support Jan 2, 2019
component Added cluster mode support Jan 2, 2019
errors added built-in graceful shutdown support Nov 3, 2018
log Added cluster mode support Jan 2, 2019
model Added cluster mode support Jan 2, 2019
module fixed S2S module iq routing. Jan 23, 2019
pool module: minor changes. Apr 5, 2018
router fixed S2S module iq routing. Jan 23, 2019
s2s fixed S2S module iq routing. Jan 23, 2019
session fixed Gajim client connecting issue Jan 19, 2019
sql New PostgreSQL implementation (#68) Jan 16, 2019
storage updated version number. Jan 16, 2019
stream fixed S2S module iq routing. Jan 23, 2019
testdata New PostgreSQL implementation (#68) Jan 16, 2019
transport Added cluster mode support Jan 2, 2019
util added built-in graceful shutdown support Nov 3, 2018
version fixed S2S module iq routing. Jan 23, 2019
xmpp fixed S2S module iq routing. Jan 23, 2019
.gitignore run go mod tidy and add back go.sum Nov 10, 2018
.travis.yml added Makefile fmt option Jan 2, 2019
CHANGELOG.md fixed S2S module iq routing. Jan 23, 2019
CODE_OF_CONDUCT.md Added 'code of conduct' Jan 2, 2019
CONTRIBUTORS Update CONTRIBUTORS Apr 17, 2018
Dockerfile strip the debugging information Jan 2, 2019
LICENSE Update LICENSE Jun 27, 2018
Makefile added Makefile fmt option Jan 2, 2019
README.md Update README.md Jan 16, 2019
docker.jackal.yml added SCRAM-SHA-512 support. Jan 22, 2019
example.jackal.yml added SCRAM-SHA-512 support. Jan 22, 2019
go.mod New PostgreSQL implementation (#68) Jan 16, 2019
go.sum go mod tidy Jan 7, 2019
main.go minor changes in app. Nov 10, 2018

README.md

jackal

An XMPP server written in Go.

Build Status GoDoc Test Coverage Maintainability Codacy Badge Go Report Card License Docker Pulls Join the chat at https://gitter.im/jackal-im/jackal

About

jackal is a free, open-source, high performance XMPP server which aims to be known for its stability, simple configuration and low resource consumption.

Features

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)

Installing

Getting Started

To start using jackal, install Go 1.11+ 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

MySQL database creation

Grant right to a dedicated 'jackal' user (replace password with your desired password).

echo "GRANT ALL ON jackal.* TO 'jackal'@'localhost' IDENTIFIED BY 'password';" | 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.sql

Load database schema into the database.

mysql -h localhost -D jackal -u jackal -p < mysql.sql

Your database is now ready to connect with jackal.

Using PostgreSQL

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!

Cluster configuration

The purpose of clustering is to be able to use several servers for fault-tolerance and scalability.

To run jackal in clustering mode make sure to add a cluster section configuration in each of the cluster nodes.

Here is an example of how this section should look like:

cluster:
  name: node1                             
  port: 5010                              
  hosts: [node2:5010, node3:5010] 

Do not forget to include all cluster nodes, excluding the local one, in the hosts array field. Otherwise the expected behavior will be undefined.

Run jackal in Docker

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

Supported Specifications

Join and Contribute

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.

Code of Conduct

Help us keep jackal open and inclusive. Please read and follow our Code of Conduct.

Licensing

jackal is licensed under the GNU General Public License, Version 3.0. See LICENSE for the full license text.

Contact

If you have any suggestion or question:

Miguel Ángel Ortuño, JID: ortuman@jackal.im, email: ortuman@pm.me