Web service that converts between molecule formats using OpenBabel.
The service is distributed as a Docker image at ghcr.io/cheminfo/openbabel.
git clone https://github.com/cheminfo/openbabel.git
cd openbabel
cp .env.example .env
cp compose.example.yaml compose.yaml
# Run the released image:
docker compose pull && docker compose up -d
# Or rebuild from the current checkout:
docker compose up -d --buildThe default port is 20808. Change it by editing PORT in .env.
Open http://localhost:20808/ to access the Swagger UI.
For a publicly-reachable deployment behind Cloudflare Tunnel (no host port published):
cp .env.example .env
cp compose.example.cloudflared.yaml compose.yamlIn the Cloudflare dashboard (https://dash.cloudflare.com):
- Navigate to Networking → Tunnels → Create a tunnel → Cloudflared connector.
- Copy the generated token into
.envasTUNNEL_TOKEN=.... - Open the tunnel, go to the Published applications tab, and add an application with:
- Public hostname:
openbabel.lactame.com(or another domain you control) - Service type: HTTP
- Service URL:
openbabel:20808(matchPORTfrom.env)
- Public hostname:
Then start the stack:
docker compose up -dFor a host that already runs a Traefik reverse proxy on
an external Docker network named traefik (with a websecure entrypoint and
a letsencrypt cert resolver):
cp .env.example .env
cp compose.example.traefik.yaml compose.yaml
docker compose up -dEdit the Host(...) label in compose.yaml to point at the public hostname
you have configured for this service (default openbabel.cheminfo.org).
npm install
npm run devPORT and BABEL are read from the environment (with .env auto-loaded via
node --env-file-if-exists=.env). By default BABEL is auto-detected from
/opt/homebrew/bin/obabel and /usr/bin/obabel.
Run the full check (tests + eslint + prettier):
npm testOpenBabel is subject to its own license.