Deploy Seata Server By Docker

Quick Start

Start a seata-server instance

$ docker run --name seata-server -p 8091:8091 seataio/seata-server:1.4.2

Specify server IP and port

$ docker run --name seata-server \
        -p 8091:8091 \
        -e SEATA_IP= \
        -e SEATA_PORT=8091 \

Docker compose

Example of docker-compose.yaml

version: "3"
    image: seataio/seata-server
    hostname: seata-server
      - "8091:8091"
      - SEATA_PORT=8091
      - STORE_MODE=file

Access container and view log

$ docker exec -it seata-server sh
$ docker logs -f seata-server

Using custom configuration file

Custom configuration implement by mount registry.conf and file.conf to container.

  • Specify registry.conf

The environment variableSEATA_CONFIG_NAME is required when use a custom configuration , and the value must be started with file: like file:/root/seata-config/registry:

$ docker run --name seata-server \
        -p 8091:8091 \
        -e SEATA_CONFIG_NAME=file:/root/seata-config/registry \
        -v /User/seata/config:/root/seata-config  \

The param -e specify environment, and the param -v specify mount volume.

  • Specify file.conf

If you need specify file.conf, just modify config like below in registry.conf file:

config {
  type = "file"

  file {
    name = "file:/root/seata-config/file.conf"

Environment Variables

You can modify configuration of seata-server by the environment variables like this:


The variable is optional, specifies registry IP instead of the container IP in registry center like eureka or others.


The variable is optional, specifies seata-server port, default is 8091


The variable is optional, specifies the log store mode of seata-server, support db and file, default is file.


The variable is optional, specifies the seata-server node ID, like 1,2,3..., default is 1


The variable is optional, specifies the seata-server environment, like dev, test etc. Then server will find file like registry-dev.conf under the configuration path when start.


The variable is optional, specifies the configuration file path, like the file:/root/registry, will load file/root/registry.conf as configuration. If need specify file.conf configuration,the value in registry.conf file need to change as related config, like file:/root/file.conf