2020-06-12 15:55:04 +08:00
#
2025-01-08 09:49:56 +08:00
# Copyright 1999-2024 Alibaba Group Holding Ltd.
2020-06-12 15:55:04 +08:00
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
2020-03-26 12:06:35 +08:00
#*************** Spring Boot Related Configurations ***************#
### Default web context path:
server.servlet.contextPath = /nacos
2022-07-25 09:56:20 +08:00
### Include message field
2022-08-30 10:21:29 +08:00
server.error.include-message = ALWAYS
2020-03-26 12:06:35 +08:00
### Default web server port:
2022-10-24 20:06:53 +08:00
server.port = 8848
2020-03-26 12:06:35 +08:00
#*************** Network Related Configurations ***************#
### If prefer hostname over ip for Nacos server addresses in cluster.conf:
# nacos.inetutils.prefer-hostname-over-ip=false
### Specify local server's IP:
# nacos.inetutils.ip-address=
#*************** Config Module Related Configurations ***************#
2022-11-08 09:22:33 +08:00
### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced.
2020-05-03 20:26:35 +08:00
# spring.datasource.platform=mysql
2022-11-11 11:28:22 +08:00
# nacos.plugin.datasource.log.enabled=true
2022-12-08 15:18:21 +08:00
#spring.sql.init.platform=mysql
2020-03-26 12:06:35 +08:00
### Count of DB:
# db.num=1
### Connect URL of DB:
2025-01-08 09:49:56 +08:00
#db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
#db.user=nacos
#db.password=nacos
2020-11-18 21:09:47 +08:00
2023-08-04 12:03:08 +08:00
### the maximum retry times for push
nacos.config.push.maxRetryTime = 50
2020-03-26 12:06:35 +08:00
#*************** Naming Module Related Configurations ***************#
### Data dispatch task execution period in milliseconds:
### If enable data warmup. If set to false, the server would accept request without local data preparation:
# nacos.naming.data.warmup=true
### If enable the instance auto expiration, kind like of health check of instance:
# nacos.naming.expireInstance=true
nacos.naming.empty-service.auto-clean = true
nacos.naming.empty-service.clean.initial-delay-ms = 50000
nacos.naming.empty-service.clean.period-time-ms = 30000
#*************** CMDB Module Related Configurations ***************#
### The interval to dump external CMDB in seconds:
# nacos.cmdb.dumpTaskInterval=3600
### The interval of polling data change event in seconds:
# nacos.cmdb.eventTaskInterval=10
### The interval of loading labels in seconds:
# nacos.cmdb.labelTaskInterval=300
### If turn on data loading task:
# nacos.cmdb.loadDataAtStart=false
#*************** Metrics Related Configurations ***************#
### Metrics for prometheus
2022-04-08 13:00:57 +08:00
#management.endpoints.web.exposure.include=*
2020-03-26 12:06:35 +08:00
### Metrics for elastic search
2025-01-08 09:49:56 +08:00
management.elastic.metrics.export.enabled = false
#management.elastic.metrics.export.host=http://localhost:9200
2020-03-26 12:06:35 +08:00
### Metrics for influx
2025-01-08 09:49:56 +08:00
management.influx.metrics.export.enabled = false
#management.influx.metrics.export.db=springboot
#management.influx.metrics.export.influx.uri=http://localhost:8086
#management.influx.metrics.export.influx.auto-create-db=true
#management.influx.metrics.export.influx.consistency=one
#management.influx.metrics.export.influx.compressed=true
2020-03-26 12:06:35 +08:00
#*************** Access Log Related Configurations ***************#
### If turn on the access log:
2019-02-27 20:00:05 +08:00
server.tomcat.accesslog.enabled = true
2020-03-26 12:06:35 +08:00
2022-06-07 15:22:16 +08:00
### accesslog automatic cleaning time
2021-05-26 10:11:41 +08:00
server.tomcat.accesslog.max-days = 30
2020-03-26 12:06:35 +08:00
### The access log pattern:
2020-05-06 18:33:18 +08:00
server.tomcat.accesslog.pattern = %h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
2020-03-26 12:06:35 +08:00
### The directory of access log:
2022-06-07 15:22:16 +08:00
server.tomcat.basedir = file:.
2022-09-26 10:08:37 +08:00
2020-03-26 12:06:35 +08:00
#*************** Access Control Related Configurations ***************#
### If enable spring security, this option is deprecated in 1.2.0:
2019-02-27 20:00:05 +08:00
#spring.security.enabled=false
2020-03-26 12:06:35 +08:00
### The ignore urls of auth, is deprecated in 1.2.0:
2020-11-12 09:18:45 +08:00
nacos.security.ignore.urls = /,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
2019-12-11 19:25:33 +08:00
2022-01-12 16:45:18 +08:00
### The auth system to use, currently only 'nacos' and 'ldap' is supported:
nacos.core.auth.system.type = nacos
2020-03-26 12:06:35 +08:00
2024-08-27 15:59:37 +08:00
### If turn on auth system v3:
2022-01-12 16:45:18 +08:00
nacos.core.auth.enabled = false
2024-11-21 16:38:13 +08:00
nacos.core.auth.console.enabled = true
2020-03-26 12:06:35 +08:00
### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.
nacos.core.auth.caching.enabled = true
2021-01-14 21:02:28 +08:00
### Since 1.4.1, Turn on/off white auth for user-agent: nacos-server, only for upgrade from old version.
nacos.core.auth.enable.userAgentAuthWhite = false
### Since 1.4.1, worked when nacos.core.auth.enabled=true and nacos.core.auth.enable.userAgentAuthWhite=false.
### The two properties is the white list for auth and used by identity the request from other server.
2023-03-16 11:08:33 +08:00
nacos.core.auth.server.identity.key =
nacos.core.auth.server.identity.value =
2020-03-26 12:06:35 +08:00
2022-01-26 11:54:52 +08:00
### worked when nacos.core.auth.system.type=nacos
### The token expiration in seconds:
2023-02-10 10:51:05 +08:00
nacos.core.auth.plugin.nacos.token.cache.enable = false
2022-01-26 11:54:52 +08:00
nacos.core.auth.plugin.nacos.token.expire.seconds = 18000
2022-11-03 13:40:26 +08:00
### The default token (Base64 string):
2023-02-22 10:52:13 +08:00
#nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
nacos.core.auth.plugin.nacos.token.secret.key =
2022-01-26 11:54:52 +08:00
### worked when nacos.core.auth.system.type=ldap, {0} is Placeholder,replace login username
2022-04-11 10:29:45 +08:00
#nacos.core.auth.ldap.url=ldap://localhost:389
#nacos.core.auth.ldap.basedc=dc=example,dc=org
#nacos.core.auth.ldap.userDn=cn=admin,${nacos.core.auth.ldap.basedc}
#nacos.core.auth.ldap.password=admin
#nacos.core.auth.ldap.userdn=cn={0},dc=example,dc=org
2022-09-20 11:56:44 +08:00
#nacos.core.auth.ldap.filter.prefix=uid
2022-11-07 17:24:53 +08:00
#nacos.core.auth.ldap.case.sensitive=true
2023-06-07 13:28:47 +08:00
#nacos.core.auth.ldap.ignore.partial.result.exception=false
2022-04-11 10:29:45 +08:00
2023-09-22 16:59:25 +08:00
#*************** Control Plugin Related Configurations ***************#
# plugin type
#nacos.plugin.control.manager.type=nacos
# local control rule storage dir, default ${nacos.home}/data/connection and ${nacos.home}/data/tps
#nacos.plugin.control.rule.local.basedir=${nacos.home}
# external control rule storage type, if exist
#nacos.plugin.control.rule.external.storage=
2023-01-16 10:04:24 +08:00
#*************** Config Change Plugin Related Configurations ***************#
# webhook
2023-09-22 16:59:25 +08:00
#nacos.core.config.plugin.webhook.enabled=false
2023-01-16 10:04:24 +08:00
# It is recommended to use EB https://help.aliyun.com/document_detail/413974.html
2023-09-22 16:59:25 +08:00
#nacos.core.config.plugin.webhook.url=http://localhost:8080/webhook/send?token=***
2023-01-16 10:04:24 +08:00
# The content push max capacity ,byte
2023-09-22 16:59:25 +08:00
#nacos.core.config.plugin.webhook.contentMaxCapacity=102400
2023-01-16 10:04:24 +08:00
# whitelist
2023-09-22 16:59:25 +08:00
#nacos.core.config.plugin.whitelist.enabled=false
2023-01-16 10:04:24 +08:00
# The import file suffixs
2023-09-22 16:59:25 +08:00
#nacos.core.config.plugin.whitelist.suffixs=xml,text,properties,yaml,html
2023-01-16 10:04:24 +08:00
# fileformatcheck,which validate the import file of type and content
2023-09-22 16:59:25 +08:00
#nacos.core.config.plugin.fileformatcheck.enabled=false
2021-08-13 13:43:58 +08:00
2020-03-26 12:06:35 +08:00
#*************** Istio Related Configurations ***************#
### If turn on the MCP server:
nacos.istio.mcp.server.enabled = false
2020-06-05 09:02:17 +08:00
###*************** Add from 1.3.0 ***************###
2020-04-30 20:02:54 +08:00
#*************** Core Related Configurations ***************#
### set the WorkerID manually
# nacos.core.snowflake.worker-id=
### Member-MetaData
# nacos.core.member.meta.site=
# nacos.core.member.meta.adweight=
# nacos.core.member.meta.weight=
### MemberLookup
### Addressing pattern category, If set, the priority is highest
2020-06-01 21:54:29 +08:00
# nacos.core.member.lookup.type=[file,address-server]
2020-04-30 20:02:54 +08:00
## Set the cluster list with a configuration file or command-line argument
# nacos.member.list=192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809
## for AddressServerMemberLookup
# Maximum number of retries to query the address server upon initialization
# nacos.core.address-server.retry=5
2020-08-05 16:54:28 +08:00
## Server domain name address of [address-server] mode
# address.server.domain=jmenv.tbsite.net
## Server port of [address-server] mode
# address.server.port=8080
## Request address of [address-server] mode
# address.server.url=/nacos/serverlist
2020-04-30 20:02:54 +08:00
#*************** JRaft Related Configurations ***************#
2020-03-26 12:06:35 +08:00
### Sets the Raft cluster election timeout, default value is 5 second
2020-04-30 20:02:54 +08:00
# nacos.core.protocol.raft.data.election_timeout_ms=5000
2020-03-26 12:06:35 +08:00
### Sets the amount of time the Raft snapshot will execute periodically, default is 30 minute
2020-04-30 20:02:54 +08:00
# nacos.core.protocol.raft.data.snapshot_interval_secs=30
2020-03-26 12:06:35 +08:00
### raft internal worker threads
2020-04-30 20:02:54 +08:00
# nacos.core.protocol.raft.data.core_thread_num=8
2020-03-26 12:06:35 +08:00
### Number of threads required for raft business request processing
2020-04-30 20:02:54 +08:00
# nacos.core.protocol.raft.data.cli_service_thread_num=4
2020-05-30 17:28:25 +08:00
### raft linear read strategy. Safe linear reads are used by default, that is, the Leader tenure is confirmed by heartbeat
2020-04-30 20:02:54 +08:00
# nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe
2020-03-26 12:06:35 +08:00
### rpc request timeout, default 5 seconds
2020-06-05 09:02:17 +08:00
# nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000
2022-11-17 11:13:51 +08:00
### enable to support prometheus service discovery
#nacos.prometheus.metrics.enabled=true
2024-08-21 13:53:08 +08:00
2024-11-07 10:34:57 +08:00
#************** Console UI Configuration ***************#
### Turn on/off the nacos console ui.
#nacos.console.ui.enabled=true
2024-11-21 15:19:08 +08:00
###*************** Add from 3.0.0 ***************###
2024-08-21 13:53:08 +08:00
#*************** Deployment Type Configuration ***************#
2024-11-07 10:34:57 +08:00
2024-12-17 15:33:47 +08:00
### Sets the deployment type: 'merged' for joint deployment, 'server' for separate deployment server only, 'console' for separate deployment console only.
2024-11-07 10:34:57 +08:00
nacos.deployment.type = merged
#************** Nacos Admin Compatibility Related Configurations ***************#
### Enabled for open API compatibility
# nacos.core.api.compatibility.client.enabled=true
### Enabled for admin API compatibility
# nacos.core.api.compatibility.admin.enabled=true
### Enabled for console API compatibility
2024-11-21 15:19:08 +08:00
# nacos.core.api.compatibility.console.enabled=false
#*************** K8s Related Configurations ***************#
### If turn on the K8s sync:
nacos.k8s.sync.enabled = false
### If use the Java API from an application outside a kubernetes cluster
#nacos.k8s.sync.outsideCluster=false
2025-01-02 12:00:39 +08:00
#nacos.k8s.sync.kubeConfig=/.kube/config
#*************** DistributedLock Configurations ***************#
# nacos.lock.default_expire_time = 30000000
# nacos.lock.max_expire_time = 1800000000