Author Topic: Advanced: Roll your own XMPP Server with your own stuff at home.  (Read 8436 times)

TahquitzII

  • Underling
  • *
  • Posts: 8
  • Still a Useless Idiot
    • Original Titan Profile (My first account was borked.)
« Last Edit: January 13, 2016, 02:59:08 AM by TahquitzII »
Account inactive: was unable to login from September 2015-January 2016.

FloatingFatMan

  • An Offal
  • Elite Boss
  • *****
  • Posts: 1,178
  • Kheldian's Forever!
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #1 on: January 13, 2016, 05:37:58 PM »
Although it's fun to roll your own.... Honestly, I don't think our community is large enough that we want to split it further...

Tahquitz

  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,865
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #2 on: January 16, 2016, 04:36:58 AM »
Part of what I was trying to share: for laypeople, using chat.cohtitan.com is easier.  This isn't exactly something you'd want to do just to be able to chat in a "private room".

Which explains my Zeroth Step: I didn't create an XMPP server just for Paragon Chat.  One of my family members distrusts Social Media, including Facebook, Hangouts, Twitter, etc. and this is a way for me to keep in touch with them without involving the whole Internet. (In the OP, I didn't mention in this how to set up TLS Certificates for encryption.  On my server, I certainly did.) 

I enabled the modules I did to get Paragon Chat to work, but I didn't have to do it for my solution to function.  In fact, I find it amusing map-diving into the places I've never seen in the game (I didn't play CoV a whole lot, my biggest regret with the game) while chatting with them unaware (and stuck with Xabber with no idea what I'm doing on my end.) 

Splitting away from Titan Network would presume that chat.cohtitan.com has no value to me.  As the Grand Central Station to Paragon Chat, it most certainly does: I am still able to sign into there even after doing this, I retain all of my costumes and characters between multiple XMPP signins, and I'm still meeting new people as they land in Atlas Park going "Whoa!" after logging in for the first time. :D (Plus I can switch off: put my sibling on Miranda NG, while in Paragon Chat under chat.cohtitan.com.)

As for the private server: yeah, it's a lot of work to make a sibling happy, but so far it's doing pretty well, and it cost me about 5 hours (the same time I'd have spent on a hand made Christmas Gift that they'd marginally appreciate and let collect dust in an attic).
"Work is love made visible." -- Khalil Gibran

Tahquitz

  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,865
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #3 on: January 16, 2016, 04:43:13 AM »
Regarding TLS Certificates, Lee Hutchinson from Ars Technica made a video on his setup of Prosody IM Server on Ubuntu, and offers an overview of the process.  http://arstechnica.com/information-technology/2014/03/how-to-set-up-your-own-private-instant-messaging-server/
"Work is love made visible." -- Khalil Gibran

Acanous

  • Beef Ingot
  • Lieutenant
  • ***
  • Posts: 71
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #4 on: February 22, 2016, 10:19:53 AM »
This'd be great info to have in the case where (knock on wood) Paragon Chat ever got into trouble. You've done the final step and made PC unkillable. Good job.

Leandro

  • Elite Boss
  • *****
  • Posts: 310
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #5 on: February 23, 2016, 04:05:00 AM »
There's no need for anyone to set up a new XMPP server in that case; any standards-compliant XMPP server will work, and there are tons on the Internet.

Even servers that aren't exactly compliant will work in a pinch. If you want to try something hilarious, use your Google account to log into Paragon Chat: your Google contacts will show up on your Global friends and you will be able to send and receive tells as private messages. Unfortunately, the Google XMPP server does not support public chatrooms, so zone chat and coordinates transfer doesn't work.

Tahquitz

  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,865
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #6 on: March 28, 2016, 07:46:26 AM »
This'd be great info to have in the case where (knock on wood) Paragon Chat ever got into trouble. You've done the final step and made PC unkillable. Good job.

Flattered, but the real heroes are those who made PChat.  People like me tinker with stuff until it does what they want it to do, but I'm most certainly not a developer in any regard.  SCoRE did the real work.  I'm a hack.

I'm just writing instructions on something I presumed that they don't have the time to document (but could obviously do anyway, otherwise we wouldn't be using PChat.)  Some of them might be peeved I did write this like FloatingFatMan suggested since doing this has the potential to make private servers for cliques when the user count on Paragon Chat's main server is fairly low most days.  Which is probably why it wasn't posted on here.

The tinkering I'm trying to figure out now (the hard way) is to get Jingle Nodes working on ejabberd.  Not for Paragon Chat, as CoH had no voice chat faculties in the first place: this is to support voice calling in XMPP clients elsewhere (plenty of clients support voice chat, I'm using AstraChat on Android primarily).  If I can get this to work, I can stop using a private Ventrilo server and host voice chat myself as well. 

This is documented in OpenFire, but in ejabberd there is virtually no info on the use of Jingle Nodes past the RFC Specification.  But I like a challenge. :D
"Work is love made visible." -- Khalil Gibran

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #7 on: March 28, 2016, 04:32:12 PM »
Some of them might be peeved I did write this like FloatingFatMan suggested since doing this has the potential to make private servers for cliques when the user count on Paragon Chat's main server is fairly low most days.  Which is probably why it wasn't posted on here.

No, I can't think of why anyone would be peeved. The FAQ even mentions it in the "Can I run my own server?" "Yes!" section. Explicit instructions are not given, as running an XMPP server is something you should only do if you know what you're doing (or are willing to learn as you set it up). That and there are a number of different software packages that could be used.

