Files
stellars-jupyterhub-ds/extra/traefik-host-based-routing

Traefik Host-Based Routing Template

Template for deploying stellars-jupyterhub-ds with local Traefik reverse proxy and self-signed certificates.

Quick Start

  1. Copy this folder to create a new deployment:

    cp -r extra/traefik-host-based-routing /path/to/<name>_stellars_jupyterhub_ds
    cd /path/to/<name>_stellars_jupyterhub_ds
    
  2. Generate certificates for your domain:

    ./generate-certs.sh yourdomain.example.com
    
  3. Create .env and set your hostname:

    cp .env.example .env
    # Edit .env: BASE_HOSTNAME=yourdomain.example.com
    
  4. Start:

    ./start.sh
    

Structure

<name>_stellars_jupyterhub_ds/
  compose_override.yml          # Local Traefik + JupyterHub config
  compose_cifs.yml              # Optional CIFS mount configuration
  start.sh                      # Clone/update + start services
  stop.sh                       # Stop services
  generate-certs.sh             # Certificate generation script
  install_cert.sh               # Linux certificate installer
  install_cert.bat              # Windows certificate installer
  .env.example                  # Example environment config
  certs/
    tls.yml                     # Traefik TLS configuration
    _.yourdomain.example.com/   # Generated wildcard cert
      cert.pem                  # Certificate (import to browser)
      key.pem                   # Private key
  stellars-jupyterhub-ds/       # Cloned repository (gitignored)

Configuration

Set BASE_HOSTNAME in .env for your domain. Edit compose_override.yml to customize:

  • Ports (default: 80/443)
  • Environment variables (idle culler, signup)
  • Network name

Optional CIFS Mount

To enable shared NAS storage for user containers:

  1. Edit compose_cifs.yml with your NAS credentials
  2. Create .env from .env.example:
    cp .env.example .env
    
  3. Set ENABLE_CIFS=1 in .env

Access

After deployment:

Certificate Installation

Import the self-signed certificate to your browser for trusted HTTPS:

Linux:

./install_cert.sh certs/_.yourdomain.example.com/

Windows:

install_cert.bat certs\_.yourdomain.example.com\

Commands

./start.sh             # Clone repo (if missing) + start services
./start.sh --refresh   # Pull latest upstream + start services
./stop.sh              # Stop all services

To view logs:

docker compose -f stellars-jupyterhub-ds/compose.yml -f compose_override.yml logs -f jupyterhub