Closed smarthome-enthusiast closed 2 months ago
should be the same process on doing it with normal (not headless) Kodi. have you got that working?
No. I haven't been able to. Maybe I'm missing something or there is a way to use the GUI with this container but the steps I have tried are:
Directory reads:
root@853:\~/.kodi/userdata# pwd /config/.kodi/userdata root@853:\~/.kodi/userdata# ls -aln total 76 drwxrwxr-x 1 1033 65536 362 Apr 1 18:45 . drwxrwxr-x 1 1033 65536 108 Mar 18 20:16 .. drwxrwxr-x 1 1033 65536 54 Mar 18 20:18 addon_data -rwxrwxr-x 1 1033 65536 4703 Apr 1 18:45 advancedsettings.xml ... drwxrwxr-x 1 1033 65536 0 Mar 14 08:47 Savestates -rwxrwxr-x 1 1033 65536 227 Apr 1 00:56 server.key -rwxrwxr-x 1 1033 65536 1509 Apr 1 00:56 server.pem ...
But it will load using HTTP.
ill have a play tonight and figure it out :) https was added with this PR: https://github.com/xbmc/xbmc/pull/13165/files
hang on, do you need to use a domain name for https? whats your cert for? a domain?
whats your cert for? a domain?
Yes my certificates are for a domain. To create a self signed certificate for testing, have a look at this
yes i know about certs. But your still accessing it via its IP in the screenshots Did you try using the domain name to access it?
Tried using both the domain name and IP.
ok. i think the issue is my docker container is just using libmicrohttpd-dev from ubuntu which i believe isnt compiled with https.
Kodi has a makefile to build it here: https://github.com/xbmc/xbmc/blob/master/tools/depends/target/libmicrohttpd/Makefile#L4 but think it skips that if it finds its own
So asking them how I can force it to build as I believe if I dont have libmicrohttpd-dev, it wont find it and then fail.
Okay, thanks. Will wait patiently.
after googling I found: https://lists.nongnu.org/archive/html/libmicrohttpd/2010-01/msg00005.html
openssl genrsa 1024 > server.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key server.key > server.pem
Copied the server.pem and server.key into userdata
then added to advancedsettings.xml
<services>
<webserverssl>true</webserverssl>
....
Restarted and I have https server
have updated the readme and also added some example files to the branches
then added to advancedsettings.xml
<services> <webserverssl>true</webserverssl> ....
Restarted and I have https server
That worked. Thank you.
Great :) so the missing thing for you was just the advanced setting? My issue was the cert I generated wasnt like by the server. Cant remember what options i was using. But once I switched to the above commands - it was happy
Yes. If you look back at my post with the directory list, the files and permissions were correct. The certificates were copied from and are used by other services without any issues so it wasn't the generation of them. The only thing I did differently was trying to do it through the Web-UI and later the guisettings.xml.
<services> <webserverssl>true</webserverssl> ....
I didn't think about using the guisettings.xml setting conversion on the advancedsettings wiki.
sorry for the late reply, I think it was. I didn't think about the guisettings.xml Setting Conversion section of the wiki. Just tried Web UI and guisettings.xml.
Is there a way to enable SSL for the web server?
I have already copied the certificate and key (PEM format, named server.pem and server.key respectively) to userdata folder and enabled it under Settings > Services > Control but I wouldn't be able to connect to the web server. Restarting the docker would get it to fallback to HTTP. I have also looked at guisettings.xml to enable it but same result.
Am I missing something? Any help would be appreciated.