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

Add support for SSL Certificate provisioning via ZeroSSL #186

Merged
merged 2 commits into from
Dec 16, 2020

Conversation

gkrizek
Copy link
Contributor

@gkrizek gkrizek commented Dec 15, 2020

This PR Adds support for automatically provisioning SSL Certificates for Thunderhub from ZeroSSL.

Configuration

This adds three new fields to the .env file:

 PUBLIC_URL='app.example.com' # Publicly reachable domain name
 SSL_PORT=8080                # Port to serve the HTTP Validation server from. If not port 80 it will need to be proxied to port 80.
 SSL_SAVE=true                # Whether to save the provisioned SSL Certificate to disk to reuse after restart.

Also, when using the secure server, you must set NODE_ENV=production and also set your ZeroSSL API key with ZEROSSL_API_KEY=abc123

Start

$ npm run start:secure

Example Startup

$ NODE_ENV=production npm run start:secure

> thunderhub@0.11.0 start:secure /root/thunderhub
> node secure-server.js

Loaded env from /root/thunderhub/.env
=> [ssl] Generated CSR
=> [ssl] Requested certificate
=> [ssl] validation server started at http://0.0.0.0:80
=> [ssl] waiting for certificate to be issued
=> [ssl] checking certificate again...
=> [ssl] checking certificate again...
=> [ssl] checking certificate again...
=> [ssl] certificate was issued
=> [ssl] validation server stopped.

ready - started server on http://localhost:3000

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

Successfully merging this pull request may close these issues.

None yet

2 participants