---
title: Install with Docker
project: LessCode
version: 1.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/lesscode/1-0/guides/install-docker/
updated: 2026-11-19T04:41:09.987Z
---

# Install with Docker

> Run the official LessCode image with a volume that keeps your flow.

The official image is `totalplatform/lesscode`. Inside the container, LessCode reads and saves its flow in the folder `/www/.src/flowstreams`. The image does not include a flow, so you put the default flow file into a volume on that folder once. Until you do, the designer shows a spinner and does not load.

## Run with Docker

**1.** Get the default flow file from the source code:

```bash
git clone https://github.com/totaljs/lesscode.git
```

**2.** Start the container with a volume for the flow:

```bash
docker run -d --name lesscode -p 8000:8000 -v lesscode-flows:/www/.src/flowstreams totalplatform/lesscode
```

**3.** Copy the flow file into the volume and restart the container:

```bash
docker cp lesscode/flowstreams/lesscode.flow lesscode:/www/.src/flowstreams/lesscode.flow
docker restart lesscode
```

**4.** Open `http://localhost:8000/`. See [First access](../first-access/).

The volume `lesscode-flows` keeps your flow when you remove and create the container again. Always start new containers with the same `-v lesscode-flows:/www/.src/flowstreams` option.

## Run with Docker Compose

**1.** Create a `docker-compose.yaml` file:

```yaml
services:
  lesscode:
    image: totalplatform/lesscode
    container_name: lesscode
    ports:
      - "8000:8000"
    volumes:
      - flowstreams:/www/.src/flowstreams
volumes:
  flowstreams:
```

**2.** Start it:

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

**3.** Copy the default flow file into the volume (from a clone of the source code, as above) and restart:

```bash
docker compose cp lesscode/flowstreams/lesscode.flow lesscode:/www/.src/flowstreams/lesscode.flow
docker compose restart
```

`docker compose down` followed by `docker compose up -d` keeps your flow, because it stays in the `flowstreams` volume.

The `docker-compose.yaml` file in the source code mounts `/www/flowstreams`. LessCode does not save to that folder, so use the volume shown above instead.

## Before you stop a container

LessCode writes changes to the flow file a few seconds after you make them. Wait a few seconds after your last change before you stop or remove the container.

To keep a copy of your flow outside Docker, see [Back up your flow](../backups/).
