Jot Server Config and SSL Questions
Hello,
I am setting up the Jot Server (config/config.json). My server uses the AutoSSL certificates provided by cPanel (powered by Sectigo) and i am satisfied with it.
Question #1:
Since the SSL certificates for my domains and the .crt and .key files are saved in the SSL folder related to the domain, which SSL certificate and .crt and .key file to use in the Jot Server config file (config/config.json)? Can I use a SSL certificate, a .crt and .key file of any of my domains, it doesn't matter? Or maybe there is a main (global) Certificate and a main *.crt and *.key file for the entire server? If so, where do I find them?
Question #2:
AutoSSL autoRenewes every 90 days generating new certificates, new .crt and .key files with completely different (new) filenames. It seems to me that there will always be an issue running the Jot Server with the AutoSSL certificates provided by cPanel. Every 3 months, one will have to manually edit the config/config.json for Jot server and enter the new certificate and new .crt and .key filenames otherwise the Jot Server and the Jot Messenger will stop working because of old keys and an expired certificate, right? This will be a big hassle. Please correct me if I am wrong. How to address this problem?
Many thanks
-
- · OneEagle
- ·
Hello, Please, any help?
-
-
·
Alexey
- ·
Hello!
My comments below:
Question #1: You can use any valid certificate from the server on which you've installed Jot Server. Usually we are using the same certificate which is installed for the domain, because you should add domain url as server's url to the Messenger settings.
Question #2: Yes, in your case you should edit config/config.json file manually every 90 days. Also I think it is not so hard to create small script which allows to update config.json file with new params every 90 days automatically. If you use forever plugin or something like that to run Jot Server, then Jot Server will be restarted automatically when any of the files defined as watchDirectory is changed.
-
·
Alexey
-
- · OneEagle
- ·
Hi Alexey, Thanks for your replly.
Question #1: I got it. Thank you.
Question #2: Well, that will be a big hassle editing config/config.json every 90 days. IMHO, I think you should have thought about AutoSSL users aswell when developing the Jot server and the Messenger App. AutoSSL comes standard with cPanel and WHM, it's pratical, automatic and free. It powers over 2 million websites worldwide.
We are not developpers and the small script you mentioned which allows to update config.json file with new params every 90 days automatically should have been a core feature of the Jot Server for Self-hosted UNA sites and AutoSSL users.
Is there any chance to see that small script as a core feature in the next Jot Server and messenger update?
Thanks
-
- · banister
- ·
This is a crucial thread! Many self-hosters discover that their Messenger suddenly quits. They naturally go to their (non-UNA) host for trouble-shooting. TMD, for example. The techs then waste time by trying different ports and concluding that it was a "Cloudflair problem."
It would be nice if detailed instructions could be provided for those in this category. 3 months comes around very quickly.
-
-
-
·
Alex T⚜️
- ·
As I see it's possible to write some script which will update path to certificate, there is a special event in cPanel which is called when certificate is updated and path to new certificates are passed as params, see documentation here:
-
·
Alex T⚜️
-
-
-
·
Alexey
-
·
In reply to OneEagle
- ·
Hello!
We will think over it.
-
·
Alexey
-
- · OneEagle
-
·
In reply to Alexey
- ·
Thank you so much Alexey
-
- · russj85
- ·
Hey Everyone, I was able to get the jot server setup in my on-premise ubuntu and have my una hosted on tmd, I am able to get the messaging page to pop up and show users but when they try to send a message it just says connecting at the bottom. Any ideas what I`m missing?
-
-
·
LeonidS
-
·
In reply to russj85
R
- ·
Hello russj85 !
If your JOT server is running then this trouble usually is connected with the closed port.
-
·
LeonidS
-
- · OneEagle
-
·
In reply to Alexey
- ·
Hi @Alexey . Any update on the script which will update the path to the certificate? Thanks
-
-
·
Alexey
-
·
In reply to OneEagle
- ·
Hello!
Sorry, we had no time yet to think over it. Problem is that it can not be universal for the all type of servers, as you can see from provide by AlexT instructions, this event is available only for cPanel & WHM version 72 or later. So,
your server should be checked first and script should be created according to your configuration. I will check how it can be implemented in UNA cloude first.
-
·
Alexey
-
- · OneEagle
-
·
In reply to Alexey
- ·
Alright, but I think that as in our case (Self-hosted UNA sites and AutoSSL users), most people use the latest cPanel and WHM version. We will be waiting for the results of your tests in UNA cloud. Thanks.
-
- · OneEagle
- ·
Hi @Alexey , My JOT server was working just fine with forever. Then it stopped because AutoSSL got renewed automatically and new .crt and .key files were generated. Unfortunately, I noticed it many days later. Now I have edited config,json with the new information (.crt and .key files) but still my Messenger doesn't work. It shows the 'Connecting.....' message.
Please, could you tell me which command line to use to restart the JOT Server? Or is there any other solution to fix this problem? Thanks
-
-
·
LeonidS
-
·
In reply to OneEagle
- ·
Hello @OneEagle !
In common case it should be following set of the commands, under your SSH account:
1) cd /opt/jot/
2) forever stop app.js
3) forever -w --watchDirectory=/var/cpanel/ssl/apache_tls/[your site URL] start app.js
It might have differences in every certain case.
-
·
LeonidS
-
- · OneEagle
- ·
Hi @LeonidS Thanks a lot for the reply. It works.
First I went to the Jot Server directory where the app,js file is located.
I run the command:
forever stop app.js
but I received this error:
Forever cannot find process with id: app.js
Then i checked the forever process using the command:
forever list
It returned this result:
No forever processes running
I understood that there was no process to stop.
Then I run this command (it's more direct than the one you gave me):
forever -w --watchDirectory=/home/xxxxx/ssl/certs/ start app.js
It worked, my Jot Server was resurrected. My Messenger was back too. Everything works fine now
Also the command: forever list now returns the app.js in its result.
Thanks a lot for the support. Hope this helps someone running into the same issue.
-
- · banister
- ·
@OneEagle. It's now more than 2 years later. Almost 3. Has your "watchDirectory" solution continued to work without regular interventionS?
Are you still with TMD hosting, if I may inquire?
-
- · OneEagle
-
·
In reply to banister
- ·
Hi @banister
I have stopped using the AutoSSL with Jot Server as it is just annoying and I installed a paid SSL certificate. Nope i have never been with TMD hosting.