Serving Open edX course assets from a CDN

A CDN moves static course files off your LMS and Studio servers, but only large or geographically spread courses usually need one. This page covers what the setting changes, what it does not, and how to decide.

On this page

Serving Open edX course assets from a CDN: when it is worth the work

A content delivery network (CDN) is worth the work when large courses put heavy image, PDF or video traffic on the same origin servers that handle learner logins, course navigation and grading. A CDN caches those static course assets at edge locations and serves them to learners from a server closer to them, so the LMS and Studio origin spends less capacity on files. Many courses do not need one. A small or single-region course with modest media, or an enrollment that stays within what your origin already serves comfortably, gains little from a CDN, and the added configuration, cache invalidation and cost may not pay back. Start by measuring where time and bandwidth actually go before you decide.

The Open edX platform, edx-platform, is licensed under the GNU Affero General Public License version 3 and built on Python, JavaScript and Django, with Studio (CMS) for authoring and the LMS for learners. Tutor is the official Docker-based distribution for production, and it lets you run the platform in infrastructure you control, including your own cloud accounts or data centers. Because you operate the origin yourself, the CDN is a decision you own: you choose the provider, the origin hostname, which paths are cached and who pays for egress. The maintainers' guidance to run production through a service provider or with Tutor applies here too, since a hand-built edge layer adds moving parts that need the same operational discipline as the rest of the stack.

Before you buy anything, confirm with your Tutor version and your own environment which asset paths the platform serves, how your current media storage is configured, and how large your heaviest courses are in files and concurrent viewers. Ask any CDN provider how it handles cache keys for authenticated content, whether signed URLs are supported for restricted video and how purges reach edge nodes. Test with a rehearsal course and a regional load pattern. Those results, not a general rule, will tell you whether the CDN justifies its setup and ongoing operation.

Which course assets a CDN can take over

Course assets fall into two groups: public files that any visitor can fetch and files gated by enrollment or login. A CDN handles the first group with little friction, while the second group needs a separate decision about how access is checked at the edge.

Course images and thumbnails

Course cards, banners, and images embedded in units are usually public once a course is published. They are the safest first candidates for offloading because they are static, cacheable, and identical for every learner. Check whether your catalog pages expose these images to anonymous visitors, and confirm that the image URLs in Studio resolve to a host you can point at a CDN origin. Confirm cache lifetimes with your team so that replaced images do not stay stale for learners.

Static theme and platform files

Compiled CSS, JavaScript bundles, fonts, and theme assets are shared by all learners and change only at deployment. They should be served with long cache lifetimes and versioned file names so that a release does not leave old assets in use. Confirm with your Tutor setup how static files are collected and where they are served from before you change any routing.

Downloadable course PDFs and handouts

Course handouts and reference PDFs may be public or restricted depending on how the course is configured. A public PDF behaves like a static image, while a PDF that is only meaningful inside an enrolled course should not be reachable by anyone holding its URL. Ask your course team to list which downloads are intended for anonymous access and which are intended only for enrolled learners.

Enrollment-gated files and per-learner access

Files that only enrolled learners or specific cohorts should see need an access decision at request time. A CDN can cache them only if it verifies the learner or uses signed URLs with short expiry, and each option has trade-offs in caching and in how the platform issues those URLs. Treat this as a separate design item and confirm the approach with your security team before you move any gated file.

Video and large media files

Video is the heaviest asset class and often drives the case for a CDN. Confirm whether your videos are hosted in the platform, in a video service, or in object storage, because that determines which origin the CDN pulls from. Ask whether video delivery supports range requests and whether any videos carry access restrictions that a cache would have to respect.

What the CDN setting changes in Tutor and what stays on the origin

A CDN setting in Tutor changes where the browser fetches static and media files, not where the platform does its work. In a Tutor-based deployment, the static assets that ship with the platform (compiled JavaScript, CSS, images bundled with themes) and the media files uploaded to courses are referenced through base URLs. Pointing those URLs at a CDN hostname means the browser requests those files from the edge, while the LMS and Studio containers still build the pages, check enrollments and answer API calls. Confirm the exact setting names, the variables that hold the static and media base URLs, and whether your release serves media through the same hostname, against the Tutor documentation for your release rather than relying on memory. The Tutor documentation is the place to start: Tutor documentation.

