Apache Seata(incubating) Naming Server
10K+
Seata Naming Server is the naming service and service discovery component in the Seata microservices architecture, providing features such as service registration, service discovery, cluster management, and health checking.
Start a seata-naming-server instance
$ docker run --name seata-naming-server -p 8081:8081 apache/seata-naming-server:latest
Important Note: If no configuration file is specified or console password is not configured, the naming-server image will automatically generate a random password at startup and display it in the console logs. Please use the following command to view the generated password:
$ docker logs seata-naming-server | grep "auto-generated password"
Start with environment variables
$ docker run --name seata-naming-server \
-p 8081:8081 \
-e SERVER_PORT=8081 \
-e SEATA_SECURITY_SECRETKEY=TXlDdXN0b21TZWNyZXRLZXlGb3JTZWF0YUpXVDIwMjQ= \
-e SEATA_SECURITY_TOKEN_VALIDITY=1800000 \
apache/seata-naming-server
Start with custom configuration file
$ docker run --name seata-naming-server \
-p 8081:8081 \
-v /PATH/TO/CONFIG_FILE/application.yml:/seata-namingserver/conf/application.yml \
apache/seata-naming-server
version: "3"
services:
seata-naming-server:
image: apache/seata-naming-server:latest
container_name: seata-naming-server
hostname: seata-naming-server
ports:
- "8081:8081"
- "10055:10055" # JMX port (optional)
environment:
- SERVER_PORT=8081
- SEATA_SECURITY_SECRETKEY=TXlDdXN0b21TZWNyZXRLZXlGb3JTZWF0YUpXVDIwMjQ=
- SEATA_SECURITY_TOKEN_VALIDITY=1800000
volumes:
- ./logs:/logs/seata
Notes:
seata)docker logs seata-naming-server | grep "auto-generated password"Container command line and log viewing
$ docker exec -it seata-naming-server sh
$ docker logs -f seata-naming-server
View auto-generated password
$ docker logs seata-naming-server 2>&1 | grep "auto-generated password"
The default configuration file path is /seata-namingserver/conf. It is recommended to use custom configuration files by mounting volumes:
$ docker run --name seata-naming-server \
-p 8081:8081 \
-v /PATH/TO/CONFIG_FILE/application.yml:/seata-namingserver/conf/application.yml \
apache/seata-naming-server
Custom configuration file example (application.yml):
server:
port: 8081
spring:
application:
name: seata-namingserver
logging:
config: classpath:logback-spring.xml
file:
path: ${log.home:${user.home}/logs/seata}
heartbeat:
threshold: 90000 # Heartbeat timeout threshold (milliseconds)
period: 60000 # Heartbeat period (milliseconds)
seata:
security:
# JWT secret key (must be Base64 encoded, generated with openssl rand -base64 32)
secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
# Token validity period (milliseconds)
tokenValidityInMilliseconds: 1800000
# CSRF ignored URLs
csrf-ignore-urls: /naming/v1/**,/api/v1/naming/**
ignore:
urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login,/version.json,/naming/v1/health,/error
# Console account configuration
console:
user:
username: admin # Console login username, default: seata
password: admin123 # Console login password, leave blank for auto-generated random password
seata-naming-server supports the following environment variables:
Optional, specifies the HTTP port for seata-naming-server startup, default is 8081
Optional, specifies the JWT Token signing key, must be a Base64 encoded string. Can be generated with
openssl rand -base64 32orecho -n "your-secret" | base64. Default value is a built-in key, strongly recommended to change in production environments.
Optional, specifies the JWT Token validity period (milliseconds), default is 1800000 (30 minutes)
Optional, specifies the heartbeat timeout threshold (milliseconds). If no heartbeat is received within this time, the service is considered unavailable. Default is 90000 (90 seconds)
Optional, specifies the heartbeat detection period (milliseconds), default is 60000 (60 seconds)
Important Note: Console account and password configuration does not support environment variables. They must be configured by mounting the application.yml configuration file.
Console login username, default is seata
Console login password. If this is not configured, the system will automatically generate an 8-character random password at startup and display it in the console logs. It is strongly recommended to configure a custom password in production environments.
Optional, specifies the log file storage path, default is ${user.home}/logs/seata
After successful startup, you can access the Naming Server console through the following methods:
Submit feedback https://github.com/apache/incubator-seata/issues
Content type
Image
Digest
sha256:8c81ec5c0…
Size
188.2 MB
Last updated
5 days ago
docker pull apache/seata-naming-serverPulls:
1,478
Last week