---
title: Install with Docker
project: OpenLogger
version: 1.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/openlogger/1-0/guides/install-docker/
updated: 2026-11-19T08:02:30.326Z
---

# Install with Docker

> Build a Docker image from the repository and run OpenLogger with a volume for its data.

The repository contains a `Dockerfile`. You build the image from the code and run it with a volume, so your logs and tokens survive a new container.

## Build the image

**1.** Download the code:

```bash
git clone https://github.com/totaljs/openlogger.git
cd openlogger
```

**2.** Build the image:

```bash
docker build -t openlogger .
```

## Run the container

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

Open `http://127.0.0.1:8000/` in your browser and continue with [First start](../first-start/).

Inside the container, OpenLogger keeps its data in `/www/.src/databases`. The volume `openlogger-data` holds the logs, the API tokens and the configuration, so you can remove the container and start a new one without losing them.

## Update to a new version

**1.** Download the new code with `git pull` and build the image again with `docker build -t openlogger .`.

**2.** Remove the old container and start a new one with the same volume:

```bash
docker rm -f openlogger
docker run -d --name openlogger -p 8000:8000 \
  -v openlogger-data:/www/.src/databases \
  openlogger
```

## Good to know

- `docker run` without a volume keeps the data only in that container. Removing the container removes your logs and tokens.
- Changes to tokens and the configuration are written to disk about 10 seconds after you save them. Wait a moment before you stop the container.
