Judge0 self-hosting error

Judge0: "Failed to create control group" and "No such file or directory @ rb_sysopen"

Self-hosted Judge0 starts, accepts submissions, and then answers every one with Internal Error. The cause is almost always cgroup v2: Judge0's sandbox needs cgroup v1, and WSL2, Docker Desktop and current Ubuntu give it v2. Here is what you see, why, the workarounds Judge0 documents, and a hosted option when none of them fits.

By the OnlineCompiler.io team. Updated . We make OnlineCompiler.io, so we're one of the options here. Every competitor figure links to the vendor's own page, and we say where our API falls short.

What you see

The API accepts the submission, then polling returns status 13 with a message about a missing file under /box. The worker log holds the real error, from isolate failing to build its sandbox (judge0#543):

Polling response
{
  "stdout": null,
  "stderr": null,
  "compile_output": null,
  "message": "No such file or directory @ rb_sysopen - /box/script.py",
  "status": { "id": 13, "description": "Internal Error" }
}
Judge0 worker log
Failed to create control group /sys/fs/cgroup/memory/box-29/: No such file or directory
chown: cannot access '/box': No such file or directory

The same symptom is reported on WSL2, on Docker Desktop and on current Ubuntu servers. Other messages from the same root cause are Cannot write /sys/fs/cgroup/memory/box-21/tasks: No such file or directory and Cannot write /sys/fs/cgroup/memory/box-13/memory.limit_in_bytes.

Why it happens

Judge0 runs each submission inside isolate, a sandbox that applies memory and CPU limits through Linux cgroups. The isolate that Judge0 1.13.1 uses looks for the cgroup v1 layout, such as /sys/fs/cgroup/memory/box-N. Ubuntu 22.04 and later, Fedora, recent Docker and WSL2 use the cgroup v2 layout, where those paths do not exist. The sandbox is never created, so the source file has nowhere to be written. Judge0's compose file also runs its server and worker as privileged: true (docker-compose.yml), which many managed container hosts do not allow.

This is a known gap, not a mistake in your setup: the request for cgroup v2 support has been open since May 2025, and Judge0 1.13.1 from April 2024 is still the latest release.

Workarounds for self-hosting

  1. Switch the host to cgroup v1. This is the documented route (Judge0 deployment procedure). It works on a VM or server where you control the boot parameters:
    Terminal
    # /etc/default/grub (Ubuntu 22.04, a VM or server where you control the kernel command line)
    GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=0"
    
    sudo update-grub
    sudo reboot
    mount | grep cgroup   # should now list cgroup v1 controllers such as /sys/fs/cgroup/memory
    Check the result with mount | grep cgroup and keep privileged: true in the compose file (a reader's advice on #543). It does not always take: one reader still failed after the change, then got Judge0 working on a fresh Ubuntu 20.04 server.
  2. Run Judge0 on a plain VM, not WSL2 or a managed container host. WSL2 has no GRUB to change, and a reader on a hosting platform reports the same error with no setting to fix it (#603, #543).
  3. Use a build with a newer isolate. Reader comments point to isolate 2.x, which supports cgroup v2, and to community forks of Judge0 built on it. They are not Judge0 releases, so review one before running it, and expect to maintain it yourself.

If you need Judge0 itself, with its 90+ languages and your own servers, one of these is the honest answer.

Or skip the sandbox host

If you only needed somewhere that runs Judge0-style submissions, OnlineCompiler.io answers Judge0 CE's API at https://api.onlinecompiler.io/api/judge0. Its sandboxes are gVisor containers on our servers, so there are no cgroup settings to change on yours. Your client keeps its submissions, tokens, wait=true, batches and status ids; you change the base URL and send your key in X-Auth-Token (create one on the API keys page, free with no card):

before.js
// Your Judge0 call, pointing at a server that needs cgroup v1
const JUDGE0_URL = "http://localhost:2358";
const headers = { "Content-Type": "application/json" };
after.js
// OnlineCompiler.io hosts it: nothing to install, no kernel settings
const JUDGE0_URL = "https://api.onlinecompiler.io/api/judge0";
const headers = {
  "X-Auth-Token": process.env.ONLINECOMPILER_API_KEY,
  "Content-Type": "application/json",
};

const res = await fetch(`${JUDGE0_URL}/submissions?wait=true`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    language_id: 71, // Python; runs on Python 3.14 here
    source_code: "print(int(input()) * 2)",
    stdin: "21",
  }),
});
const { status, stdout } = await res.json();
console.log(status.description, stdout); // "Accepted" "42\n"

Check what carries over before you switch: the Judge0-compatible API docs and the migration guide list the differences, including fewer languages than Judge0 and fixed memory per run. Judge0 alternatives compares the hosted options.

Frequently asked questions

What does "Failed to create control group /sys/fs/cgroup/memory/box-N/" mean?

Judge0's sandbox, isolate, tried to create a memory cgroup under the cgroup v1 path and the host has none, because it uses cgroup v2. With no sandbox directory, Judge0 then cannot write your source file, so submissions come back as Internal Error (status 13) with "No such file or directory @ rb_sysopen - /box/script.py".

Can Judge0 run on WSL2 or Docker Desktop?

Reports on the Judge0 repository say not out of the box. WSL2 exposes only cgroup v2 and has no GRUB to switch it, and a Docker Desktop reporter says privileged mode did not help. There is no officially documented fix for either as of 24 October 2026.

Does newer Ubuntu break Judge0?

Ubuntu 22.04 and later default to cgroup v2. Judge0 documents switching to cgroup v1 with a GRUB setting, which works where you control the boot parameters (a VM or bare server) and not on hosts that do not let you.

Is there a Judge0 release that supports cgroup v2?

Not from Judge0. The latest release, 1.13.1, dates from April 2024, and the request for cgroup v2 support is still open. A reader notes that isolate 2.x supports cgroup v2; some community forks build on that, which we have not tested.

Do I have to rewrite my Judge0 client to use OnlineCompiler.io?

No. Change the base URL to https://api.onlinecompiler.io/api/judge0 and send your key in X-Auth-Token. Submissions, tokens, wait=true, batches, base64_encoded, callbacks and the status ids work as on Judge0. Per-run limits other than time, compiler options, command-line arguments and multi-file programs are not supported.

What does the hosted option cost?

The free plan includes 100,000 runs a month with no credit card, commercial use included.