Custom DNS¶
By default JupyterHub will be available at the public IP address of the instance.
To set a custom DNS, e.g. jupyterhub.domain.com
, as the access point:
- In AWS configure a Elastic IP address to the EC2 instance
- Add a DNS
A record
from the subdomain to the Elastic IP - On the EC2 instance create a
/opt/jupyterhub/config/jupyterhub_dns
file and write the DNS
- Execute the
/usr/local/bin/jupyterhub-boot.sh
script.
Now you should be able to access http://jupyterhub.domain.com
and login as usual.
SSL¶
If you are planning to use HTTPS you need to enable it for the JupyterHub service:
- Create a file name:
/opt/jupyterhub/config/jupyterhub_https
- Restart the JuptyerHub service:
Additionally and depending on the desired DNS configuration you might need to configure SSL termination on the EC2 instance, see SSL.
You can also relax this options on the DNS services. For example on CloudFlare:
- The
Flexible
option encrypts traffic only between the browser and Cloudflare. So you don't need to enable SSL on the EC2 instance. - The
Full
andFull (strict)
configurations requires to configure SSL on the EC2 instance