Skip to content

Install

DTaaS logo DTaaS logo

This guide installs a secure, multi-user DTaaS deployment that uses an external GitLab instance for OAuth 2.0 authorisation.

Download dtaas-secure-server-xx.zip from the latest release / pre-release page.

For the full configuration reference, see config.md.

Overview

This package deploys DTaaS with Traefik, OAuth forward-auth and two user workspaces.

DTaaS on Server DTaaS on Server

A path such as /user1 is the URL route of that service, for example https://intocps.org/user1. The thick arrow is the forward-auth check: Traefik asks traefik-forward-auth to authorise each request before it routes it.

The docker-compose.yml starts the following services:

Service Purpose
traefik Reverse proxy with TLS termination
client DTaaS React frontend
logger-ms Logger microservice
user1 / user2 JupyterLab user workspaces
libms Library management microservice
traefik-forward-auth OAuth 2.0 authorisation middleware

Prerequisites

Requirement Details
Docker Engine v28 or later with Compose plugin
Domain name Public DNS name or server IP
TLS certificates fullchain.pem and privkey.pem for the target domain
OAuth provider External GitLab (gitlab.com or self-hosted GitLab)

Quick Start

1. Create Configuration Files

1
2
3
cp config/.env.example config/.env
cp config/conf.server.example config/conf.server
cp config/client.js.example config/client.js

Edit config/.env:

  • SERVER_DNS
  • USERNAME1
  • USERNAME2
  • OAUTH_URL
  • OAUTH_CLIENT_ID
  • OAUTH_CLIENT_SECRET
  • OAUTH_SECRET

Edit config/client.js:

  • REACT_APP_CLIENT_ID
  • REACT_APP_AUTH_AUTHORITY
  • REACT_APP_REDIRECT_URI
  • REACT_APP_LOGOUT_REDIRECT_URI

See config.md for details.

2. Create User Workspace Directories

1
2
3
cp -R files/template files/<USERNAME1>
cp -R files/template files/<USERNAME2>
sudo chown -R 1000:100 files/*

The logger microservice writes its events to logs/logger. Create the directory and give it to uid 1000, the user that runs the logger:

mkdir -p logs/logger
sudo chown -R 1000:1000 logs/logger

3. Add TLS Certificates

cp /path/to/fullchain.pem certs/fullchain.pem
cp /path/to/privkey.pem certs/privkey.pem

If the certificates are missing or invalid, Traefik falls back to self-signed certificates.

4. Configure OAuth 2.0 Applications in GitLab

  1. Create user accounts (see GitLab docs). The usernames must match USERNAME1/USERNAME2 in config/.env.

  2. Register two OAuth 2.0 applications in GitLab, in User Settings → Applications (signed in as root on a self hosted GitLab):

  3. DTaaS Client Authorization for the React SPA frontend. See the client auth docs.

  4. DTaaS Server Authorization for the Traefik forward-auth backend. See the server auth docs.

  5. Put the generated OAuth 2.0 credentials into the configuration files:

  6. Set REACT_APP_CLIENT_ID and REACT_APP_AUTH_AUTHORITY in config/client.js.
  7. Set OAUTH_URL, OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET in config/.env.

5. Start Services

docker compose --env-file config/.env up -d

6. Verify

URL Expected result
https://<SERVER_DNS> DTaaS web interface
https://<SERVER_DNS>/user1 User 1 workspace after sign-in
https://<SERVER_DNS>/user2 User 2 workspace after sign-in
https://<SERVER_DNS>/lib Library service

Stop

docker compose --env-file config/.env down

Directory Layout

.
| - certs/                 # TLS certificates (fullchain.pem, privkey.pem) |
| - config/                                                                |
|                                                                          |
|                                                                          |
|                                                                          |
|                                                                          |
|                                                                          |
|                                                                          |
| \- tls.yml            # Traefik TLS provider configuration               |
| - files/                                                                 |
|                                                                          |
| \- template/           # sample user workspace files                     |
| - logs/                                                                  |
| \- logger/             # Logger microservice events                      |
| - docker-compose.yml     # Service definitions                           |
| - CONFIG.md              # Detailed configuration reference              |
\- README.md              # This file