Skip to content
NewDatafor 10.02 is out: subscriptions and metric alerts, in Slack and Teams
Datafor

Setup

Deploying Datafor Using Docker

Run Datafor from the datafor123/datafor-ee image with a persistent volume, publish only the ports you need, and stop, update and back up the container safely.

The image datafor123/datafor-ee contains a complete Linux installation in /opt/bi-server, including the built-in PostgreSQL database that holds all reports, models, users and settings. The container runs as the user biadmin and starts Datafor with /opt/bi-server/start-server.sh.

Requirements

  • Docker on Linux, or Docker Desktop on Windows or macOS.
  • At least 8 GB RAM available to Docker: the server’s Java heap can grow to 6 GB, and PostgreSQL runs in the same container.

1. Pull the image

docker pull datafor123/datafor-ee

This pulls the latest tag. To pin a version, use one of the tags listed on Docker Hub, for example datafor123/datafor-ee:<tag>, in this command and in docker run.

2. Run the container

docker run -d --name datafor-ee \
  --hostname datafor-ee \
  -p 28080:28080 \
  -v datafor-data:/opt/bi-server \
  datafor123/datafor-ee

The same with Docker Compose:

services:
  datafor:
    image: datafor123/datafor-ee
    container_name: datafor-ee
    hostname: datafor-ee
    ports:
      - "28080:28080"
    volumes:
      - datafor-data:/opt/bi-server
    restart: unless-stopped

volumes:
  datafor-data:
Option Purpose
-d Runs the container in the background.
--name datafor-ee The name used by the other commands on this page.
--hostname datafor-ee Gives the container a fixed host name. The license checks that the server it runs on has not changed; without this option the host name is the container ID and changes every time the container is recreated, which can make a recreated container look like a different server (see License and Activation). Any fixed name works; keep it the same when you recreate the container.
-p 28080:28080 Publishes the web server. This is the only port users need.
-v datafor-data:/opt/bi-server Keeps the whole installation, including the database, configuration and AI Agent keys, in the named volume datafor-data. On the first start Docker fills the empty volume with the installation from the image. Use a named volume, not a host folder: an empty host folder would hide the installation.

Do not publish the other ports unless you need them:

  • 25432 (built-in PostgreSQL): not needed by users. If you must reach the database from the Docker host, publish it on the loopback interface only: -p 127.0.0.1:25432:25432.
  • 28081 (AI Agent API): never publish it. Browsers reach the AI Agent through Datafor at /datafor/ai/.
  • 38081 (AI Agent MCP server): only if AI clients on other computers connect to Datafor over MCP. The MCP server listens on 127.0.0.1 inside the container by default, so you must also set MCP_HTTP_HOST=0.0.0.0 and MCP_ALLOWED_HOSTS in /opt/bi-server/ai-agent/.env (see Connect AI Clients). Publish it as -p 127.0.0.1:38081:38081 and put Nginx in front of it (see Deploying Datafor Behind Nginx).

Ports can only be published when the container is created. To change them later, stop and remove the container and run it again with the same -v datafor-data:/opt/bi-server; the content in the volume is kept.

3. Check the deployment

docker ps
docker logs -f datafor-ee

The log shows the Tomcat output; Datafor is ready when it prints Server startup in [...] milliseconds. Press Ctrl+C to leave the log. Then open http://localhost:28080 and sign in with admin / password. Change that password right away (see Modify Password), and change the password of the demo user (demo / demo) or delete that user.

start-server.sh also starts the AI Agent. Check that it is ready with:

docker exec datafor-ee curl -s http://127.0.0.1:28081/ai/health

See How to Enable the AI Feature.

4. Stop, start and remove the container

Stop Datafor inside the container first, so that PostgreSQL shuts down cleanly, then stop the container:

docker exec datafor-ee /opt/bi-server/stop-server.sh
docker stop datafor-ee

Start it again with docker start datafor-ee.

docker rm datafor-ee removes the container. With the volume from step 2, the content stays in datafor-data and a new container started with the same -v option uses it. docker volume rm datafor-data deletes the content permanently.

Recreate the container with the same --hostname (or hostname: in Compose) as before. The license is kept in the volume, so a recreated container stays licensed. If the volume is lost, the result is a new installation and the license has to be transferred (see Moving to another server).

5. Update

Pulling a newer image does not update an existing installation, because the installation lives in the volume. Install update packages as described in Upgrading Datafor.