And, honestly, there are better ways that developer time can be spent than writing guides. Community members picking up the slack there to figure out and document how to do things is one way to help.

Paragon Chat's ability to connect to other servers is not there by accident.

FloatingFatMan

  • An Offal
  • Elite Boss
  • *****
  • Posts: 1,178
  • Kheldian's Forever!
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #8 on: March 28, 2016, 08:36:46 PM »
Some of them might be peeved I did write this like FloatingFatMan suggested since doing this has the potential to make private servers for cliques when the user count on Paragon Chat's main server is fairly low most days.

Not sure where you got peeved from. At no point in my post did I say I was peeved, just that the community is already rather small.

Tahquitz

  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,865
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #9 on: March 30, 2016, 05:26:13 AM »
FFM: I did not intend to imply that you felt that way at all. My apologies.
CW: My tendency is to float toward the negative in a vacuum, as I'm sure others on here do as well.  Also my apologies, I didn't intend to call SCoRE out as you're all probably busy.

And this is why you won't see me on social networking anywhere or anytime in the near future.  In practice concerning the Internet, I'm better off as a reader than a participant.  As a "reformed troll", my words get me in too much trouble, so I won't reply any further unless I have something more to add to this write up.
"Work is love made visible." -- Khalil Gibran

GammaPaladin

  • Underling
  • *
  • Posts: 5
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #10 on: April 03, 2016, 03:02:12 AM »
I already run an XMPP server on a VPS anyway, what I was hoping this thread would tell me is how to tell Paragon Chat to connect to my server instead of the default. The rest is (Obviously) stuff I already know.

I mean, I can create a fake DNS translation for the default server's domain if I have to, the hosts file is handy and all, but it seems a bit extreme. A config file for Paragon Chat that had it connect to a different server address would be nice, but none of the config files in %appdata%\Paragon Chat\Config seem to have anything to do with it, so I'm assuming it's hardcoded or something?

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #11 on: April 03, 2016, 04:14:33 AM »
It just uses whatever you put after the @ sign in the JID on the login screen. If you type someuser@somedomain.net it will:

1. Try to look up an XMPP SRV record for somedomain.net (_xmpp-client._tcp.somedomain.net). If one exists, it will connect to the server specified in the SRV record.

2. Try to connect to 'somedomain.net' directly (by doing an A record lookup) on port 5222.

If the JIDs in use by your server are for a domain that doesn't actually have DNS pointing at the xmpp server, you'll probably have to set up a hosts file entry for somedomain.net. The other option is to use offline mode (run with -offline command-line parameter) and the /xmppsetjid, /xmppsetpassword, /xmppsetserver, and /xmppconnect commands. That's a pretty big pain in the butt so I'd just do the hosts file entry if for some reason you can't set up proper DNS records.

If you're running the server on a nonstandard port, paragon chat does support putting the port number in the login box, in the form of someuser@somedomain.net:12345

GammaPaladin

  • Underling
  • *
  • Posts: 5
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #12 on: April 03, 2016, 08:30:08 AM »
Ah. That makes sense. I was just using my bare username to log in, hadn't thought to try a qualified JID.

Tahquitz

  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,865
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #13 on: September 25, 2016, 06:24:28 PM »
A quick update.  I'll need to rewrite this guide.

Ejabberd has a key flaw that is a gamestopper with Paragon Chat.  Since the 1.0 release, one of the updates needs a MUC named paragon.chat.(Insert Server Here).  But Ejabberd has conference.chat.(Insert Server Here) hardcoded into the server.  There's a config option to change it, but if you do, the database loses sync and the server stops all MUC use with 503 Forbidden errors until you flush the database and rename the server back after a reinstall.

For that reason, I can't recommend the use of Ejabberd any longer.  I've bitten the Java bullet and switched to OpenFire.  I'll change the above guide for new installation instructions.
"Work is love made visible." -- Khalil Gibran

Codewalker

  • Hero of the City
  • Titan Network Admin
  • Elite Boss
  • *****
  • Posts: 2,740
  • Moar Dots!
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #14 on: September 25, 2016, 09:39:05 PM »
You may need to check your server config. Paragon Chat itself uses service discovery to locate the default MUC; it doesn't assume any particular name. I just double checked and there aren't any instances of "paragon.chat" anywhere in the XMPP code -- the only reason it connects to that on Titan's Openfire is that's what the MUC there happens to be named.

The local server I use for testing has the MUC set to the default "conference" name and it works fine. That's Openfire as well though, so it might be a service discovery issue with ejabberd.

Tahquitz

  • Titan Staff
  • Elite Boss
  • ****
  • Posts: 1,865
Re: Advanced: Roll your own XMPP Server with your own stuff at home.
« Reply #15 on: September 25, 2016, 10:05:19 PM »
It was quicksand for me.  Once the database went corrupt, I ended up erasing everything to start from scratch (Uninstall server, head to %APPDATA%\Roaming\ejabberd and torch all of that, reinstall...) And I kept getting errors in Paragon Chat about malformed headings and each login couldn't see anyone else again.  Every channel I tried to make said "You are already in testchannel!" but I couldn't open it, leave the channel, or get the tells. 

Tried rolling back to old ejabberd that I knew worked.  Same issues.

OpenFire is much easier to use... things that had me stopping and restarting ejabberd constantly could be done in OpenFire in seconds from the web admin page.  Ejabberd expects the admin to use command line or XMPP clients to do admin tasks for the most part so the web interface was mostly read only.  Things that would kill ejabberd and require a reinstall like removing a user account or changing MUC room permissions takes less time overall.
"Work is love made visible." -- Khalil Gibran