The origin keeps everything that depends on the learner's session or on live course state. Rendered courseware, progress and grade calls, the instructor dashboard, login and SSO redirects, discussion forum requests and every API response stay on the origin. Media that is access-controlled, such as files restricted to enrolled learners or to a course team, cannot be cached as public objects without a signed-URL or cookie scheme, so you need to confirm how your release authenticates media requests before assuming the CDN can serve them. Check this in a staging environment with a logged-out browser and an unenrolled account, since a CDN that caches a private file once can expose it to everyone.

Before you change the setting, plan three checks: CORS headers on the CDN host so that fonts and scripts load from the page origin, cache rules that respect a new release's asset file names so that stale JavaScript is not served after an upgrade, and TLS and DNS for the CDN hostname under your own domain. Record which URLs changed, then verify in the browser network panel that API and courseware requests still reach the origin. Ask your Tutor and CDN operator to confirm each of these for your release, since the behavior depends on both.

CDN options and when each fits

This table compares four ways to serve course assets, from the existing web server to a restricted edge for private audiences. Read each row for the fit, the operational cost it adds, and the caching and access questions to settle before you switch the setting on. The main takeaway is that a CDN solves a delivery problem for large media, and most small or mid-sized courses may not need one at all.

OptionWhen it fitsWhat it adds to operationsWhat to confirm
No CDN, existing web serverSmall catalogs, modest video use, or learner groups spread across a single region close to the serverNothing new to run; asset traffic shares bandwidth with LMS and Studio requestsWhether the server bandwidth and disk I/O hold during peak course launches
Managed CDN in front of the originLarge images, PDFs and video are slow for learners far from the platform hostA second hostname, TLS certificates, cache rules and purge steps after course updatesCache lifetimes for static assets, how stale content is purged, and which paths are excluded
CDN backed by object storageLarge course libraries where asset files already sit in S3-compatible storage and the origin should stay lightStorage credentials, bucket policies, lifecycle rules and a copy of assets to keep in syncWhether the storage backend and the CDN both enforce the same access rules for each asset
Regional or private edge for restricted audiencesCourses limited to a country, region, or a closed group that must not be cached publiclyGeo or network rules, signed URLs or tokens, and extra logging for access decisionsWhether signed access works with the platform's authentication, and how cached copies expire after access is revoked

How to set up a CDN for Open edX course assets

This sequence takes a course asset offload from measurement to verification, so you know which paths move to the CDN, how Tutor points media URLs at the CDN host, and that learner pages still load their images, fonts, scripts and video over HTTPS without errors.

  1. Measure where asset load and latency come from

    Before changing anything, the platform owner and the course team pull access logs and browser timing for a representative course, then sort requests by path type: course images, PDFs, video files, static theme assets and LMS pages. Record which learner regions see slow responses and how much of the bytes served come from course content rather than the platform itself. You are done when you have a written baseline listing the top asset paths by volume and the latency numbers you will compare against after the change. If the largest share of traffic is dynamic LMS pages or database queries, a CDN for assets will not solve that, and you should confirm the bottleneck before going further.

  2. Decide which paths are public

    Work with the course team and the data owner to classify each asset type as public or restricted. Course images and static theme files are often public, while files behind enrollment, exams, or graded content may need signed URLs or to stay on the origin. Video that depends on access control needs its own decision, and this is where the team confirms whether the CDN can enforce the same rules as the LMS. Write the list down and mark each path as cacheable, restricted, or excluded. You know this step is complete when the owner has signed off on the list and every restricted path has a named access method.

  3. Configure origin and media URLs in Tutor

    The platform operator sets the CDN hostname and the media and static URL settings in the Tutor configuration, then regenerates and redeploys the environment. Confirm the exact configuration keys against the Tutor documentation for your installed version, since names can change between releases. Point the CDN origin at the platform's media storage, and make sure the origin answers requests for the same paths the LMS generates. You know this step is done when the rendered LMS HTML references the CDN host for a sample image and the origin still returns the file directly when requested by its own hostname.

  4. Set cache rules and invalidation

    The platform operator and the infrastructure team set cache lifetimes per path type in the CDN console or configuration, using the classification from the earlier step. Static theme files can usually be cached longer than course images, and any path that changes when a course is edited needs a defined invalidation method, such as purging by path or versioned filenames. Document who runs a purge and how a course team requests one. You know this step is done when a test file updated on the origin appears on the CDN after the configured purge, and the cache headers on a sample response match the rules you wrote.

  5. Check TLS and CORS for fonts and scripts

    The security engineer checks that the CDN hostname has a valid certificate covering the name learners use, that the certificate chain is complete on every edge location you test, and that TLS version and cipher settings match your policy. Then the platform operator verifies cross-origin headers: web fonts and some scripts loaded from the CDN host need CORS responses that allow the LMS origin, otherwise browsers block them silently. Test with a browser's developer tools on a course page that uses a custom font. You are done when no TLS warnings appear and the font and script requests return the expected access control headers.

  6. Verify course pages and mixed content

    The QA lead loads several course pages in current versions of common browsers, including a page with embedded images, a PDF link, and a video. The lead checks the browser console for mixed-content warnings, which appear when an HTTPS page loads an asset over HTTP, and for failed requests or blocked CORS calls. Confirm that the Studio preview and the learner view both render. Record each failed URL, trace it back to a configuration key or a hard-coded link in course content, and fix it at the source. You know this step is complete when a repeat run across the sample courses produces no mixed-content warnings and no failed asset requests.

  7. Confirm the results against the baseline

    The platform owner repeats the measurements from the first step on the same sample courses and compares latency, origin request counts and error rates. Ask the course team whether content authors still see up-to-date images after an edit, and whether any restricted path has been exposed by mistake. Keep the baseline and the new results together so a later capacity review can reuse them. The sequence is finished when the comparison shows the change achieved what the first step predicted, and the team has a written owner for purges and a schedule for reviewing cache rules.

