For those concerned about their communications like me, you should consider to use a xmpp server on your own and invite your friends to chat in your server! it is simple and fast to configure one and all you need is a domain name and a server. It will take no more than 2 hours of your time and after that, a little maintenance and admin tasks (if you decide to not let people create their own account).
Here I'm posting a simple config file that really works in most Linux servers, by the way it was tested and is being working nicely with Debian x84 "Jessie".
For those that do not know what prosody is, here is their official website, please go and dive in to learn a little more!
https://prosody.im/
First `cp` your default file `/etc/prosody/prosody.cfg.lua` to `/etc/prosody/prosody.cfg.lua.bck`, then edit its content with the following code.. (if you do not want use mysql just remove the block, by default it will use files).
-- Prosody XMPP Server Configuration
------------------------------[ Server-wide settings ]------------------------------
-- Example: admins = { "user1@example.com", "user2@example.com" }
admins = {"name@mail.com"}
-- This is the list of modules Prosody will load on startup.
-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
-- Documentation on modules can be found at: http://prosody.im/doc/modules
plugin_paths = { "/usr/lib/prosody/modules/", "/usr/lib/prosody/modules_community/" }
modules_enabled = {
-- Core modules (alphabetical order) -- default location is "/usr/lib/prosody/modules"
"admin_adhoc"; -- Admin interfaces -- Allows administration via an XMPP client that supports ad-hoc commands
"admin_telnet"; -- Admin interfaces -- Opens telnet console interface on localhost port 5582
"announce"; -- Other specific functionality -- https://prosody.im/doc/modules/mod_announce
"bosh"; -- HTTP modules -- Enable BOSH clients, aka "Jabber over HTTP"
"dialback"; -- Generally required -- s2s dialback support
"disco"; -- Generally required -- Service discovery
"http"; -- HTTP modules -- https://prosody.im/doc/modules/mod_http
"pep"; -- Nice to have -- Enables users to publish their mood, activity, playing music and more
"ping"; -- Nice to have -- Replies to XMPP pings with pongs
"posix"; -- Generally required -- POSIX functionality, sends server to background, enables syslog, etc.
"private"; -- Not essential, but recommended -- Private XML storage (for room bookmarks, etc.)
"register"; -- Nice to have -- https://prosody.im/doc/modules/mod_register
"roster"; -- Generally required -- Allow users to have a roster. Recommended ;)
"saslauth"; -- Generally required -- Authentication for clients and servers. Recommended if you want to log in.
"time"; -- Nice to have -- Let others know the time here on this server
"tls"; -- Generally required -- Add support for secure TLS on c2s/s2s connections
"uptime"; -- Nice to have -- Report how long server has been running
"vcard"; -- Not essential, but recommended -- Allow users to set vCards
"version"; -- Nice to have -- Replies to server version requests
"watchregistrations"; -- Other specific functionality -- https://prosody.im/doc/modules/mod_watchregistrations
"welcome"; -- Other specific functionality -- Welcome users who register accounts
-- Community modules (alphabetical order) -- default location is "/usr/lib/prosody/modules_community"
"carbons"; -- https://modules.prosody.im/mod_carbons.html
"mam"; -- https://modules.prosody.im/mod_mam.html
};
-- These modules are auto-loaded, but should you want
-- to disable them then uncomment them here:
modules_disabled = {
-- "offline"; -- Store offline messages
-- "c2s"; -- Handle client connections
-- "s2s"; -- Handle server-to-server connections
};
-- Settings for "mod_register" -- https://prosody.im/doc/modules/mod_register
allow_registration = true -- Whether to allow registration of new accounts via Jabber clients
registration_blacklist = { } -- List of IP addresses to deny registration
registration_whitelist = { } -- List of IP addresses to allow registration (bypassing all throttling and limits)
whitelist_registration_only = false -- Whether to only allow IPs in registration_whitelist to register
min_seconds_between_registrations = 300 -- seconds a client at a particular IP address must wait before it can register again
registration_throttle_max = nil -- Defaults to 1 if min_seconds_between_registrations is set, otherwise unset. New in 0.10
registration_throttle_period = nil -- Defaults to the same value as min_seconds_between_registrations. New in 0.10
registration_throttle_cache_size = 100 -- How many IP addresses to keep track of for throttling. New in 0.10
blacklist_on_registration_throttle_overload = false -- Determines behavior if the above cache overflows. If true and the IP is still over the limit, add it to the registration blacklist. New in version 0.10.
registration_notification = "User $username just registered on $host from $ip"
-- Settings for "mod_welcome" -- https://prosody.im/doc/modules/mod_welcome
welcome_message = "Welcome $username - please take a look at https://yourdomain/xmpp-im/ for further information about this IM."
-- Settings for COMMUNITY MODS (alphabetical order)
-- Settings for "http_upload" -- https://modules.prosody.im/mod_http_upload.html
http_upload_path = "/var/lib/prosody/http_upload/"
http_upload_file_size_limit = 2097152 -- bytes
-- Settings for "mod_mam" -- https://modules.prosody.im/mod_mam.html
-- Storage backend
storage = {
archive = "sql";
}
-- Query size limits
max_archive_query_results = 20;
-- Archive expiry
archive_expires_after = "2m" -- two months or ("1d" one day; one week; the default; 60 * 60 one hour; "never" forever)
-- Message matching policy
-- default_archive_policy = false -- stores no messages
-- default_archive_policy = "roster" -- stores messages to/from contacts in the users roster
default_archive_policy = true -- stores all messages. This is the default.
-- Settings for "mod_mam_muc" -- https://modules.prosody.im/mod_mam_muc.html
muc_log_by_default = true; -- Enable logging by default (can be disabled in room config)
muc_log_all_rooms = false; -- set to true to force logging of all rooms
max_archive_query_results = 20; -- "20" is the largest number of messages that are allowed to be retrieved in one MAM request.
max_history_messages = 5; -- "1000" is the largest number of messages that are allowed to be retrieved when joining a room.
-- Settings for "mod_smacks" -- https://modules.prosody.im/mod_smacks.html
smacks_hibernation_time = 300 -- The number of seconds a disconnected session should stay alive for (to allow reconnect)
smacks_enabled_s2s = false -- Enable Stream Management on server connections? Experimental
smacks_max_unacked_stanzas = 0 -- How many stanzas to send before requesting acknowledgement
smacks_max_ack_delay = 60 -- The number of seconds an ack must be unanswered to trigger an "smacks-ack-delayed" event
------------------------------[ Non-module related Prosody settings ]------------------------------
-- These are the SSL/TLS-related settings. If you don't want
-- to use SSL/TLS, you may comment or remove this
ssl = {
key = "/etc/prosody/certs/your-key.key";
certificate = "/etc/prosody/certs/your-cert.crt";
}
-- Force clients to use encrypted connections? This option will
-- prevent clients from authenticating unless they are using encryption.
c2s_require_encryption = true
-- Force certificate authentication for server-to-server connections?
-- This provides ideal security, but requires servers you communicate
-- with to support encryption AND present valid, trusted certificates.
-- NOTE: Your version of LuaSec must support certificate verification!
-- For more information see http://prosody.im/doc/s2s#security
s2s_secure_auth = true
-- Many servers don't support encryption or have invalid or self-signed
-- certificates. You can list domains here that will not be required to
-- authenticate using certificates. They will be authenticated using DNS.
-- s2s_secure_domains = { "jabber.org" }
-- Required for init scripts and prosodyctl
pidfile = "/var/run/prosody/prosody.pid"
-- Select the authentication backend to use. The 'internal' providers
-- use Prosody's configured data storage to store the authentication data.
-- To allow Prosody to offer secure authentication mechanisms to clients, the
-- default provider stores passwords in plaintext. If you do not trust your
-- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
-- for information about using the hashed backend.
authentication = "internal_hashed"
-- Select the storage backend to use. By default Prosody uses flat files
-- in its configured data directory, but it also supports more backends
-- through modules. An "sql" backend is included by default, but requires
-- additional dependencies. See http://prosody.im/doc/storage for more info.
-- storage = "sql" -- Default is "internal" (Debian: "sql" requires one of the
-- lua-dbi-sqlite3, lua-dbi-mysql or lua-dbi-postgresql packages to work)
-- For the "sql" backend, you can uncomment *one* of the below to configure:
-- sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
sql = {
driver = "MySQL", database = "prosody", username = "prosody", password = "*******", host = "localhost"
}
-- Logging configuration
-- For advanced logging see http://prosody.im/doc/logging
log = {
info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
error = "/var/log/prosody/prosody.err";
"*syslog";
}
------------------------------[ Virtual hosts ]------------------------------
-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
-- Settings under each VirtualHost entry apply *only* to that host.
VirtualHost "your-domain.tld"
-- Assign this host a certificate for TLS, otherwise it would use the one
-- set in the global section (if any).
-- Note that old-style SSL on port 5223 only supports one certificate, and will always
-- use the global one.
ssl = {
key = "/etc/prosody/certs/your-key.key";
certificate = "/etc/prosody/certs/your-cert.crt";
}
------------------------------[ Components ]------------------------------
-- You can specify components to add hosts that provide special services,
-- like multi-user conferences, and transports.
-- For more information on components, see http://prosody.im/doc/components
-- Set up a MUC (multi-user chat) room server on conference.example.com:
Component "conference.your-domain.tld" "muc"
name = "Your Domain chatrooms server - check https://your-domain.tld/xmpp-im/ for further information."
--max_history_messages = 5
--modules_enabled = {
-- "mam_muc"; -- https://modules.prosody.im/mod_mam_muc.html
--}
-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
-- Component "proxy.example.com" "proxy65"
-- Set up an external component (default component port is 5347)
--
-- External components allow adding various services, such as gateways/
-- transports to other networks like ICQ, MSN and Yahoo. For more info
-- see: http://prosody.im/doc/components#adding_an_external_component
--
-- Component "gateway.example.com"
-- component_secret = "password"
Now that you have your configuration file in place, you have to connect to your server using any IM client (before see, prosody website how to create new user in the server), I'm using Gajim, it is pretty easy to setup a connection and create new users, access chat rooms, etc.. but you can use any IM client of your choice.
By default it connects on port 5222.
That's all folks!