Theia IDE
What is Theia?
Theia is an open-source, browser-based IDE with a VS Code-like editor, integrated terminal, and extension system. Running it in a container gives you a full development environment reachable from any browser, useful for remote work, pairing, or coding from a machine without your usual local setup. Laradock builds it from the official theiaide/theia image.
Start Theia
- Laradock CLI
- Docker Compose
./laradock start ide-theia
docker compose up -d ide-theia
Open http://localhost:987 (or your custom IDE_THEIA_PORT). ${APP_CODE_PATH_HOST} is mounted into the container at /home/project, so Theia opens the same project code the rest of your Laradock containers work with.
ide-theia/Dockerfile also raises fs.inotify.max_user_watches to 524288 as root before switching back to the theia user, this avoids file-watcher errors ("ENOSPC") on projects with a large number of files.
Stop Theia
Stopping just pauses the container:
- Laradock CLI
- Docker Compose
./laradock stop ide-theia
docker compose stop ide-theia
The editor state itself isn't stored in a Laradock-managed volume, only your project files (via APP_CODE_PATH_HOST) persist independently of the container, so there's nothing to lose by stopping or removing it.
To delete the container entirely:
- Laradock CLI
- Docker Compose
./laradock remove ide-theia
docker compose rm -sf ide-theia
Configuration
All settings live in ide-theia/defaults.env and can be overridden by adding the same line to your own .env:
| Variable | Default | What it does |
|---|---|---|
IDE_THEIA_PORT | 987 | Host-side port Theia is published on (host:3000, Theia listens on 3000 inside the container). |
Rebuild after changing the Dockerfile
ide-theia/Dockerfile is a thin wrapper on top of theiaide/theia. If you edit it, for example to add a system package or a Theia extension, rebuild the image for the change to take effect:
- Laradock CLI
- Docker Compose
./laradock rebuild ide-theia
docker compose build ide-theia
There's no IDE_THEIA_VERSION variable, the image always builds from theiaide/theia:latest as pinned in the Dockerfile's FROM line. To pick up upstream Theia updates, rebuild with --no-cache (docker compose build --no-cache ide-theia) so Docker re-pulls the base image instead of reusing a cached layer.
View logs
If the page won't load or the editor gets stuck, check the container's startup output:
- Laradock CLI
- Docker Compose
./laradock logs ide-theia
docker compose logs --tail=100 ide-theia
Open a terminal inside the container
Theia ships its own in-browser terminal once it's loaded, but if the UI itself isn't coming up, get a shell directly to inspect the container:
- Laradock CLI
- Docker Compose
./laradock enter ide-theia
docker compose exec ide-theia bash
Security: no built-in authentication
Theia, as run here, has no login screen and no access control of its own, whoever can reach IDE_THEIA_PORT gets a full editor and terminal on your mounted project code. That's fine on localhost, but if you ever expose this container beyond your own machine (a shared dev box, a port forwarded through a tunnel, a cloud VM), put it behind something that authenticates first, for example an nginx vhost with basic auth or a VPN, never publish IDE_THEIA_PORT directly to the open internet.
Common issues
- Port already in use on your host. Another service (or another Laradock project) is already bound to
987. ChangeIDE_THEIA_PORTin.envand run./laradock restart ide-theia. - File-watcher / "too many open files" errors on large projects. The Dockerfile already raises
fs.inotify.max_user_watches, but this setting is applied inside the container's own namespace; on some Docker Desktop setups the host's inotify limit still applies. Raise the host limit too if you keep hitting it. - Editing files but no changes showing up in other containers. Confirm
APP_CODE_PATH_HOSTin.envpoints at the same project folder thatphp-fpm/nginx/etc. use, Theia only sees whatever is mounted to/home/project. - Blank page or connection refused. Give the container a few seconds after
./laradock start ide-theia; check./laradock logs ide-theiafor startup errors before assuming it's a port issue.
Need an API spec editor instead of a full IDE? See Swagger Editor. New to Laradock? Start at Getting Started.