How a learner request reaches the CDN and the origin

The diagram starts with a learner's browser requesting a page or asset from the LMS. Static course assets such as images, PDFs and video files can be served from the CDN edge, which keeps a cached copy and only fetches from object storage on a miss. Page requests, anything tied to a login session, and protected files check the authentication boundary and always go to the origin. Check which paths your CDN is allowed to cache before you enable it.

Cached asset paths versus paths that always reach the origin.

Security and access control for CDN-served course media

Moving course media to a CDN moves part of your access control out of the LMS and into a separate system. The cards below cover the controls that connect the two: how the CDN hostname is secured, whether restricted files can be protected with expiring URLs, how caching treats files that should stay private, browser-facing security settings, and access logging. Confirm each capability against your chosen CDN and your Open edX release before you commit to a design.

TLS on the CDN hostname

Serve media from a dedicated hostname, such as a subdomain you control, with a certificate issued for that name and automated renewal at the edge. Confirm which TLS versions and cipher suites the CDN offers, whether it terminates TLS at edge locations or forwards to your origin over an encrypted connection, and who holds the private key. Mixed content is a common failure: course pages served over HTTPS that link to HTTP media will break in browsers. Test the full path with a course that embeds images, PDFs and video.

Signed or expiring URLs

Public course assets can be cached and shared freely, but enrollment-only or graded materials usually need links that expire. Check whether your CDN supports signed URLs or signed cookies, and whether the Open edX release you run can generate them for the asset types you use. Where the platform cannot sign URLs, the restriction must live at the origin, which changes the performance benefit. Ask the vendor how signing keys are rotated and stored, and how expired links behave for a learner who keeps a page open during a long video.

Cache rules for private files

Set cache behavior by path or content type, not for the whole hostname. Files meant for one audience should carry private or no-store directives, or sit behind signed requests that the cache cannot serve to anyone else. Review how the CDN handles query strings, since a cache key that ignores a token can serve one learner's signed file to another. Purging also needs a plan: removing a file from a course should purge the edge copy, and you should test that purge reaches every point of presence you rely on.

CORS and content security headers

Video players, PDF viewers and interactive components often fetch media from a different origin than the page that embeds them. Define which origins may load assets, and set the Access-Control-Allow-Origin header to match, rather than allowing every origin. Decide on Content-Security-Policy entries for the media hostname, and confirm they match the frontend build your release uses. Test in several browsers, because a missing header often shows up as a blank player rather than a clear error.

Access logs from the CDN

CDN logs show which files were requested, from where and with which status codes, which the LMS logs may not show for direct media requests. Confirm that the CDN can deliver logs to storage or a SIEM, the fields it records, and the retention it applies by default. Logs can contain IP addresses and user identifiers in query strings, so they fall under your privacy review. Decide who may read them and how long they are kept before you enable them in production.

Origin access restrictions

Limit the origin so that only the CDN can reach your object storage or media server. Use a private bucket or an access policy that accepts requests from the CDN identity only, and block direct public reads for restricted paths. Without this, a signed URL protects nothing, because anyone who finds the origin address can bypass the CDN. Verify the restriction by requesting a restricted file directly from the origin and confirming it is refused.

Questions buyers ask about a CDN for Open edX

