# Installing Additional APT Packages in Tutor (Ulmo Release) – Best Practice

**URL:** <https://discuss.openedx.org/t/installing-additional-apt-packages-in-tutor-ulmo-release-best-practice/18639>\
**Category:** Tutor Help\
**Tags:** how-to, tutor, ulmo\
**Created:** [March 24, 2026, 4:40am UTC](https://discuss.openedx.org/t/installing-additional-apt-packages-in-tutor-ulmo-release-best-practice/18639 "2026-03-24T04:40:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahendra](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mahendra/32/3902_2.png) [@Mahendra](https://discuss.openedx.org/u/Mahendra)\
**Post date:** [March 24, 2026, 4:40am UTC](https://discuss.openedx.org/t/installing-additional-apt-packages-in-tutor-ulmo-release-best-practice/18639/1 "2026-03-24T04:40:27Z")

</div>

Hi Everyone,

I’m currently running the latest Open edX **Ulmo** release using **Tutor 21.0.2** on a single AWS EC2 instance.

For Python dependencies, I understand that we can easily add extra packages via the `OPENEDX_EXTRA_PIP_REQUIREMENTS` setting in `config.yml`. For example:

```auto
OPENEDX_EXTRA_PIP_REQUIREMENTS:
- djangosaml2idp==0.7.2

```

However, I’m unsure about the recommended approach for installing additional **APT packages** (e.g., system-level dependencies like `xmlsec1`) during the image build process.

At the moment, I’m installing them manually by accessing the LMS container:

```auto
docker exec -it -u root tutor_local-lms-1 bash
apt-get update
apt install xmlsec1

```

While this works temporarily, I understand this is not a persistent or production-friendly solution, as changes will be lost on container rebuild.

Could anyone please guide me on:

- The correct way to install APT packages during the Tutor image build process
- Whether this should be handled via a custom Dockerfile, plugin, or any Tutor-specific mechanism
- Any relevant documentation or real-world examples

Any guidance or best practices would be greatly appreciated.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Agrendalath](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@Agrendalath](https://discuss.openedx.org/u/Agrendalath)\
**Post date:** [March 24, 2026, 4:48pm UTC](https://discuss.openedx.org/t/installing-additional-apt-packages-in-tutor-ulmo-release-best-practice/18639/2 "2026-03-24T16:48:32Z")

</div>

Hi @Mahendra, you can create [a plugin](https://docs.tutor.edly.io/tutorials/plugin.html) that uses [the `openedx-dockerfile-minimal` patch](https://github.com/overhangio/tutor/blob/8e3852a0f2521bc84683e69f3a55a1726151d63b/tutor/templates/build/openedx/Dockerfile#L17) to add custom commands when building an image. Something like this should work:

```python
from tutor import hooks

hooks.Filters.ENV_PATCHES.add_item(
    (
        "openedx-dockerfile-minimal",
        """
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
    --mount=type=cache,target=/var/lib/apt,sharing=locked \
    apt update \
    && apt install -y xmlsec1
"""
    )
)

```
