H5P plugin for Tutor
This plugin integrates H5P interactive content into Open edX by installing the h5pxblock XBlock into the LMS.
Beyond the XBlock itself, the plugin handles the additional configuration required to make H5P work correctly in Kubernetes environments where S3 is the storage backend: it rewrites H5P media URLs to go through the LMS host instead of hitting the S3 bucket directly, avoiding CORS and CSRF embedding issues that arise when browser requests cross from the LMS domain to the S3 domain. Both path-style and virtual-hosted (bucket-style) S3 URL formats are supported.
How it works
When S3 storage is configured, the plugin applies two changes:
LMS Django settings — H5PXBLOCK_STORAGE is configured to use S3Boto3Storage with custom_domain set to LMS_HOST. This causes the XBlock to generate media URLs that point to the LMS host instead of the S3 bucket.
Caddy reverse proxy — A /h5pxblockmedia/* route is added to the LMS Caddy configuration. Requests that arrive at this path are rewritten and proxied transparently to the S3 backend. The rewrite logic depends on the configured URL style:
Virtual-hosted style (default) — the bucket name is used as a subdomain of the S3 host (e.g. mybucket.s3.us-east-1.amazonaws.com).
Path style — the bucket name is prepended as a path segment (e.g. s3.us-east-1.amazonaws.com/mybucket).
Requirements
Tutor >= 22.0 (Verawood)
For S3 storage: tutor-contrib-s3 must be installed and properly configured before enabling this plugin.
Installation
pip install tutor-contrib-h5p
Usage
Enable the plugin and apply the configuration:
tutor plugins enable h5p
Then rebuild the Open edX image and restart your environment:
tutor images build openedx
tutor local launch # or: tutor k8s start
Configuration
All settings can be changed with tutor config save --set H5P_<KEY>=<value>.
Setting |
Default |
Description |
|---|---|---|
H5P_BUCKET |
S3_STORAGE_BUCKET |
S3 bucket that stores H5P media files. Defaults to the value of S3_STORAGE_BUCKET set by tutor-contrib-s3. |
H5P_ENDPOINT |
(empty) |
Custom S3-compatible endpoint hostname (e.g. minio.example.com). When empty, the plugin falls back to S3_HOST / S3_PORT from tutor-contrib-s3 or constructs the standard AWS endpoint from S3_REGION. |
H5P_URL_STYLE |
virtual |
S3 URL style. Use virtual for bucket-as-subdomain (bucket.host/key) or path for bucket-as-path (host/bucket/key). |
H5P_USE_SSL |
true |
Whether to use HTTPS when proxying requests to S3. |
H5P_PATH |
(empty) |
Optional key prefix inside the bucket where H5P files are stored. |
H5P_BACKEND_VERSION |
0.2.18 |
Version of h5p-xblock installed in the Open edX image. |
S3 URL style examples
Given bucket mybucket, region us-east-1, and a media key h5pxblockmedia/course/file.h5p:
Virtual-hosted style (H5P_URL_STYLE=virtual, default):
Proxy target: https://mybucket.s3.us-east-1.amazonaws.com/h5pxblockmedia/course/file.h5p
Path style (H5P_URL_STYLE=path):
Proxy target: https://s3.us-east-1.amazonaws.com/mybucket/h5pxblockmedia/course/file.h5p
License
This software is licensed under the terms of the AGPLv3.
Release files for tutor-contrib-h5p 22.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tutor_contrib_h5p-22.0.0.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tutor_contrib_h5p-22.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / tutor_contrib_h5p-22.0.0.tar.gz
| Download URL | tutor_contrib_h5p-22.0.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57880d834c58558b8acfc121153ce2f39180483a45efe9ca968ddc84e88b4616
|
|
BLAKE2b-256 checksum How to use checksums |
2a9a2fa00c5ce2ca955d425552953cbd894b66973c2bf8b5a78cb161d6f38e1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / tutor_contrib_h5p-22.0.0-py3-none-any.whl
| Download URL | tutor_contrib_h5p-22.0.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7cdeee65048acde9e501cba1421d0fe219fd6d7022f8d77b8893f21a87e29006
|
|
BLAKE2b-256 checksum How to use checksums |
b5b39e1aeaaf7d851cfb1d307e4f7be2a05a4d2697d5a285c31cd82ede6ab69e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log