Environment:ARCANGEL0 EVA Docker Runtime
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Containerization |
| Last Updated | 2026-10-29 12:00 GMT |
Overview
Docker Engine runtime for deploying and managing the local SearXNG metasearch container on loopback.
Description
This environment requires Docker Engine to be installed, running, and accessible by the current user. Mitsu uses Docker to deploy a loopback-only SearXNG container for privacy-respecting web search. The container is created from the official `ghcr.io/searxng/searxng:latest` or `docker.io/searxng/searxng:latest` image, published on `127.0.0.1:{port}:8080`, and managed through the `docker` CLI. If Docker is not installed, Mitsu can install it automatically on Linux using the host's native package manager.
= Usage
Use this environment when setting up or running the local SearXNG search engine. Required by `setup_local_searxng`, `ensure_local_searxng_running`, and `stop_local_searxng`. Also required by `install_docker_engine` which can bootstrap Docker on a supported Linux host.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux | Required for automatic Docker installation |
| Docker Engine | Any recent version | `docker` must be on PATH and daemon running |
| Network | Loopback access | Container published on 127.0.0.1 only |
| Port | 1024-65535 | User-selected port for SearXNG |
Dependencies
System Packages
- `docker` (Docker Engine CLI and daemon)
- Docker daemon running (`docker info` must succeed)
Python Packages
None beyond the base Python environment.
Credentials
No environment variables required. The SearXNG container's `secret_key` is generated at setup time using `secrets.token_urlsafe(32)`.
Quick Install
# Verify Docker is installed and running
docker info
# If Docker is not installed, Mitsu can install it on Linux
# Or install manually:
sudo apt-get install -y docker.io # Debian/Ubuntu
sudo dnf install -y moby-engine # Fedora
sudo pacman -S --needed --noconfirm docker # Arch
Code Evidence
Docker availability check from `services/searxng.py:138-150`:
def _runtime() -> str:
if not shutil.which("docker"):
raise DockerNotInstalledError(
"Docker is not installed. Choose Install Docker or return to the search engine list."
)
try:
_run("docker", ["info"], timeout=15)
except SearXNGSetupError as error:
raise SearXNGSetupError(
"Docker is installed, but the daemon is not ready or this user cannot access it. "
"Start Docker and check Docker group access, then try again."
) from error
return "docker"
Container creation from `services/searxng.py:240-251`:
_run(
runtime,
[
"run", "--detach", "--name", container_name,
"--restart=no",
"--publish", f"127.0.0.1:{port}:8080",
"--volume", f"{volume_name}:/etc/searxng",
"--env", "FORCE_OWNERSHIP=true",
image,
],
timeout=90,
)
Image fallback from `services/searxng.py:20-23`:
_IMAGES = (
"ghcr.io/searxng/searxng:latest",
"docker.io/searxng/searxng:latest",
)
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `Docker is not installed` | Docker not on PATH | Install Docker or use Mitsu's installer |
| `Docker is installed, but the daemon is not ready` | Docker daemon not running | Start Docker: `sudo systemctl start docker` |
| `Port {port} is already in use` | Another process using the port | Choose a different port (1024-65535) |
| `Could not fetch the official SearXNG image` | Network issue pulling image | Check internet connectivity and Docker Hub/GHCR access |
Compatibility Notes
- Docker group membership: Non-root users need to be in the `docker` group. Mitsu uses `sg docker -c` to access newly granted group membership without restarting the process.
- Loopback only: The SearXNG container is published on `127.0.0.1` only — it is not accessible from other machines.
- Image fallback: Mitsu tries GHCR first, then Docker Hub for the SearXNG image.
- Port range: Must be between 1024 and 65535 (non-privileged ports).