Skip to content

Instantly share code, notes, and snippets.

@krzysztofantczak
Forked from legastero/prosody-setup.lua
Created October 27, 2015 12:02
Show Gist options
  • Save krzysztofantczak/ad8eb67c623ef01f81f3 to your computer and use it in GitHub Desktop.
Save krzysztofantczak/ad8eb67c623ef01f81f3 to your computer and use it in GitHub Desktop.
Set up a Prosody server to work with stanza.io/otalk (with websockets, mam, etc)
-- 1. apt-get install prosody-trunk
-- 2. Checkout prosody-modules on Google Code
-- 3. Move all modules to /usr/lib/prosody/modules
-- 4. Move the mod_smacks module to mod_smacks2 and copy it to mod_smacks3
-- 5. Move the files in mod_smacks* to match the new names
-- 6. In mod_smacks3/mod_smacks3.lua s/urn:xmpp:sm:2/urn:xmpp:sm:3/g
-- 7. Set the Prosody configuration to:
admins = { "ADMIN@HOST" }
daemonize = true
pidfile = "/var/run/prosody/prosody.pid"
modules_enabled = {
"roster";
"saslauth";
"tls";
"dialback";
"disco";
"private";
"vcard";
"privacy";
"smacks3";
"smacks2";
"carbons";
"mam";
"offline";
"version";
"register";
"uptime";
"time";
"ping";
"pep";
"posix";
"bosh";
"websocket";
}
allow_registration = false
authentication = "internal_hashed"
ssl = {
key = "/path/to/key";
certificate = "/path/to/cert";
}
c2s_require_encryption = true
s2s_secure_auth = true
cross_domain_bosh = true;
storage = "sql2"
sql = {driver = "SQLite3", database = "prosody.sqlite"}
log = {
info = "/var/log/prosody/prosody.log";
error = "/var/log/prosody/prosody.error";
}
VirtualHost "HOST"
VirtualHost "anon.HOST"
authentication = "anonymous"
Component "muc.HOST" "muc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment