Favicon of Judge0

Judge0

Integrate a robust, scalable API for secure, sandboxed code execution. Supports 60+ languages to power e-learning platforms, IDEs, and AI agents.

Add a powerful code execution engine to your application with this open-source, sandboxed system. It is designed for developers and businesses that need to run user-submitted code securely and at scale, making it ideal for AI agents, competitive programming platforms, e-learning tools, and online IDEs.

The core offering is a robust and scalable API that provides complete control over the code execution environment. You can deploy it on your own infrastructure or use the managed cloud version for a quick setup. The system is built for flexibility and detailed feedback.

Key features include:

  • Support for over 60 programming languages
  • Secure, sandboxed compilation and execution
  • Configuration of custom inputs, compiler options, and resource limits
  • Detailed execution results delivered via API or webhooks
  • Compatibility with AI agents for code generation and execution tasks

The platform also offers a free online code editor and mobile apps, demonstrating the system's capabilities for creating rich coding environments.

Directory Structure

judge0
postgres-data
redis-data
.env
docker-compose.yml

docker-compose.yml

services:
  server:
    image: judge0/judge0:1.13.1
    ports:
      - "2358:2358"
    privileged: true
    environment:
      - POSTGRES_HOST=db
      - POSTGRES_DB=judge0
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - REDIS_HOST=redis
      - REDIS_PASSWORD=${REDIS_PASSWORD}
      - AUTH_TOKEN=${AUTH_TOKEN}
    restart: always

  worker:
    image: judge0/judge0:1.13.1
    command: ["./scripts/worker"]
    privileged: true
    environment:
      - POSTGRES_HOST=db
      - POSTGRES_DB=judge0
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - REDIS_HOST=redis
      - REDIS_PASSWORD=${REDIS_PASSWORD}
    restart: always

  db:
    image: postgres:13.0
    environment:
      - POSTGRES_DB=judge0
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    volumes:
      - ./postgres-data:/var/lib/postgresql/data/
    restart: always

  redis:
    image: redis:6.0
    command: [
      "bash", "-c",
      'docker-entrypoint.sh --appendonly yes --requirepass "$$REDIS_PASSWORD"'
    ]
    environment:
      - REDIS_PASSWORD=${REDIS_PASSWORD}
    volumes:
      - ./redis-data:/data/
    restart: always

.env

POSTGRES_USER=judge0
POSTGRES_PASSWORD=your_secure_postgres_password
REDIS_PASSWORD=your_secure_redis_password
AUTH_TOKEN=your_secure_auth_token
Categories:

Share:

Ad
Favicon

 

  
 

Similar to Judge0

Favicon

 

  
  
Favicon

 

  
  
Favicon