A comprehensive Jupyter notebook environment with multi-language support including Java, Python, Dart, JavaScript/Typescript, and Zsh featuring JupyterHub for user authentication.
- JupyterHub as the core platform for multi-user support.
- Jupyter and JupyterLab as the primary interfaces.
- Java programming via the IJava kernel.
- Dart programming via the Dart Kernel kernel.
- JavaScript/Typescript programming via the tslab kernel.
- Zsh with Oh My Zsh as the default shell.
Ensure you have the following installed before starting:
- Docker (version 20.10 or later)
- Docker Compose (version 1.29 or later)
- Git (optional, for cloning the repository)
├── Dockerfile # Container build instructions
├── docker-compose.yml # Docker Compose configuration
├── nginx.conf # Nginx reverse proxy configuration
├── jupyterhub_config.py # JupyterHub configuration
├── data # Data volumes to persist data
└── ssl # SSL certificatesgit clone https://github.com/aminnez/jupyterbook.git
cd jupyterbook- Replace
example.comwith your desired domain innginx.conf. - Generate SSL certificates for the Nginx reverse proxy and place
fullchain.pemandprivkey.pemin thessldirectory.
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 \
-keyout ./ssl/privkey.pem \
-out ./ssl/fullchain.pem
#OR
acme.sh --install-cert -d example.com \
--key-file ./ssl/privkey.pem \
--fullchain-file ./ssl/fullchain.pem# Build and start the containers in detached mode
docker compose up -d
# View running containers
docker compose ps- URL:
http://localhost:8000(orhttps://example.comif using hosted one) - Supported Languages:
- Python (default)
- Java (via IJava kernel)
- Dart (via Dart Kernel)
- JavaScript/Typescript (via tslab kernel)
- Zsh (default shell)
-
Create Google OAuth Credentials:
- Go to the Google Cloud Console
- Create a new project or select an existing project
- Navigate to
APIs & Services>Credentials - Click
Create Credentials>OAuth client ID - Choose
Web applicationas the application type - Add your domain (e.g.,
https://example.com) to the Authorized JavaScript origins - Add
https://example.com/hub/oauth_callbackto the Authorized redirect URIs - Save the client ID and client secret
-
Set Environment Variables: Create a
.envfile in the project root with your Google OAuth credentials:GOOGLE_OAUTH_CLIENT_ID=your_client_id GOOGLE_OAUTH_CLIENT_SECRET=your_client_secret OAUTH_CALLBACK_URL=https://example.com/hub/oauth_callback
-
User Restrictions:
- Uncomment and modify the
admin_usersandallowed_userslines injupyterhub_config.pyto restrict access to specific users.
- Uncomment and modify the
To change the port, update the docker-compose.yml file as necessary.
-
Make changes to project files.
-
Rebuild the container:
docker compose down docker compose up -d --build
-
Permission Errors: Run with
sudoif encountering permission problems. -
Container Logs:
docker compose logs
- Change default authentication methods.
- Use environment variables for sensitive configurations.
- Regularly update base images and dependencies.
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Push to the branch.
- Create a Pull Request.
This project is licensed under the MIT License.
Copyright (c) 2025 Amin Nezampour
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software.
See the LICENSE.md file for complete license details.