---
title: Install with Docker
project: OpenReports
version: 1.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/openreports/1-0/guides/install-docker/
updated: 2026-11-19T07:46:45.185Z
---

# Install with Docker

> Build a Docker image of OpenReports from its repository and run it with a volume for your data.

The repository has a `Dockerfile`. Build your own image from it, and keep the data folder of the container in a volume so your views and reports survive when the container is replaced.

## Build the image

```bash
git clone https://github.com/totaljs/openreports.git
cd openreports
docker build -t openreports .
```

## Run the container

```bash
docker run -d --name openreports -p 8000:8000 -v openreports-data:/www/.src/databases openreports
```

Open `http://localhost:8000/` and continue with [First access](../first-access/).

The volume `openreports-data` holds the file `memorize_data.json` with your settings, views and reports. You can stop, remove and create the container again with the same command, and your work stays.

## Run it with Docker Compose

Save this as `compose.yaml` in the `openreports` folder:

```yaml
services:
  web:
    build: .
    ports:
      - "8000:8000"
    volumes:
      - data:/www/.src/databases
volumes:
  data:
```

Then start it:

```bash
docker compose up -d --build
```

## Connect to PostgreSQL from the container

Inside the container, `localhost` is the container itself. In the connection string, use an address of the PostgreSQL server that the container can reach, for example the name of a PostgreSQL container on the same Docker network. See [Connect the database](../connect-database/).
