Ai2 app ssl connection in redis labs?

I must login as root? And then... "sudo su" and then ... "sudo cat /etc/letsencrypt/live/solitary.co.za/fullchain.pem /etc/letsencrypt/live/solitary.co.za/privkey.pem > /etc/stunnel/private.pem" ?
"sudo" command as root is not necessary, I understood and what "sudo su" is...
...i am confused?

Let us assume you are logged into your server and have a command prompt.

Type

sudo su

you will probably be asked for your password, then returned to a new command line prompt for the root user.

Execute the commands you need at this command line.

When finished, type exit to return to your user's command prompt.

I did it and then i started stunnel with command "sudo /etc/init.d/stunnel4 start", but app still not working...

To test that all is well with redis, run the redis-cli and ping the server. you should get a PONG back. Type quit to quit back to the command line.

redis-cli -a <your password>

input/output:
#~~~~~~~~~~~~~~~~~~~~~~

127.0.0.1:6379>ping

PONG #response

127.0.0.1:6379>quit

#~~~~~~~~~~~~~~~~~~~~~~

it's working, but /etc/stunnel/private.pem is empty...

I watched it with the command sudo nano /etc/stunnel/ptivate.pem

Well sounds like you need to go sudo su and run that command again to add the two certs together and place them in /etc/stunnel/private.pem

In /etc/letsencrypt/live/solitary.co.za/fullchain.pem is certificate 2 x ...
in sudo nano /etc/letsencrypt/live/solitary.co.za/privkey.pem is private key 1 x ...
and i did it again, but /etc/stunnel/private.pem is still empty...

You have to combine everything in fullchain.pem and privkey.pem to one file, private.pem, so that stunnel gets all the keys needed to interact with App Inventor

Do i have to do it manually? Does the order matter? And whether the cert must be double?

There are not double certificate but they are diferent certificates...

Could it be that the first certificate was generated with that wrong ip and should be deleted and the second is with the correct ip?

I have two certificates in my working fullchain.pem and one in my privkey.pem. You need to combine the two files into one called private.pem and this must be in the /etc/stunnel directory.

sudo cat /etc/letsencrypt/live/<your domain name>/fullchain.pem /etc/letsencrypt/live/<your domain name>/privkey.pem > /etc/stunnel/private.pem

make sure you have the syntax correct, and that you are actually running the command as root user

Once you have created private.pem successfully, remember to restart stunnel.

I don't understand at all, I deleted /etc/stunnel/private.pem
at all and I went with sudo su as root and entered the combine command ...
... after that for checking I opened the re-created /etc/stunnel/private.pem and there was everything there ...
... I restarted the stunnel and tested with the app, it still doesn't work ...

If you have followed everything in my guide, you should be able to restart your server which will bring everything back up and working. Worth a try...

Otherwise, you will need to work back through the guide, checking and testing all the elements. it sound like you are nearly there...

Restart redis or restart droplet? What this command could be?

droplet.

To restart ubuntu I use:

sudo reboot

or

sudo shutdown -r now

Thanks a lot, everything works now, thanks again and happy new year!

Yay !!

thumbsup2

When i update my server, ei received this:

where are mistakes and how to fix them?

Did you read the manpage for apt-secure? This should provide the info you need to enable the ppa for updating ?

Hi there,

Redis access is via a port. As a rule, all ports except http are blocked in many home networks.
My app therefore often fails because there is no internet connection.

Is there a way to set Redis to Http / Port 80?