tootorial on how to host xmpp server on i2p (not finished yet check back later)
requirements i2pd (might work with the java i2p's too) and prosody
dont follow this guide blindly read prosody and i2pd documentation
i2pd setup
make sure you have the socks proxy enabled in /etc/i2pd/i2pd.conf it should be enabled by default
edit /etc/i2pd/tunnels.conf add the following tunnels (if you dont want c2s, s2s or to use prosodys html server you can feel free to delete the entries for them)
[prosody-s2s] type=server host=127.0.0.1 port=5269 inport=5269 keys=prosody.dat [prosody-c2s] type=server host=127.0.0.1 port=5222 inport=5222 keys=prosody.dat [prosody-html] type=server host=127.0.0.1 port=5281 inport=5281 keys=prosody.dat
then go to the i2pd webconsoles i2p tunnel page, the b32 address will be your address, you can choose to register it in reg.i2p if you want a shortened address like kisu.i2p (if you have a eepsite already like i do you can choose to reuse the same keys)
prosody setup
you kinda need to read documentation for this as prosody configuration can be quite complex. i will provide basics for setting it up.
open up /etc/prosody/prosody.cfg.lua
note what path plugin_paths specifies, the default on gentoo is plugin_paths = { "/usr/lib64/prosody/modules", "/usr/lib64/prosody/community-modules" };
also check what the location for certificates is and what group prosody uses on gentoo this is "prosody" but on openbsd it is _prosody
you will need to download and place the mod_darknet.lua from https://github.com/majestrate/mod_darknet module inside of the folder specified.
i will just do:
sudo mkdir /usr/lib64/prosody/community-modules sudo wget -O /usr/lib64/prosody/community-modules/mod_darknet.lua https://raw.githubusercontent.com/majestrate/mod_darknet/refs/heads/master/mod_darknet.lua(this module is only needed for server to server (s2s))
to enable the module globally to all virtualhost just add it to the modules_enabled configution block, you also might want to enable other modules you can do so by uncommenting them, examples of these would be mam for message archiving, and s2s-bidi for bidirectional s2s
you also need to add the following to make i2p s2s work
s2s_secure_auth = false;mod_darknet modules default settings are
darknet_socks5_host = "127.0.0.1"; darknet_socks5_port = 4447; darknet_only = false; darknet_force_all = false;if you want to change these you should set the options at the global section of the prosody config
then to configure the virtualhosts, muc component and file upload component, you can use this skeleton i provided (you also might want to delete the "localhost" virtualhost (you can also use your shortened i2p url, but you also need to register the muc service if you want it accessible by others)
VirtualHost "xxx.b32.i2p"
Component "muc.xxx.b32.i2p" "muc"
-- darknet module needs to be enabled on the muc component seperately
modules_enabled = { "darknet", muc_mam" }
Component "upload.xxx.b32.i2p" "http_file_share"
modules_disabled = { "s2s" }
http_host = "xxx.b32.i2p:5281"
now we can generate our certs, to generate a cert for all three just do
openssl genrsa -out /etc/prosody/certs/xxx.b32.i2p.key 2048
openssl req -new -x509 -key /etc/prosody/certs/xxx.b32.i2p.key -out /etc/prosody/certs/xxx.b32.i2p.crt -days 3650 -subj "/CN=xxx.b32.i2p" -addext "subjectAltName=DNS:xxx.b32.i2p,DNS:*.xxx.b32.i2p"
chown root:prosody /etc/prosody/certs/*.b32.i2p.{key,crt}
chmod 640 /etc/prosody/certs/*.b32.i2p.{key,crt}
now everything should be done and you can create accounts with prosodyctl adduser user@xxx.b32.i2p, you can also add that user to the admin config block.
to use these accounts you need an xmpp client and the i2p proxy on gajim you add user press advanced options create a new http proxy, you might need to accept the self signed certificate.