Schoco — Self-Hosted, Open-Source

Online IDE for learning Java programming at school, including automatic JUnit tests. Designed to give coding homework/assignments.

License: MIT. Built with: Vue, Python, JavaScript, Java, Dockerfile, Shell, Mako, HTML, SCSS. Source: https://github.com/PhiTux/schoco.

Features

Installation

- Apache2 ```apache RewriteEngine on RewriteCond ${HTTP:Upgrade} websocket [NC] RewriteCond ${HTTP:Connection} upgrade [NC] RewriteRule .* "ws://localhost:1234/$1" [P,L] ProxyPreserveHost On ProxyRequests off AllowEncodedSlashes NoDecode ProxyPass /containers ws://localhost:1234/containers ProxyPassReverse /containers ws://localhost:1234/containers ProxyPass / http://localhost:1234/ nocanon ProxyPassReverse / http://localhost:1234/ ``` 6. Adapt the following `docker-compose.yml` to your needs and run `docker compose up -d`: ```yaml networks: schoco: name: schoco services: schoco-backend: image: phitux/schoco-backend:<tag> # use the newest tag, see https://hub.docker.com/r/phitux/schoco-backend/tags container_name: schoco-backend restart: always user: "1000:1000" # find out the user-id (uid) and group-id (gid) of the new user schoco by running 'id schoco' in your bash group_add: # find your docker group ID. Either run in your bash: export DOCKER_GROUP_ID=$(getent group docker | cut -d: -f3) # and import it as variable, or just run the command from within the brackets and replace ${DOCKER_GROUP_ID} with the output. # Important: the group ID must be used as String (in quotes)! - ${DOCKER_GROUP_ID} environment: - FULL_DATA_PATH=/path/to/my/data # same as (left part of) first volume - but here as FULL PATH!!! - MAX_CONTAINERS=4 # sets the amount of java-workers (you want to set this higher!) I recommend as rule of thumb 1.5x the amout of cores of your CPU - SECRET_KEY=secret # used for session token - TEACHER_KEY=teacherkey # this is the 'password' that is used to create new teacher-accounts. It must only be known to the teachers. - GITEA_USERNAME=schoco # this is the username of the gitea-user (see last image in this yaml-file) - GITEA_PASSWORD=schoco1234 # and that is the password of the gitea-user. # Actually both username and password can stay like this, if you use the gitea-image from this yaml-file and if gitea is not made public (default)! - GITEA_HOST=http://schoco-gitea:3000 # stays like this, if you use the gitea-image from this yaml-file and if gitea is not made public (default)! # change it to your domain, if you use a public gitea-instance networks: - schoco volumes: - ./data:/app/data - /var/run/docker.sock:/var/run/docker.sock schoco-frontend: image: phitux/schoco-frontend:<tag> # always use the same tag as schoco-backend (see https://hub.docker.com/r/phitux/schoco-frontend/tags) container_name: schoco-frontend restart: always group_add: - ${DOCKER_GROUP_ID} # see above networks: - schoco volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - "80:8080" # adapt the left host-port to your needs schoco-gitea: image: gitea/gitea:1.17.3 # you could probably use a newer version, but API-changes might break something... container_name: schoco-gitea restart: always environment: - USER_UID=1000 - USER_GID=1000 - GITEA__security__INSTALL_LOCK=true networks: - schoco volumes: - ./gitea-data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro

Why self-host Schoco

Self-hosting gives you three things SaaS can’t: data ownership (the files live on disks you control), cost predictability (a one-time setup vs. recurring per-seat fees that grow with your household or team), and longevity (open-source means the app keeps working even if the maintainers move on, since you can pin a working version). The trade-off is that you take on the operational work of running a server, applying updates, and handling backups.

What hardware do you need

Most self-hosted apps run comfortably on modest hardware — a Raspberry Pi 4, a mini PC, a NAS with Docker support, or a small VPS is usually enough for personal or family use. CPU and RAM requirements scale with how many simultaneous users or how much data you push through Schoco. Storage requirements depend on the kind of data you keep; check the README for guidance on data retention.

Where to go from here

Last verified: 2026-05-22