Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

refactor: update go verion server port to 9380 and 9381 (#20298)

Jin Hai7c102247c6e2
diff --git a/.github/workflows/sep-tests.yml b/.github/workflows/sep-tests.yml
index 156e93f862..ef7904c489 100644
--- a/.github/workflows/sep-tests.yml
+++ b/.github/workflows/sep-tests.yml
@@ -439,7 +439,7 @@ jobs:
# Engine-specific offset partitions keep concurrent engine jobs from
# choosing the same host ports when they land on the same self-hosted runner.
# A lock plus reservation file closes the check/start race between parallel jobs.
- PORT_BASES=(1200 1201 23817 23820 5432 5455 9000 9001 6379 6380 6381 6601 9380 9381 9382 9384 9383 9385 80 443 4222 8222 9900 8123)
+ PORT_BASES=(1200 1201 23817 23820 5432 5455 9000 9001 6379 6380 6381 6601 9380 9381 9382 9385 80 443 4222 8222 9900 8123)
PARTITION_SIZE=3000
# Keep every (base + offset) host port BELOW the Linux ephemeral
# range (net.ipv4.ip_local_port_range, default 32768-60999). An
@@ -603,8 +603,6 @@ jobs:
SVR_HTTP_PORT=$((9380 + PORT_OFFSET))
ADMIN_SVR_HTTP_PORT=$((9381 + PORT_OFFSET))
SVR_MCP_PORT=$((9382 + PORT_OFFSET))
- GO_HTTP_PORT=$((9384 + PORT_OFFSET))
- GO_ADMIN_PORT=$((9383 + PORT_OFFSET))
SANDBOX_EXECUTOR_MANAGER_PORT=$((9385 + PORT_OFFSET))
SVR_WEB_HTTP_PORT=$((80 + PORT_OFFSET))
SVR_WEB_HTTPS_PORT=$((443 + PORT_OFFSET))
@@ -613,7 +611,7 @@ jobs:
# Persist computed ports into .env so docker-compose uses the correct host bindings.
# Remove previous CI overrides first; docker compose uses the last duplicate key.
- sed -i '/^ES_PORT=/d;/^OS_PORT=/d;/^INFINITY_THRIFT_PORT=/d;/^INFINITY_HTTP_PORT=/d;/^INFINITY_PSQL_PORT=/d;/^EXPOSE_MYSQL_PORT=/d;/^MINIO_PORT=/d;/^MINIO_CONSOLE_PORT=/d;/^REDIS_PORT=/d;/^KVROCKS_PORT=/d;/^EXPOSE_NATS_PORT=/d;/^NATS_MONITORING_PORT=/d;/^TEI_PORT=/d;/^KIBANA_PORT=/d;/^SVR_HTTP_PORT=/d;/^ADMIN_SVR_HTTP_PORT=/d;/^SVR_MCP_PORT=/d;/^GO_HTTP_PORT=/d;/^GO_ADMIN_PORT=/d;/^SANDBOX_EXECUTOR_MANAGER_PORT=/d;/^SVR_WEB_HTTP_PORT=/d;/^SVR_WEB_HTTPS_PORT=/d;/^EXPOSE_CLICKHOUSE_TCP_PORT=/d;/^CLICKHOUSE_HTTP_PORT=/d;/^COMPOSE_PROFILES=/d;/^TEI_MODEL=/d;/^RAGFLOW_IMAGE=/d;/^DOC_ENGINE=/d;/^API_PROXY_SCHEME=/d' .env
+ sed -i '/^ES_PORT=/d;/^OS_PORT=/d;/^INFINITY_THRIFT_PORT=/d;/^INFINITY_HTTP_PORT=/d;/^INFINITY_PSQL_PORT=/d;/^EXPOSE_MYSQL_PORT=/d;/^MINIO_PORT=/d;/^MINIO_CONSOLE_PORT=/d;/^REDIS_PORT=/d;/^KVROCKS_PORT=/d;/^EXPOSE_NATS_PORT=/d;/^NATS_MONITORING_PORT=/d;/^TEI_PORT=/d;/^KIBANA_PORT=/d;/^SVR_HTTP_PORT=/d;/^ADMIN_SVR_HTTP_PORT=/d;/^SVR_MCP_PORT=/d;/^SANDBOX_EXECUTOR_MANAGER_PORT=/d;/^SVR_WEB_HTTP_PORT=/d;/^SVR_WEB_HTTPS_PORT=/d;/^EXPOSE_CLICKHOUSE_TCP_PORT=/d;/^CLICKHOUSE_HTTP_PORT=/d;/^COMPOSE_PROFILES=/d;/^TEI_MODEL=/d;/^RAGFLOW_IMAGE=/d;/^DOC_ENGINE=/d;/^API_PROXY_SCHEME=/d' .env
# docker-compose-go.yml uses env_file: .env-go for the ragflow-cpu
# container, so the Go server process reads COMPOSE_PROFILES and
# TEI_MODEL from .env-go (not .env). Without syncing these two,
@@ -641,8 +639,6 @@ jobs:
echo "SVR_HTTP_PORT=${SVR_HTTP_PORT}"
echo "ADMIN_SVR_HTTP_PORT=${ADMIN_SVR_HTTP_PORT}"
echo "SVR_MCP_PORT=${SVR_MCP_PORT}"
- echo "GO_HTTP_PORT=${GO_HTTP_PORT}"
- echo "GO_ADMIN_PORT=${GO_ADMIN_PORT}"
echo "SANDBOX_EXECUTOR_MANAGER_PORT=${SANDBOX_EXECUTOR_MANAGER_PORT}"
echo "SVR_WEB_HTTP_PORT=${SVR_WEB_HTTP_PORT}"
echo "SVR_WEB_HTTPS_PORT=${SVR_WEB_HTTPS_PORT}"
@@ -1016,7 +1012,7 @@ jobs:
# Engine-specific offset partitions keep concurrent engine jobs from
# choosing the same host ports when they land on the same self-hosted runner.
# A lock plus reservation file closes the check/start race between parallel jobs.
- PORT_BASES=(1200 1201 23817 23820 5432 5455 9000 9001 6379 6380 6381 6601 9380 9381 9382 9384 9383 9385 80 443 4222 8222 9900 8123)
+ PORT_BASES=(1200 1201 23817 23820 5432 5455 9000 9001 6379 6380 6381 6601 9380 9381 9382 9385 80 443 4222 8222 9900 8123)
PARTITION_SIZE=3000
# Keep every (base + offset) host port BELOW the Linux ephemeral
# range (net.ipv4.ip_local_port_range, default 32768-60999). An
@@ -1180,8 +1176,6 @@ jobs:
SVR_HTTP_PORT=$((9380 + PORT_OFFSET))
ADMIN_SVR_HTTP_PORT=$((9381 + PORT_OFFSET))
SVR_MCP_PORT=$((9382 + PORT_OFFSET))
- GO_HTTP_PORT=$((9384 + PORT_OFFSET))
- GO_ADMIN_PORT=$((9383 + PORT_OFFSET))
SANDBOX_EXECUTOR_MANAGER_PORT=$((9385 + PORT_OFFSET))
SVR_WEB_HTTP_PORT=$((80 + PORT_OFFSET))
SVR_WEB_HTTPS_PORT=$((443 + PORT_OFFSET))
@@ -1190,7 +1184,7 @@ jobs:
# Persist computed ports into .env so docker-compose uses the correct host bindings.
# Remove previous CI overrides first; docker compose uses the last duplicate key.
- sed -i '/^ES_PORT=/d;/^OS_PORT=/d;/^INFINITY_THRIFT_PORT=/d;/^INFINITY_HTTP_PORT=/d;/^INFINITY_PSQL_PORT=/d;/^EXPOSE_MYSQL_PORT=/d;/^MINIO_PORT=/d;/^MINIO_CONSOLE_PORT=/d;/^REDIS_PORT=/d;/^KVROCKS_PORT=/d;/^EXPOSE_NATS_PORT=/d;/^NATS_MONITORING_PORT=/d;/^TEI_PORT=/d;/^KIBANA_PORT=/d;/^SVR_HTTP_PORT=/d;/^ADMIN_SVR_HTTP_PORT=/d;/^SVR_MCP_PORT=/d;/^GO_HTTP_PORT=/d;/^GO_ADMIN_PORT=/d;/^SANDBOX_EXECUTOR_MANAGER_PORT=/d;/^SVR_WEB_HTTP_PORT=/d;/^SVR_WEB_HTTPS_PORT=/d;/^EXPOSE_CLICKHOUSE_TCP_PORT=/d;/^CLICKHOUSE_HTTP_PORT=/d;/^COMPOSE_PROFILES=/d;/^TEI_MODEL=/d;/^RAGFLOW_IMAGE=/d;/^DOC_ENGINE=/d;/^API_PROXY_SCHEME=/d' .env
+ sed -i '/^ES_PORT=/d;/^OS_PORT=/d;/^INFINITY_THRIFT_PORT=/d;/^INFINITY_HTTP_PORT=/d;/^INFINITY_PSQL_PORT=/d;/^EXPOSE_MYSQL_PORT=/d;/^MINIO_PORT=/d;/^MINIO_CONSOLE_PORT=/d;/^REDIS_PORT=/d;/^KVROCKS_PORT=/d;/^EXPOSE_NATS_PORT=/d;/^NATS_MONITORING_PORT=/d;/^TEI_PORT=/d;/^KIBANA_PORT=/d;/^SVR_HTTP_PORT=/d;/^ADMIN_SVR_HTTP_PORT=/d;/^SVR_MCP_PORT=/d;/^SANDBOX_EXECUTOR_MANAGER_PORT=/d;/^SVR_WEB_HTTP_PORT=/d;/^SVR_WEB_HTTPS_PORT=/d;/^EXPOSE_CLICKHOUSE_TCP_PORT=/d;/^CLICKHOUSE_HTTP_PORT=/d;/^COMPOSE_PROFILES=/d;/^TEI_MODEL=/d;/^RAGFLOW_IMAGE=/d;/^DOC_ENGINE=/d;/^API_PROXY_SCHEME=/d' .env
# docker-compose-go.yml uses env_file: .env-go for the ragflow-cpu
# container, so the Go server process reads COMPOSE_PROFILES and
# TEI_MODEL from .env-go (not .env). Without syncing these two,
@@ -1218,8 +1212,6 @@ jobs:
echo "SVR_HTTP_PORT=${SVR_HTTP_PORT}"
echo "ADMIN_SVR_HTTP_PORT=${ADMIN_SVR_HTTP_PORT}"
echo "SVR_MCP_PORT=${SVR_MCP_PORT}"
- echo "GO_HTTP_PORT=${GO_HTTP_PORT}"
- echo "GO_ADMIN_PORT=${GO_ADMIN_PORT}"
echo "SANDBOX_EXECUTOR_MANAGER_PORT=${SANDBOX_EXECUTOR_MANAGER_PORT}"
echo "SVR_WEB_HTTP_PORT=${SVR_WEB_HTTP_PORT}"
echo "SVR_WEB_HTTPS_PORT=${SVR_WEB_HTTPS_PORT}"
@@ -1528,7 +1520,7 @@ jobs:
# Engine-specific offset partitions keep concurrent engine jobs from
# choosing the same host ports when they land on the same self-hosted runner.
# A lock plus reservation file closes the check/start race between parallel jobs.
- PORT_BASES=(1200 1201 23817 23820 5432 5455 9000 9001 6379 6380 6381 6601 9380 9381 9382 9384 9383 9385 80 443 4222 8222 9900 8123)
+ PORT_BASES=(1200 1201 23817 23820 5432 5455 9000 9001 6379 6380 6381 6601 9380 9381 9382 9385 80 443 4222 8222 9900 8123)
PARTITION_SIZE=3000
# Keep every (base + offset) host port BELOW the Linux ephemeral
# range (net.ipv4.ip_local_port_range, default 32768-60999). An
@@ -1692,8 +1684,6 @@ jobs:
SVR_HTTP_PORT=$((9380 + PORT_OFFSET))
ADMIN_SVR_HTTP_PORT=$((9381 + PORT_OFFSET))
SVR_MCP_PORT=$((9382 + PORT_OFFSET))
- GO_HTTP_PORT=$((9384 + PORT_OFFSET))
- GO_ADMIN_PORT=$((9383 + PORT_OFFSET))
SANDBOX_EXECUTOR_MANAGER_PORT=$((9385 + PORT_OFFSET))
SVR_WEB_HTTP_PORT=$((80 + PORT_OFFSET))
SVR_WEB_HTTPS_PORT=$((443 + PORT_OFFSET))
@@ -1702,7 +1692,7 @@ jobs:
# Persist computed ports into .env so docker-compose uses the correct host bindings.
# Remove previous CI overrides first; docker compose uses the last duplicate key.
- sed -i '/^ES_PORT=/d;/^OS_PORT=/d;/^INFINITY_THRIFT_PORT=/d;/^INFINITY_HTTP_PORT=/d;/^INFINITY_PSQL_PORT=/d;/^EXPOSE_MYSQL_PORT=/d;/^MINIO_PORT=/d;/^MINIO_CONSOLE_PORT=/d;/^REDIS_PORT=/d;/^KVROCKS_PORT=/d;/^EXPOSE_NATS_PORT=/d;/^NATS_MONITORING_PORT=/d;/^TEI_PORT=/d;/^KIBANA_PORT=/d;/^SVR_HTTP_PORT=/d;/^ADMIN_SVR_HTTP_PORT=/d;/^SVR_MCP_PORT=/d;/^GO_HTTP_PORT=/d;/^GO_ADMIN_PORT=/d;/^SANDBOX_EXECUTOR_MANAGER_PORT=/d;/^SVR_WEB_HTTP_PORT=/d;/^SVR_WEB_HTTPS_PORT=/d;/^EXPOSE_CLICKHOUSE_TCP_PORT=/d;/^CLICKHOUSE_HTTP_PORT=/d;/^COMPOSE_PROFILES=/d;/^TEI_MODEL=/d;/^RAGFLOW_IMAGE=/d;/^DOC_ENGINE=/d;/^API_PROXY_SCHEME=/d' .env
+ sed -i '/^ES_PORT=/d;/^OS_PORT=/d;/^INFINITY_THRIFT_PORT=/d;/^INFINITY_HTTP_PORT=/d;/^INFINITY_PSQL_PORT=/d;/^EXPOSE_MYSQL_PORT=/d;/^MINIO_PORT=/d;/^MINIO_CONSOLE_PORT=/d;/^REDIS_PORT=/d;/^KVROCKS_PORT=/d;/^EXPOSE_NATS_PORT=/d;/^NATS_MONITORING_PORT=/d;/^TEI_PORT=/d;/^KIBANA_PORT=/d;/^SVR_HTTP_PORT=/d;/^ADMIN_SVR_HTTP_PORT=/d;/^SVR_MCP_PORT=/d;/^SANDBOX_EXECUTOR_MANAGER_PORT=/d;/^SVR_WEB_HTTP_PORT=/d;/^SVR_WEB_HTTPS_PORT=/d;/^EXPOSE_CLICKHOUSE_TCP_PORT=/d;/^CLICKHOUSE_HTTP_PORT=/d;/^COMPOSE_PROFILES=/d;/^TEI_MODEL=/d;/^RAGFLOW_IMAGE=/d;/^DOC_ENGINE=/d;/^API_PROXY_SCHEME=/d' .env
# docker-compose-go.yml uses env_file: .env-go for the ragflow-cpu
# container, so the Go server process reads COMPOSE_PROFILES and
# TEI_MODEL from .env-go (not .env). Without syncing these two,
@@ -1730,8 +1720,6 @@ jobs:
echo "SVR_HTTP_PORT=${SVR_HTTP_PORT}"
echo "ADMIN_SVR_HTTP_PORT=${ADMIN_SVR_HTTP_PORT}"
echo "SVR_MCP_PORT=${SVR_MCP_PORT}"
- echo "GO_HTTP_PORT=${GO_HTTP_PORT}"
- echo "GO_ADMIN_PORT=${GO_ADMIN_PORT}"
echo "SANDBOX_EXECUTOR_MANAGER_PORT=${SANDBOX_EXECUTOR_MANAGER_PORT}"
echo "SVR_WEB_HTTP_PORT=${SVR_WEB_HTTP_PORT}"
echo "SVR_WEB_HTTPS_PORT=${SVR_WEB_HTTPS_PORT}"
diff --git a/build.sh b/build.sh
index 2b684723a8..6d7b9905d2 100755
--- a/build.sh
+++ b/build.sh
@@ -999,13 +999,13 @@ run() {
ADMIN_PID=$!
# One trap for both background services: a second `trap ... EXIT INT TERM`
# would replace this one rather than add to it, leaving admin_server holding
- # port 9383 after the foreground server exits. INGESTOR_PID is cleared first
+ # port 9381 after the foreground server exits. INGESTOR_PID is cleared first
# so a value inherited from the environment cannot be signalled during the
# window before the ingestor starts.
INGESTOR_PID=""
trap 'kill "$ADMIN_PID" ${INGESTOR_PID:+"$INGESTOR_PID"} 2>/dev/null || true' EXIT INT TERM
- # Give admin_server a moment to bind its listening port (9383) before
+ # Give admin_server a moment to bind its listening port (9381) before
# ragflow_server starts sending heartbeats to it.
sleep 1
diff --git a/docker/.env b/docker/.env
index c9db7f4d25..12b716acb0 100644
--- a/docker/.env
+++ b/docker/.env
@@ -248,8 +248,6 @@ SVR_HTTP_PORT=9380
# access is supported).
ADMIN_SVR_HTTP_PORT=9381
SVR_MCP_PORT=9382
-GO_HTTP_PORT=9384
-GO_ADMIN_PORT=9383
# Password for the default superuser ([email protected]) that the admin server
# creates on first start when no superuser exists. When unset (and
diff --git a/docker/.env-go b/docker/.env-go
index 09268b524c..5cec604d42 100644
--- a/docker/.env-go
+++ b/docker/.env-go
@@ -249,8 +249,6 @@ SVR_WEB_HTTPS_PORT=443
SVR_HTTP_PORT=9380
ADMIN_SVR_HTTP_PORT=9381
SVR_MCP_PORT=9382
-GO_HTTP_PORT=9384
-GO_ADMIN_PORT=9383
# API_PROXY_SCHEME=hybrid # go and python hybrid deploy mode
API_PROXY_SCHEME=go # use go server deployment
diff --git a/docker/docker-compose-go.yml b/docker/docker-compose-go.yml
index dd19dace6e..0833f1d25c 100644
--- a/docker/docker-compose-go.yml
+++ b/docker/docker-compose-go.yml
@@ -55,8 +55,6 @@ services:
- ${SVR_WEB_HTTPS_PORT}:443
- ${SVR_HTTP_PORT}:9380
- ${ADMIN_SVR_HTTP_PORT}:9381
- - ${GO_HTTP_PORT}:9384
- - ${GO_ADMIN_PORT}:9383
volumes:
- ./ragflow-logs:/ragflow/logs
# - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
diff --git a/docker/nginx/ragflow.conf.golang b/docker/nginx/ragflow.conf.golang
index 685a8fd6ef..0c04b43d2a 100644
--- a/docker/nginx/ragflow.conf.golang
+++ b/docker/nginx/ragflow.conf.golang
@@ -11,37 +11,37 @@ server {
gzip_disable "MSIE [1-6]\.";
location ~ ^/api/v1/admin {
- proxy_pass http://127.0.0.1:9383;
+ proxy_pass http://127.0.0.1:9381;
include proxy.conf;
}
location ~ ^/api/v1/skills {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
location ~ ^/(v1|api) {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
location ~ ^/api/v1/datasets/search {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
location ~ ^/api/v1/chat/completions {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
location ~ ^/v1/system/config {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
location ~ ^/v1/user/(login|logout) {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
diff --git a/docker/nginx/ragflow.conf.hybrid b/docker/nginx/ragflow.conf.hybrid
index 3de5e1e0e8..275e817b0c 100644
--- a/docker/nginx/ragflow.conf.hybrid
+++ b/docker/nginx/ragflow.conf.hybrid
@@ -36,27 +36,27 @@ server {
}
location ~ ^/api/v1/admin {
- proxy_pass http://127.0.0.1:9383;
+ proxy_pass http://127.0.0.1:9381;
include proxy.conf;
}
location ~ ^/api/v1/skills {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
location ~ ^/api/v1/chat/completions {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
location ~ ^/v1/system/config {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
location ~ ^/v1/user/(login|logout) {
- proxy_pass http://127.0.0.1:9384;
+ proxy_pass http://127.0.0.1:9380;
include proxy.conf;
}
diff --git a/docs/develop/launch_ragflow_from_source.md b/docs/develop/launch_ragflow_from_source.md
index aacca6a50a..3ff8476b4b 100644
--- a/docs/develop/launch_ragflow_from_source.md
+++ b/docs/develop/launch_ragflow_from_source.md
@@ -143,7 +143,7 @@ docker compose -f docker/docker-compose-base.yml up -d
API_PROXY_SCHEME=python npm run dev
```
- The `python` proxy scheme routes API requests to the Python backend on port `9380`. Use `go` for the Go backend on port `9384`, or `hybrid` when running both backends.
+ The `python` proxy scheme routes API requests to the Python backend on port `9380`. Use `go` for the Go backend on port `9380`, or `hybrid` when running both backends.
*The following message appears, showing the IP address and port number of your frontend service:*
diff --git a/internal/cli/cli.go b/internal/cli/cli.go
index 1000e4b72f..99ea22bcf7 100644
--- a/internal/cli/cli.go
+++ b/internal/cli/cli.go
@@ -287,7 +287,7 @@ func ParseArgs(args []string) (*CommandLineConfig, error) {
defaultApiServerConfig.IP = "127.0.0.1"
}
if defaultApiServerConfig.Port == 0 {
- defaultApiServerConfig.Port = 9384
+ defaultApiServerConfig.Port = 9380
}
commandLineConfig.APIClientConfig.APIServerMap = config.APIServerMap
@@ -302,7 +302,7 @@ func ParseArgs(args []string) (*CommandLineConfig, error) {
case AdminMode:
AdminConfig := &AdminModeConfig{
AdminHost: "127.0.0.1",
- AdminPort: 9383,
+ AdminPort: 9381,
//AdminName: "[email protected]",
//AdminPassword: "admin",
}
diff --git a/internal/common/trusted_proxies.go b/internal/common/trusted_proxies.go
index c0744aa0f2..cd3753cbe1 100644
--- a/internal/common/trusted_proxies.go
+++ b/internal/common/trusted_proxies.go
@@ -26,7 +26,7 @@ import (
// headers gin honours when no `ragflow.trusted_proxies` list is configured.
// It covers the nginx that docker/entrypoint.sh starts inside the same
// container as this server: docker/nginx/ragflow.conf.golang proxies /v1 and
-// /api to 127.0.0.1:9384 and proxy.conf appends the caller to
+// /api to 127.0.0.1:9380 and proxy.conf appends the caller to
// X-Forwarded-For. Nothing else is trusted, so a request that reaches the
// server from any other peer is attributed to that peer regardless of the
// headers it carries.
diff --git a/internal/development.md b/internal/development.md
index 3bcebaab80..7b22cf1b0f 100644
--- a/internal/development.md
+++ b/internal/development.md
@@ -291,8 +291,8 @@ cd web && export API_PROXY_SCHEME=hybrid && npm run dev
```
## 4. Service Ports & API Routing
-- api server listens on port 9384 by default
-- admin server listens on port 9383 by default
+- api server listens on port 9380 by default
+- admin server listens on port 9381 by default
After updating or implementing an API, update the frontend development environment routes in web/vite.config.ts under proxySchemes.
diff --git a/internal/handler/agent_webhook_security_test.go b/internal/handler/agent_webhook_security_test.go
index feb8c612c3..fe69e87ea1 100644
--- a/internal/handler/agent_webhook_security_test.go
+++ b/internal/handler/agent_webhook_security_test.go
@@ -520,7 +520,7 @@ func TestValidateIPWhitelist_AllowsRealPeerDespiteSpoof(t *testing.T) {
// TestValidateIPWhitelist_BehindBundledProxy covers the shipped deployment:
// docker/entrypoint.sh runs nginx in the same container and
// docker/nginx/ragflow.conf.golang proxies the webhook route to
-// 127.0.0.1:9384 with X-Forwarded-For set by proxy.conf. The socket peer is
+// 127.0.0.1:9380 with X-Forwarded-For set by proxy.conf. The socket peer is
// therefore always loopback and the whitelist has to be evaluated against
// the forwarded address, which the loopback default in
// common.DefaultTrustedProxies makes gin.ClientIP() return.
diff --git a/internal/server/config/admin_config.go b/internal/server/config/admin_config.go
index 849726a01c..e9b5d9d5d5 100644
--- a/internal/server/config/admin_config.go
+++ b/internal/server/config/admin_config.go
@@ -28,7 +28,7 @@ type AdminConfig struct {
func (c *Config) ParseAdminConfig(v *viper.Viper) error {
// Default Admin config
c.admin.Host = "localhost"
- c.admin.HTTPPort = 9383
+ c.admin.HTTPPort = 9381
if !v.IsSet("admin") {
return nil
@@ -46,10 +46,6 @@ func (c *Config) ParseAdminConfig(v *viper.Viper) error {
c.admin.HTTPPort = sub.GetInt("http_port")
}
- if c.admin.HTTPPort == 9381 {
- c.admin.HTTPPort = 9383
- }
-
return nil
}
diff --git a/internal/server/config/api_server_config.go b/internal/server/config/api_server_config.go
index 3ec6f162fe..1fdb062dc3 100644
--- a/internal/server/config/api_server_config.go
+++ b/internal/server/config/api_server_config.go
@@ -45,7 +45,7 @@ func (c *Config) ParseAPIServerConfig(v *viper.Viper) error {
// Default Admin config
c.apiServer.Host = "localhost"
- c.apiServer.HTTPPort = 9384
+ c.apiServer.HTTPPort = 9380
if !v.IsSet("ragflow") {
return nil
@@ -63,10 +63,6 @@ func (c *Config) ParseAPIServerConfig(v *viper.Viper) error {
c.apiServer.HTTPPort = sub.GetInt("http_port")
}
- if c.apiServer.HTTPPort == 9380 {
- c.apiServer.HTTPPort = 9384
- }
-
if sub.IsSet("trusted_proxies") {
proxies := sub.GetStringSlice("trusted_proxies")
if proxies == nil {
diff --git a/internal/service/connector.go b/internal/service/connector.go
index 2f32f675b3..f0a4d6472b 100644
--- a/internal/service/connector.go
+++ b/internal/service/connector.go
@@ -660,9 +660,9 @@ func (s *ConnectorService) PollGoogleWebOAuthResult(ctx context.Context, userID,
func defaultGoogleWebOAuthRedirectURI(source string) string {
if source == "gmail" {
- return getEnvDefault(common.EnvGmailWebOAuthRedirectURI, "http://localhost:9384/api/v1/connectors/gmail/oauth/web/callback")
+ return getEnvDefault(common.EnvGmailWebOAuthRedirectURI, "http://localhost:9380/api/v1/connectors/gmail/oauth/web/callback")
}
- return getEnvDefault(common.EnvGoogleDriveWebOAuthRedirectURI, "http://localhost:9384/api/v1/connectors/google-drive/oauth/web/callback")
+ return getEnvDefault(common.EnvGoogleDriveWebOAuthRedirectURI, "http://localhost:9380/api/v1/connectors/google-drive/oauth/web/callback")
}
func getEnvDefault(key, fallback string) string {
@@ -1455,7 +1455,7 @@ func (s *ConnectorService) PollBoxWebOAuthResult(ctx context.Context, userID str
func defaultBoxWebOAuthRedirectURI() string {
return getEnvDefault(
common.EnvBoxWebOAuthRedirectURI,
- "http://localhost:9384/api/v1/connectors/box/oauth/web/callback",
+ "http://localhost:9380/api/v1/connectors/box/oauth/web/callback",
)
}
diff --git a/test/api/config.go b/test/api/config.go
index 385704f486..911990fcee 100644
--- a/test/api/config.go
+++ b/test/api/config.go
@@ -77,7 +77,7 @@ func InitServerTestConfig() *ServerTestConfig {
hostAddress := os.Getenv("HOST_ADDRESS")
if hostAddress == "" {
- hostAddress = "http://127.0.0.1:9384"
+ hostAddress = "http://127.0.0.1:9380"
}
zhipuAPIKey := os.Getenv("ZHIPU_AI_API_KEY")
diff --git a/test/testcases/configs.py b/test/testcases/configs.py
index 280b659ec4..b8331d979b 100644
--- a/test/testcases/configs.py
+++ b/test/testcases/configs.py
@@ -46,8 +46,6 @@ SDK_UNAUTHORIZED_ERROR_MESSAGE = "Invalid access token" if IS_GO_PROXY else "<Un
def _default_host_address() -> str:
- if API_PROXY_SCHEME == "go":
- return f"http://127.0.0.1:{_config_value('GO_HTTP_PORT', '9384')}"
return "http://127.0.0.1:9380"
diff --git a/test/testcases/restful_api/test_agents_go_mode.py b/test/testcases/restful_api/test_agents_go_mode.py
index 5f3ce5fea4..6ec00245dd 100644
--- a/test/testcases/restful_api/test_agents_go_mode.py
+++ b/test/testcases/restful_api/test_agents_go_mode.py
@@ -4,7 +4,7 @@ import pytest
pytestmark = pytest.mark.skipif(
os.environ.get("API_PROXY_SCHEME", "python") != "go",
- reason="Go mode only (set API_PROXY_SCHEME=go + bin/ragflow_server on 9384)",
+ reason="Go mode only (set API_PROXY_SCHEME=go + bin/ragflow_server on 9380)",
)
V2_DSL = {
diff --git a/test/testcases/restful_api/test_search_datasets_consistency.py b/test/testcases/restful_api/test_search_datasets_consistency.py
index 5ae072312a..4e47d5449c 100644
--- a/test/testcases/restful_api/test_search_datasets_consistency.py
+++ b/test/testcases/restful_api/test_search_datasets_consistency.py
@@ -15,7 +15,7 @@
# limitations under the License.
#
"""
-Search-datasets consistency tests between Python (port 9380) and Go (port 9384) servers.
+Search-datasets consistency tests between Python (port 9380) and Go (port 9380) servers.
Compares /api/v1/datasets/search endpoint responses for consistency between Python and Go.
When an LLM is involved (rerank_id, keyword, or cross_languages is set), both sides
@@ -54,7 +54,7 @@ logger.propagate = False
from test.testcases.utils import wait_for
PYTHON_HOST = "http://localhost:9380"
-GO_HOST = "http://localhost:9384"
+GO_HOST = "http://localhost:9380"
# ---------------------------------------------------------------------------
# Shared test documents
diff --git a/test/unit_test/test_testcases/test_config_host_address_unit.py b/test/unit_test/test_testcases/test_config_host_address_unit.py
index 62c808503a..7f66943861 100644
--- a/test/unit_test/test_testcases/test_config_host_address_unit.py
+++ b/test/unit_test/test_testcases/test_config_host_address_unit.py
@@ -16,7 +16,6 @@
import os
import subprocess
import sys
-from pathlib import Path
from types import SimpleNamespace
import pytest
@@ -26,7 +25,6 @@ pytestmark = pytest.mark.p2
CONFIG_ENV_KEYS = {
"API_PROXY_SCHEME",
- "GO_HTTP_PORT",
"HOST_ADDRESS",
"SVR_HTTP_PORT",
}
@@ -55,26 +53,6 @@ def test_explicit_host_address_wins():
assert _host_address(HOST_ADDRESS="http://example.test:1234", API_PROXY_SCHEME="go") == "http://example.test:1234"
-def test_default_host_address_only_changes_for_go_proxy_scheme():
- assert _host_address(API_PROXY_SCHEME="python") == "http://127.0.0.1:9380"
- assert _host_address(API_PROXY_SCHEME="python", SVR_HTTP_PORT="19380") == "http://127.0.0.1:9380"
- assert _host_address(API_PROXY_SCHEME="go") == "http://127.0.0.1:9384"
- assert _host_address(API_PROXY_SCHEME="go", GO_HTTP_PORT="19384") == "http://127.0.0.1:19384"
-
-
-def test_default_host_address_uses_docker_go_port(monkeypatch, tmp_path):
- from test.testcases import configs
-
- docker_env = tmp_path / "docker.env"
- docker_env.write_text("GO_HTTP_PORT=19384\n")
- monkeypatch.setattr(configs, "_DOCKER_ENV", Path(docker_env))
- monkeypatch.setattr(configs, "API_PROXY_SCHEME", "go")
- for key in CONFIG_ENV_KEYS:
- monkeypatch.delenv(key, raising=False)
-
- assert configs._default_host_address() == "http://127.0.0.1:19384"
-
-
def test_non_json_setup_response_is_only_tolerated_in_go_mode(monkeypatch):
from test.testcases import conftest
diff --git a/web/vite.config.ts b/web/vite.config.ts
index 71a3e50118..02afc7bb90 100644
--- a/web/vite.config.ts
+++ b/web/vite.config.ts
@@ -77,7 +77,7 @@ export default defineConfig(({ mode }) => {
hybrid: {
'^(/v1/document)|^(/v1/llm/list)|^(/api/v1/datasets)|^(/api/v1/documents/ingest)|^(/api/v1/memories)|^(/v1/user)|^(/v1/user/tenant_info)|^(/v1/tenant/list)|^(/v1/system/config)|^(/v1/user/login)|^(/v1/user/logout)|^(/api/v1/files)':
{
- target: 'http://127.0.0.1:9384/',
+ target: 'http://127.0.0.1:9380/',
changeOrigin: true,
ws: true,
},
@@ -88,7 +88,7 @@ export default defineConfig(({ mode }) => {
ws: true,
},
'/api/v1/admin': {
- target: 'http://127.0.0.1:9383/',
+ target: 'http://127.0.0.1:9381/',
changeOrigin: true,
ws: true,
},
@@ -99,12 +99,12 @@ export default defineConfig(({ mode }) => {
},
'^(/api/v1/users)|^(/api/v1/auth)|^(/api/v1/system/config)|^(/api/v1/system/version)|^(/api/v1/tenants)|^(/api/v1/chats)|^(/api/v1/searches)|^(/api/v1/files)|^(/api/v1/agents)':
{
- target: 'http://127.0.0.1:9384/',
+ target: 'http://127.0.0.1:9380/',
changeOrigin: true,
ws: true,
},
'^(/api/v1/chat/completions)': {
- target: 'http://127.0.0.1:9384/',
+ target: 'http://127.0.0.1:9380/',
changeOrigin: true,
ws: true,
},
@@ -121,17 +121,17 @@ export default defineConfig(({ mode }) => {
},
go: {
'/api/v1/admin': {
- target: 'http://127.0.0.1:9383/',
+ target: 'http://127.0.0.1:9381/',
changeOrigin: true,
ws: true,
},
'/api': {
- target: 'http://127.0.0.1:9384/',
+ target: 'http://127.0.0.1:9380/',
changeOrigin: true,
ws: true,
},
'/v1': {
- target: 'http://127.0.0.1:9384/',
+ target: 'http://127.0.0.1:9380/',
changeOrigin: true,
ws: true,
},