Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voila over HTTPS/TLS #550

Open
christandlg opened this issue Mar 5, 2020 · 4 comments
Open

Voila over HTTPS/TLS #550

christandlg opened this issue Mar 5, 2020 · 4 comments

Comments

@christandlg
Copy link

I'm running Voila to serve notebooks created with JupyterHub. I tried to pass ssl_options to Tornado by running Voila with the arguments --Voila.tornado_settings='{"headers":{"Content-Security-Policy":"frame-ancestors *:*;" }, "ssl_options":{"certfile":"/etc/ssl/certs/my.pem", "keyfile":"/etc/ssl/private/my.key"}}' but Voila is still served over HTTP only (browsing to http://myhost:8866 works but is not encrypted, browsing to https://myhost:8866 just times out). Both the certificate and key file are readable by the user that runs voila.
I am not using Jupyter Notebook, so I'm afraid the solution in #508 does not work for me.

@christandlg
Copy link
Author

If this is not possible yet, I'd like to request this as a feature.

@abalbekov
Copy link

abalbekov commented Oct 7, 2020

I was able to get Voila serve over https by editing ...\lib\site-packages\voila\app.py

-- replace:
self.app.listen(port)
-- with:
self.app.listen(port, ssl_options={'certfile':'path-to-cert\cert.pem', 'keyfile':'path-to-key\key.pem'} )

-- and replace:
proto = 'http'
-- with:
proto = 'https'

I am using voila version 0.2.3 as standalone application.

@jtpio
Copy link
Member

jtpio commented Dec 23, 2020

It might have been mentioned in another issue, but this might be addressed in a more streamlined and easier manner when Voila switches to using the Jupyter Server ExtensionApp: #592

@santamm
Copy link

santamm commented Mar 30, 2021

@abalbekov that actually worked! The only problem I got is that Chrome does not trust the certificate issued by letsencrypt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants