I would like to use ojsxc integrated in nextcloud with mobilephones. In my nextcloud installation it works.
A user explained in topic Chat App for Nextcloud that I need an external XMPP server if I would like to use it with mobile phones. So, can I install my own XMPP server eg with openfire and configure it as an external XMPP server or do I have to use an external XMPP server in internet from eg a hoster ?
Thanks and best regards
You can use whatever XMPP server do you want. We recommend ejabberd/prosody and we also provide an authentication script for both servers: https://github.com/jsxc/xmpp-cloud-auth
Well: at present I installed ejabberd as well, so does it mean, I can configure ejabberd in order that cell phones can connect as well, right?
I’ll try the steps in your link.
But maybe one further question: how does the authentication with cell phone works later ? At start of eg xabber app on a android cell phone, it seems, that I have to log in with an email adress. At present I have no email server in my nextcloud installation. Does I need one ? Or is it just one way to log in to xmpp server ?
It’s maybe a good idea if you first inform yourself about XMPP, before you install a XMPP server . It’s no email Address its your jabber id (jid). Please read some guides about XMPP and how to setup your own server. Afterwards if you have further questions, I am glad to help you.
If you want you could also create a new entry about installation in our wiki.
Thanks for the link. I read and I’m reading some documentation. But in my opinion it is sometimes difficult to find the “right” documentation. There are a lot of documentation in www and after I see e-mail-address in xabber app in order to log in, I thought, I understand something wrong.
But well, maybe I see everything “clear” after your link;-)
We have recently created a step-by-step documentation for NC+HTTPS+XMPP. I hope it is helpful (and can be used as the “right” documentation).
That’s a very nice tutorial, will try to set up an eJabbered server next.
It looks a bit like Nextcloud is the exclusive registration backend then? Is it some how possible to use the same XMPP server also for other external apps like an Errbot ( http://errbot.io/ ) or some other fancy stuff like Movim ( http://movim.eu ) and allow non-nextcloud-registered users?
Also: how doe the XMPP user adress look like to external apps like an android XMPP client? Is it just the “Nextcloud username”@“nextcloud server address” or how does it work?
Nextcloud is the exclusive registration backend then? allow non-nextcloud-registered users?
Ejabberd allows stacked authentication, so you can use multiple authentication backends for one vhost (xmpp domain).
Is it some how possible to use the same XMPP server also for other external apps?
It works like every other xmpp server, so you should be good to go.
how does the XMPP user adress look like to external apps like an android XMPP client?
It’s “nextcloud uid”@“your xmpp domain”. Your xmpp domain can be different from your nextcloud domain. We recommend to use the same domain as for your e-mail address.
Thanks, that helps.
I had a closer look at the tutorial, but I am wondering if this can work on my setup: My Nextcloud instance runs on a shared host (with Apache), so I can not set up a sort of reverse proxy for the “http-bind” stuff as explained here:
https://github.com/jsxc/xmpp-cloud-auth/wiki/apache (unless there is a way to do it with a .htaccess file)
My ejabbered server runs on a VPS with a seperate SSL certificate, so I assume that is what that SSLproxyengine line is for? Is it not possible to just have it clearly as a separate server?
The alternative I am thinking about is to move the entire Nextcloud onto my VPS (but I would prefer not to), but how can those ‘proxy’ settings be done on NginX?
Thanks for helping out!
Ok the concerns about the http-bind were unfounded, you can just set up NginX on the XMPP server to redirect it and BOCH works.
However there seem to be some issues with the tutorial as I can’t get the external authentication to work (however I switched to Prosody, which has the disadvantage of currently not allowing stacked authentication, but is otherwise much easier to setup).
First off, I confirmed it working in general before configuring the external auth by connecting to an internal prosody user from the Nextcloud interface, so I am sure the Prosody server works fine.
The fist issue I ran into was that the tutorial does not explain that the user permissions also need to be set on the external_cloud.py as explained here: https://github.com/jsxc/xmpp-cloud-auth
I think this can be done by:
chown prosody:prosody -R /opt/xmpp-cloud-auth/
chmod u+x /opt/xmpp-cloud-auth/external_cloud.py
However even after doing this I can not log into Nextcloud as the connection seems to fail (connect without chat link works).
I also tried running the external_cloud.py directly from the server with ‘-A jane.doe example.com p4ssw0rd’ (obviously with my settings and user) and that gave me a SUCCESS message that the password is valid. (But also some debug message about “Could not decode token (maybe not a token?)” and ““POST /cloud/index.php/apps/ojsxc/ajax/externalApi.php HTTP/1.1” 200 None” but I guess that is normal as the external_cloud.py does not read the secret from the /etc/external_cloud.conf ?
It seems like I was able to resolve this by installing the dependency “lua-lpty”. Maybe I overlooked this but I don’t think this is mentioned anywhere in the tutorial or the xmpp-cloud-auth repo.