Skip to main content
Version: v2.6

Deploy Seata Server By Docker

View 1.4.2 Legacy Guide

Precautions and Image Tags​

  • Avoid pulling latest blindly in production. Check DockerHub (apache/seata-server and apache/seata-naming-server) and pin an explicit release tag.
  • Since Seata 2.4, the Web Console lives in apache/seata-naming-server (port 8081). apache/seata-server multiplexes RPC and HTTP APIs on port 8091 via Netty-HTTP (port 7091 is no longer used).
  • Official images default to TZ=Asia/Shanghai. Override timezone with -e TZ=...; do not mount /etc/timezone.

2.6.0 Image Tags​

ImageTagNotes
apache/seata-server2.6.0JDK 8 base
apache/seata-server2.6.0.jdk17 / 2.6.0.jdk21 / 2.6.0.jdk25Multi-arch images for JDK 17 / 21 / 25
apache/seata-naming-server2.6.0.jdk25JDK 25 base, provides native registry and Console

Quick Start​

Start seata-server​

docker run -d --name seata-server \
-p 8091:8091 \
apache/seata-server:2.6.0

For Raft mode, also expose the Raft port 9091:

docker run -d --name seata-server \
-p 8091:8091 \
-p 9091:9091 \
-v $(pwd)/seata-config:/seata-server/resources \
-v $(pwd)/sessionStore:/seata-server/sessionStore \
apache/seata-server:2.6.0

Specify Registered IP and Port​

docker run -d --name seata-server \
-p 8091:8091 \
-e SEATA_IP=192.168.1.1 \
-e SEATA_PORT=8091 \
apache/seata-server:2.6.0
caution

SEATA_IP must be an IPv4 or IPv6 address literal (for example, 192.168.1.1). Hostnames are rejected on startup.

Start seata-naming-server (Native Registry & Console)​

docker run -d --name seata-naming-server \
-p 8081:8081 \
apache/seata-naming-server:2.6.0.jdk25

See Deploy NamingServer for full configuration instructions.

Access Container and View Logs​

docker exec -it seata-server bash
docker logs -f seata-server

Using Custom Configuration​

Inside the official image, configuration files are stored under /seata-server/resources/. Extract the default configuration from a temporary container first:

docker run -d --name seata-server-tmp apache/seata-server:2.6.0
mkdir -p ./seata-config
docker cp seata-server-tmp:/seata-server/resources/. ./seata-config/
docker rm -f seata-server-tmp

The extracted directory contains application.yml, application.example.yml, application.raft.example.yml, and logback-spring.xml. After customizing application.yml, mount the directory back into the container:

docker run -d --name seata-server \
-p 8091:8091 \
-e TZ=Asia/Shanghai \
-v $(pwd)/seata-config:/seata-server/resources \
-v $(pwd)/sessionStore:/seata-server/sessionStore \
-v $(pwd)/logs:/root/logs/seata \
apache/seata-server:2.6.0

When using file or raft store mode, always mount /seata-server/sessionStore so session data survives container restarts.

Environment Variables​

seata-server supports the following environment variables:

Environment VariableDescriptionDefault
SEATA_IPIP registered to the registry center (must be an IPv4/IPv6 literal)Auto-detected container IP
SEATA_PORTListening port of seata-server8091
STORE_MODEUnified session and lock store mode (file, db, redis)file
SESSION_STORE_MODESession store mode (file, db, redis)Inherits STORE_MODE
LOCK_STORE_MODELock store mode (file, db, redis)Inherits STORE_MODE
SERVER_NODEServer node ID (e.g., 1, 2, 3)Auto-generated via Snowflake
SEATA_ENVEnvironment identifier for multi-config isolation (dev, test, etc.)Unset
JVM_XMX / JVM_XMSJVM max / initial heap sizeAuto-calculated from cgroup limit; fallback 2048m
JVM_MaxDirectMemorySizeJVM max direct memory1024m
LOG_HOMELog directory path$HOME/logs/seata
TZContainer timezoneAsia/Shanghai