---
title: Install with Docker
project: OpenSync
version: 1.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/opensync/1-0/guides/install-docker/
updated: 2026-11-19T09:22:08.629Z
---

# Install with Docker

> Build the OpenSync image from the repository and run it with a volume for your data.

The repository has a `Dockerfile`. You build the image yourself and run it with a volume, so your setup survives when you recreate the container.

## Build and run

**1.** Get the code and open its folder:

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

**2.** Build the image:

```bash
docker build -t opensync .
```

**3.** Start a container. OpenSync listens on port 8000 inside the container, and the volume `opensync-data` keeps the data:

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

**4.** Open `http://localhost:8000/`. On a new instance it opens the setup page. See [First setup](../first-setup/).

## Where the data lives

Inside the container OpenSync runs from `/www/.src/`, and the data is in `/www/.src/databases/`. That folder is the `opensync-data` volume. When you remove the container and start a new one with the same volume, your name, tokens and settings are still there.

To see what is in the data folder:

```bash
docker exec opensync ls /www/.src/databases
```

The image runs OpenSync from its bundle file, so the instance menu has **Update bundle**. See [Update the bundle](../update-bundle/). The image has no extensions; add the ones you need on the [Extensions](../extensions/) page.

## Stop and start

```bash
docker stop opensync
docker start opensync
```

Before you open OpenSync to other people, read [Run in production](../production/).
