Skip to main content

Open edX Forum

CI License status-badge

This application provides a forum backend for use within Open edX courses. Features include: nested comments, voting, instructor endorsements, and others. The frontend is provided by the frontend-app-discussions microfrontend application.

This project is a drop-in replacement of the legacy cs_comments_service application. The legacy application was written in Ruby, while this one is written in Python for direct integration in the edx-platform Django project. Moreover, forum data no longer resides in MongoDB, but in the relational MySQL database. The motivation for this rewrite is described more extensively in the Axim Funded Contribution Proposal.

Installation

Starting from the Open edX Sumac release, the forum app is distributed via the Tutor forum plugin.

The only prerequisite for installation is a working Open edX platform with Tutor, on the Sumac release (v19+) or the main branch. Enable the forum by running:

tutor plugins enable forum
tutor local launch

The forum feature will then be automatically enabled in the Open edX platform, and all API calls will be transparently handled by the new application.

Development

Run tests with:

make test-all       # run all tests
make test           # run unit tests only
make test-quality   # run quality tests only
make test-e2e       # run end-to-end tests only

When developing this application, it is recommended to clone this repository locally and mount it within the application containers:

git clone git@github.com:openedx/forum.git
tutor mounts add ./forum/

Check that the forum repository is properly bind-mounted both at build- and run-time by running tutor mounts list. It should output the following:

- name: /home/path/to/forum
  build_mounts:
  - image: openedx
    context: mnt-forum
  - image: openedx-dev
    context: mnt-forum
  compose_mounts:
  - service: openedx
    container_path: /mnt/forum
  - service: openedx-dev
    container_path: /mnt/forum

Re-build the openedx-dev image and launch the platform:

tutor images build openedx-dev
tutor dev launch

Administration

This application provides a few commands to facilitate the transition from the legacy forum app.

Forum v2 toggle

In edx-platform, forum v2 is not enabled by default and edx-platform will keep communicating with the legacy forum app. To enable forum v2 in your Open edX platform, toggle the discussions.enable_forum_v2 course waffle flag:

./manage.py lms waffle_flag --create --everyone discussions.enable_forum_v2

Note that Tutor enables this flag for all forum plugin users, such that you don’t have to run this command yourself. If you wish to migrate your courses one by one to the new forum v2 app, you may create the corresponding “Waffle flag course override” objects in your LMS administration panel, at: http(s)://<LMS_HOST>/admin/waffle_utils/waffleflagcourseoverridemodel/.

Migration from MongoDB to MySQL

The forum v2 app comes with the forum_migrate_course_from_mongodb_to_mysql migration command to move data from MongoDB to MySQL. This command migrates user, content, and read state data from MongoDB to MySQL.

To migrate data for specific courses, run the command with the course IDs as argument:

./manage.py lms forum_migrate_course_from_mongodb_to_mysql <course_id_1> <course_id_2>

To migrate data for all courses, run the command with the all argument:

./manage.py lms forum_migrate_course_from_mongodb_to_mysql all

MongoDB data deletion

After you have successfully migrated your course data from MongoDB to MySQL using the command above, you may delete your MongoDB data using the forum_delete_course_from_mongodb management command. This command deletes course data from MongoDB for the specified courses.

Run the command with the course ID(s) as an argument:

./manage.py lms forum_delete_course_from_mongodb <course_id_1> <course_id_2>

To delete data for all courses, run the command with the all argument:

./manage.py lms forum_delete_course_from_mongodb all

To try out changes before applying them, use the --dry-run option. For instance:

./manage.py lms forum_delete_course_from_mongodb all --dry-run

Search Indices

Based on your search backend i.e Elasticsearch or Meilisearch, the commands will populate search indexes.

Initialize Forum Indices

To initialize search indices use initialize_forum_indices command. It allows you to force the creation of new indices even if they already exist:

./manage.py lms initialize_forum_indices

Pass --force flag to force the creation of new indices.

Rebuild Forum Indices

To rebuild search indices from scratch use rebuild_forum_indices command:

./manage.py lms rebuild_forum_indices

Getting Help

If you are having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community.

Our real-time conversations are on Slack. You can request a Slack invitation, then join our community Slack workspace.

For anything non-trivial, the best path is to open an issue in this repository with as many details about the issue you are facing as you can provide.

For more information about these options, see the Getting Help page.

License

The code in this repository is licensed under the AGPL 3.0 unless otherwise noted. See LICENSE.txt for details.

Contributing

Contributions are very welcome. Please read How To Contribute for details.

This project is currently accepting all types of contributions, bug fixes, security fixes, maintenance work, or new features. However, please make sure to discuss your new feature idea with the maintainers before beginning development to maximize the chances of your change being accepted. You can start a conversation by creating a new issue on this repo summarizing your idea.

The Open edX Code of Conduct

All community members are expected to follow the Open edX Code of Conduct.

People

The assigned maintainers for this component and other project details may be found in Backstage. Backstage pulls this data from the catalog-info.yaml file in this repo.

Reporting Security Issues

Please do not report security issues in public. Please email security@openedx.org.

Metadata

Release files for openedx-forum 0.4.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openedx-forum 0.4.9
File Size Uploaded
openedx_forum-0.4.9.tar.gz 231.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openedx-forum 0.4.9
File Interpreter ABI Platform
openedx_forum-0.4.9-py3-none-any.whl Python 3 none any Details

Total release size: 347.1 kB

Release files / openedx_forum-0.4.9.tar.gz

Download URL openedx_forum-0.4.9.tar.gz
Size 231.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2b78775eb014e2eae709d0a968e939c4b42f705eb597440ec71180fce067c0d0
BLAKE2b-256 checksum
How to use checksums
61cd84893cda1fd0faa016ff296545b288ca14fd39e536656aee932843f65659
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 Oct 7, 2026.

Transparency log

Release files / openedx_forum-0.4.9-py3-none-any.whl

Download URL openedx_forum-0.4.9-py3-none-any.whl
Size 115.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86e9dce638ca8f107de13fae180312d28640787618c03d8e7e7fcf03e0daf867
BLAKE2b-256 checksum
How to use checksums
a0479a5aef2d7258839e64a1cc73cadadac4499da52ef4b199b2023ef52a9cff
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 Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.9 This release

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.4

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page