How to Install Judge0 A Complete Step-by-Step Guide


This blog contains steps to install Judge0 on a local machine using Docker, assuming Docker is already installed in the system and up and running, and kind of focused on MAC OS installation, but the same steps will work on Windows as well
Installation using Docker
Download and extract the release files:
wget https://github.com/judge0/judge0/releases/download/v1.13.1/judge0-v1.13.1.zip
Or you can directly open this URL in the browser to download the zip file
Unzip the zip file you downloaded using the command below or any unzipping utility
unzip judge0-v1.13.1.zip
Go inside the folder
cd judge0-v1.13.1
Visit this website to generate a random password or set a complex password.
Use the generated password to update the variable
REDIS_PASSWORD
in thejudge0.conf
file.Visit this website again to generate another random password or set a complex password.
Use the generated password to update the variable
POSTGRES_PASSWORD
in thejudge0.conf
file.Now run DB services using the below Docker command
docker-compose up -d db redis
Wait for a few seconds for to command to get completed and the Postgresql database and Redis to start working
Now, run all services and wait a few seconds until everything is initialised:
docker-compose up -d
Your instance of Judge0 CE v1.13.1 is now up and running; visit the docs at
http://localhost:2358/docs
orhttp://<IP ADDRESS OF YOUR SERVER>:2358/docs
Common Issues while Installing on Mac OS
Judge0 Service is not running
Error due to existing Postgresql running on the same port, and judge0 is trying to connect to that
Can be solved by stopping all other postgres services and deleting the running container
Judge0 started, but you changed the judge0 config, and then it is not starting
It can be solved by clearing all Docker data, like existing volumes, networks, images, etc.
You can use the below command to reset all Docker data and remove all unused containers, volumes, networks and images
docker system prune -a --volumes
WARNING! This will remove:
all stopped container
all networks not used by at least one container
all volumes not used by at least one container
all images without at least one container associated to them
all build cache
Judge0 Service is running, but getting an error while hitting the API
message: 'No such file or directory @ rb_sysopen - /box/script.js',
status: { id: 13, description: 'Internal Error' }
If you are getting this error, this can be due to incompatibility of MAC OS with the build version
Can be fixed by adding the following in settings-store.json
/ settings.json
If you are using an older Docker version
“deprecatedCgroupv1”: true
File path Location
Mac: ~/Library/Group\ Containers/
group.com
.docker/settings-store.json
Windows: C:\Users[USERNAME]\AppData\Roaming\Docker\settings-store.json
Linux: ~/.docker/desktop/settings-store.json
Additionally Enable Use Rosetta for x86_64/amd64 emulation on Apple Silicon
in MAC OS
Subscribe to my newsletter
Read articles from Chetan Rakheja directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