Does a small Open edX course need a CDN?

Usually not. A small course with a handful of images and short PDFs is served well by the platform's own web server and storage, and adding a CDN mainly adds another system to configure, monitor and renew certificates for. A CDN starts to pay off when many learners in different regions load large files at the same time, such as heavy video, large image sets or big PDF handouts. Before deciding, check how much of your traffic is static assets, how far apart your learners are, and whether page load times are a complaint you have actually measured. Your own load data is the deciding input, not course size alone.

What drives the cost and effort of a Open edX CDN setup?

The main drivers are the volume and type of assets, the number of regions your learners come from, the access rules on files, and what infrastructure you already run. Large video libraries cost more to cache and transfer than images, and private or enrolled-only files need signed URLs or token checks, which adds design and testing work. Existing DNS, certificate management and object storage make the job shorter. Costs come in two parts: one-time work to design, configure and test the delivery path, and recurring CDN bandwidth and storage charges from the provider you choose. Ask any provider or partner for a quote that lists each component separately.

How long does it take to set up a CDN for course assets?

Duration depends on scope, and no timeline can be given here without knowing your asset volume, access rules and existing infrastructure. A narrow setup that serves public images from one bucket behind one hostname is much shorter than a setup covering private video, signed access, several regions and a cutover from files already embedded in courses. Ask for the schedule in the written scope, with the inventory, configuration, testing and cutover steps listed as separate milestones. A sound quote states what each milestone depends on from your team, such as DNS changes or certificate issue.

What must our team provide before a CDN project starts?

Your team needs to supply four things early. First, an inventory of the assets in use: where images, PDFs and video files live, how big they are and which courses reference them. Second, DNS control for a hostname the CDN will serve, so the team can create the records. Third, TLS certificates for that hostname, or permission to issue them through your normal process. Fourth, an account with the CDN provider and the billing and admin roles needed to configure it. Missing any of these is the most common cause of delays, so confirm ownership of each before the scope is signed.

Can our own team set up a CDN for Open edX with Tutor?

Yes, a team with Linux, DNS and web server experience can often do it, and Tutor is designed to run Open edX as a Docker-based distribution that supports plugins and hooks. The harder part is not Tutor itself but the surrounding work: deciding which asset paths get cached, handling how course files are referenced, setting cache rules so updated files reach learners, and verifying that private content stays private. Review your team's experience with those areas honestly. The Tutor documentation is the right place to confirm which settings and plugin hooks your version exposes.

How does a CDN affect later Open edX upgrades?

A CDN adds configuration that has to survive each upgrade. Open edX states that the latest named release is the only supported release, so you will upgrade on the release cadence you choose, and each upgrade should be tested against your asset paths, hostnames and cache rules. Changes to how the platform generates static file URLs can break a CDN rule that worked before. Keep the CDN configuration in version control, record which hostname and paths the platform expects, and include a CDN check in each upgrade test plan. Confirm the upgrade process with your Tutor and release documentation before you commit to a date.

What security checks apply to CDN-served course files?

The main question is whether any course file should be reachable without signing in. Public marketing images can be cached freely, but enrolled-only PDFs, graded materials and licensed video need access checks that the CDN enforces, such as signed URLs with short expiry, or a token check at the edge. Test both paths: confirm that a file cannot be opened by copying its address into a browser without authorization, and that cached copies do not outlive a withdrawn enrollment or a removed file. Review the CDN's logging and access settings with your security team, since the logs can contain learner activity.

How DeployOpen works on this

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For course asset delivery, we start by measuring where your assets are served from and whether a CDN change is justified before any configuration is written.

How we scope

  • Scope covers the asset inventory, current media path, CDN provider choice and origin settings for your Open edX instance.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
  • The written scope states which course types, file classes and regions the CDN work covers, and what stays on the origin.

How we build

  • We configure the Open edX asset settings and CDN origin rules in a staging environment that mirrors production.
  • We test cache behavior, signed or restricted access where needed, and how course edits invalidate cached files.
  • Changes are made through your deployment tooling so the configuration stays reviewable and repeatable.

How we hand over

  • You receive the configuration, a runbook for cache purge and asset updates, and the test results from staging.
  • Documentation records which assets are served through the CDN and which are not, so course teams know what to expect.
  • We walk your platform and operations staff through the change so they can run it without our involvement.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • A retainer can cover CDN configuration reviews when Open edX or your CDN provider changes its behavior.
  • Ask any provider to confirm how cache rules interact with your Open edX release before go-live.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.