diff --git a/Dockerfile b/Dockerfile index 9962505c3..db9c0eb78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -77,7 +77,6 @@ ENV RUSTFS_ADDRESS=":9000" \ RUSTFS_ACCESS_KEY="rustfsadmin" \ RUSTFS_SECRET_KEY="rustfsadmin" \ RUSTFS_CONSOLE_ENABLE="true" \ - RUSTFS_EXTERNAL_ADDRESS="" \ RUSTFS_CORS_ALLOWED_ORIGINS="*" \ RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" \ RUSTFS_VOLUMES="/data" \ diff --git a/docker-compose-simple.yml b/docker-compose-simple.yml index ed60d261e..5827ccab8 100644 --- a/docker-compose-simple.yml +++ b/docker-compose-simple.yml @@ -15,7 +15,6 @@ services: - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - RUSTFS_CONSOLE_ENABLE=true - - RUSTFS_EXTERNAL_ADDRESS=:9000 - RUSTFS_CORS_ALLOWED_ORIGINS=* - RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=* - RUSTFS_ACCESS_KEY=rustfsadmin # CHANGEME @@ -47,7 +46,7 @@ services: retries: 3 start_period: 40s -# RustFS volume permissions fixer service + # RustFS volume permissions fixer service volume-permission-helper: image: alpine volumes: diff --git a/docker-compose.yml b/docker-compose.yml index 2fcebd535..ab422b3f1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,6 @@ services: - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - RUSTFS_CONSOLE_ENABLE=true - - RUSTFS_EXTERNAL_ADDRESS=:9000 # Same as internal since no port mapping - RUSTFS_CORS_ALLOWED_ORIGINS=* - RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=* - RUSTFS_ACCESS_KEY=rustfsadmin @@ -80,7 +79,6 @@ services: - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - RUSTFS_CONSOLE_ENABLE=true - - RUSTFS_EXTERNAL_ADDRESS=:9010 # External port mapping 9010 -> 9000 - RUSTFS_CORS_ALLOWED_ORIGINS=* - RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=* - RUSTFS_ACCESS_KEY=devadmin diff --git a/docs/ansible/binary-mnmd.yml b/docs/ansible/binary-mnmd.yml index afb4918fb..3bb7169de 100644 --- a/docs/ansible/binary-mnmd.yml +++ b/docs/ansible/binary-mnmd.yml @@ -88,7 +88,6 @@ RUSTFS_ADDRESS=":9000" RUSTFS_CONSOLE_ENABLE=true RUSTFS_OBS_LOG_DIRECTORY="/var/logs/rustfs/" - RUSTFS_EXTERNAL_ADDRESS=0.0.0.0:9000 owner: root group: root mode: '0644' diff --git a/docs/ansible/docker-compose-mnmd.yml b/docs/ansible/docker-compose-mnmd.yml index fbc3159f2..2eb1c985d 100644 --- a/docs/ansible/docker-compose-mnmd.yml +++ b/docs/ansible/docker-compose-mnmd.yml @@ -54,7 +54,6 @@ - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ENABLE=true - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - - RUSTFS_EXTERNAL_ADDRESS=0.0.0.0:9000 # Same as internal since no port mapping - RUSTFS_ACCESS_KEY=rustfsadmin - RUSTFS_SECRET_KEY=rustfsadmin - RUSTFS_CMD=rustfs diff --git a/docs/console-separation.md b/docs/console-separation.md index 7795b4fd4..aa038cefb 100644 --- a/docs/console-separation.md +++ b/docs/console-separation.md @@ -47,13 +47,8 @@ RustFS implements complete separation between the console web interface and the ``` Browser → Console (9001) → API Endpoint (9000) → Storage Backend - ↓ - External Address Configuration - (RUSTFS_EXTERNAL_ADDRESS) ``` -The console communicates with the API endpoint using the `RUSTFS_EXTERNAL_ADDRESS` parameter, which is critical for Docker deployments with port mapping. - ## Quick Start ### Local Development @@ -74,7 +69,6 @@ rustfs /data/volume docker run -d \ --name rustfs \ -p 9020:9000 -p 9021:9001 \ - -e RUSTFS_EXTERNAL_ADDRESS=":9020" \ rustfs/rustfs:latest # Access points: @@ -103,7 +97,6 @@ Use our enhanced deployment script for production-ready setup: | `address` | `RUSTFS_ADDRESS` | `:9000` | S3 API endpoint bind address | | `console_address` | `RUSTFS_CONSOLE_ADDRESS` | `:9001` | Console service bind address | | `console_enable` | `RUSTFS_CONSOLE_ENABLE` | `true` | Enable/disable console service | -| `external_address` | `RUSTFS_EXTERNAL_ADDRESS` | `:9000` | External endpoint address for console→API communication | ### CORS Configuration @@ -130,7 +123,6 @@ Use our enhanced deployment script for production-ready setup: ### Important Notes -- **External Address**: Critical for Docker deployments. Must match the host-mapped API port. - **TLS Configuration**: Console uses shared TLS certificates from `RUSTFS_TLS_PATH` (no separate cert config needed). - **Environment Priority**: Console security settings are read directly from environment variables. @@ -157,7 +149,6 @@ docker run -d \ --name rustfs-basic \ -p 9020:9000 \ # API: host 9020 → container 9000 -p 9021:9001 \ # Console: host 9021 → container 9001 - -e RUSTFS_EXTERNAL_ADDRESS=":9020" \ # Critical: must match host API port -e RUSTFS_CORS_ALLOWED_ORIGINS="http://localhost:9021" \ -v rustfs-data:/data \ rustfs/rustfs:latest @@ -223,12 +214,10 @@ The compose configuration provides: docker run -d \ --name rustfs-dev \ -p 9000:9000 -p 9001:9001 \ - -e RUSTFS_EXTERNAL_ADDRESS=":9000" \ -e RUSTFS_CORS_ALLOWED_ORIGINS="*" \ -e RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" \ -e RUSTFS_ACCESS_KEY="dev-admin" \ -e RUSTFS_SECRET_KEY="dev-secret" \ - -e RUST_LOG="debug" \ -v rustfs-dev-data:/data \ rustfs/rustfs:latest ``` @@ -319,8 +308,6 @@ spec: value: "0.0.0.0:9000" - name: RUSTFS_CONSOLE_ADDRESS value: "0.0.0.0:9001" - - name: RUSTFS_EXTERNAL_ADDRESS - value: ":9000" - name: RUSTFS_CORS_ALLOWED_ORIGINS value: "*" - name: RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS @@ -766,19 +753,11 @@ docker run -d \ **Symptoms**: Console UI shows connection errors, "Failed to load data" messages. -**Cause**: Incorrect `RUSTFS_EXTERNAL_ADDRESS` configuration. - **Solutions**: ```bash -# For Docker with port mapping 9020:9000 (API) and 9021:9001 (Console) -RUSTFS_EXTERNAL_ADDRESS=":9020" # Must match the mapped host API port - -# For direct access without port mapping -RUSTFS_EXTERNAL_ADDRESS=":9000" # Must match the API service port - # For Kubernetes or complex networking -RUSTFS_EXTERNAL_ADDRESS="http://rustfs-service:9000" # Use service name +# Use service name or proper endpoint URL ``` **Debug steps**: @@ -880,13 +859,13 @@ docker run -v /host/path/to/certs:/certs:ro rustfs/rustfs:latest docker logs rustfs-container # Enable debug logging -docker run -e RUST_LOG=debug rustfs/rustfs:latest +docker run rustfs/rustfs:latest # Check configuration docker exec rustfs-container env | grep RUSTFS # Test configuration outside Docker -RUST_LOG=debug rustfs --help +rustfs --help ``` #### 6. Health Check Failures @@ -1023,7 +1002,6 @@ RUSTFS_ADDRESS=":9000" # New separated configuration RUSTFS_ADDRESS=":9000" # API port (unchanged) RUSTFS_CONSOLE_ADDRESS=":9001" # Console port (new) -RUSTFS_EXTERNAL_ADDRESS=":9000" # For console→API communication ``` ##### 2. Update Firewall Rules @@ -1047,7 +1025,6 @@ docker run -p 9000:9000 rustfs/rustfs:legacy docker run \ -p 9000:9000 \ # API port -p 9001:9001 \ # Console port - -e RUSTFS_EXTERNAL_ADDRESS=":9000" \ rustfs/rustfs:latest ``` @@ -1080,7 +1057,6 @@ docker run -d \ --name rustfs-new \ -p 9000:9000 \ -p 9001:9001 \ - -e RUSTFS_EXTERNAL_ADDRESS=":9000" \ -e RUSTFS_CORS_ALLOWED_ORIGINS="http://localhost:9001" \ -v rustfs-data:/data \ rustfs/rustfs:latest @@ -1142,7 +1118,6 @@ docker run rustfs/rustfs:legacy-tag ```bash # New variables (add these) export RUSTFS_CONSOLE_ADDRESS=":9001" -export RUSTFS_EXTERNAL_ADDRESS=":9000" export RUSTFS_CORS_ALLOWED_ORIGINS="*" export RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" @@ -1259,9 +1234,6 @@ aws s3 ls --endpoint-url http://localhost:9000 # Allow all origins for development RUSTFS_CORS_ALLOWED_ORIGINS="*" RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" - - # Enable debug logging - RUST_LOG="debug" ``` 2. **Hot Reload Support** diff --git a/docs/examples/docker/docker-comprehensive.yml b/docs/examples/docker/docker-comprehensive.yml index 7a1555958..4488e6624 100644 --- a/docs/examples/docker/docker-comprehensive.yml +++ b/docs/examples/docker/docker-comprehensive.yml @@ -14,7 +14,6 @@ services: environment: - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - - RUSTFS_EXTERNAL_ADDRESS=:9000 - RUSTFS_CORS_ALLOWED_ORIGINS=http://127.0.0.1:9001 - RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=* - RUSTFS_ACCESS_KEY=admin @@ -42,7 +41,6 @@ services: environment: - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - - RUSTFS_EXTERNAL_ADDRESS=:9010 - RUSTFS_CORS_ALLOWED_ORIGINS=* - RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=* - RUSTFS_ACCESS_KEY=dev-admin @@ -72,7 +70,6 @@ services: environment: - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - - RUSTFS_EXTERNAL_ADDRESS=:9020 - RUSTFS_CORS_ALLOWED_ORIGINS=https://myapp.com,https://api.myapp.com - RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=https://admin.myapp.com - RUSTFS_CONSOLE_RATE_LIMIT_ENABLE=true @@ -108,7 +105,6 @@ services: environment: - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - - RUSTFS_EXTERNAL_ADDRESS=:9030 - RUSTFS_TLS_PATH=/certs - RUSTFS_CORS_ALLOWED_ORIGINS=https://enterprise.com - RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=https://admin.enterprise.com diff --git a/docs/examples/docker/docker-quickstart.sh b/docs/examples/docker/docker-quickstart.sh index 725523db8..5fab636b3 100755 --- a/docs/examples/docker/docker-quickstart.sh +++ b/docs/examples/docker/docker-quickstart.sh @@ -55,7 +55,6 @@ quick_basic() { --name rustfs-quick \ -p 9000:9000 \ -p 9001:9001 \ - -e RUSTFS_EXTERNAL_ADDRESS=":9000" \ -e RUSTFS_CORS_ALLOWED_ORIGINS="http://localhost:9001" \ -v rustfs-quick-data:/data \ rustfs/rustfs:latest @@ -79,7 +78,6 @@ quick_dev() { --name rustfs-dev \ -p 9010:9000 \ -p 9011:9001 \ - -e RUSTFS_EXTERNAL_ADDRESS=":9010" \ -e RUSTFS_CORS_ALLOWED_ORIGINS="*" \ -e RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" \ -e RUSTFS_ACCESS_KEY="dev-admin" \ @@ -110,7 +108,6 @@ quick_prod() { --name rustfs-prod \ -p 9020:9000 \ -p 127.0.0.1:9021:9001 \ - -e RUSTFS_EXTERNAL_ADDRESS=":9020" \ -e RUSTFS_CORS_ALLOWED_ORIGINS="https://myapp.com" \ -e RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="https://admin.myapp.com" \ -e RUSTFS_CONSOLE_RATE_LIMIT_ENABLE="true" \ diff --git a/docs/examples/docker/enhanced-docker-deployment.sh b/docs/examples/docker/enhanced-docker-deployment.sh index 8d99c5d19..0185de6b8 100755 --- a/docs/examples/docker/enhanced-docker-deployment.sh +++ b/docs/examples/docker/enhanced-docker-deployment.sh @@ -69,7 +69,6 @@ deploy_basic() { --name rustfs-basic \ -p 9020:9000 \ -p 9021:9001 \ - -e RUSTFS_EXTERNAL_ADDRESS=":9020" \ -e RUSTFS_CORS_ALLOWED_ORIGINS="http://localhost:9021,http://127.0.0.1:9021" \ -e RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" \ -e RUSTFS_ACCESS_KEY="basic-access" \ @@ -100,7 +99,6 @@ deploy_development() { --name rustfs-dev \ -p 9030:9000 \ -p 9031:9001 \ - -e RUSTFS_EXTERNAL_ADDRESS=":9030" \ -e RUSTFS_CORS_ALLOWED_ORIGINS="*" \ -e RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="*" \ -e RUSTFS_ACCESS_KEY="dev-access" \ @@ -148,7 +146,6 @@ EOF -p 127.0.0.1:9041:9001 \ -e RUSTFS_ADDRESS="0.0.0.0:9000" \ -e RUSTFS_CONSOLE_ADDRESS="0.0.0.0:9001" \ - -e RUSTFS_EXTERNAL_ADDRESS=":9040" \ -e RUSTFS_CORS_ALLOWED_ORIGINS="https://myapp.example.com" \ -e RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS="https://admin.example.com" \ -e RUSTFS_ACCESS_KEY="$ACCESS_KEY" \ diff --git a/docs/examples/docker/enhanced-security-deployment.sh b/docs/examples/docker/enhanced-security-deployment.sh index 63c401ae6..737c60776 100755 --- a/docs/examples/docker/enhanced-security-deployment.sh +++ b/docs/examples/docker/enhanced-security-deployment.sh @@ -127,7 +127,6 @@ deploy_rustfs() { -e RUSTFS_CORS_ALLOWED_ORIGINS="http://localhost:$API_PORT" \ -e RUSTFS_ACCESS_KEY="$RUSTFS_ACCESS_KEY" \ -e RUSTFS_SECRET_KEY="$RUSTFS_SECRET_KEY" \ - -e RUSTFS_EXTERNAL_ADDRESS=":$API_PORT" \ "$RUSTFS_IMAGE" /data # Wait for container to start diff --git a/docs/examples/mnmd/docker-compose.yml b/docs/examples/mnmd/docker-compose.yml index a3cc48228..3aa1b7803 100644 --- a/docs/examples/mnmd/docker-compose.yml +++ b/docs/examples/mnmd/docker-compose.yml @@ -25,7 +25,6 @@ x-node-template: &node-template - RUSTFS_ADDRESS=0.0.0.0:9000 - RUSTFS_CONSOLE_ENABLE=true - RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001 - - RUSTFS_EXTERNAL_ADDRESS=0.0.0.0:9000 # Same as internal since no port mapping - RUSTFS_ACCESS_KEY=rustfsadmin - RUSTFS_SECRET_KEY=rustfsadmin - RUSTFS_CMD=rustfs