document/content/self-host/upgrading/4-15/4154.en.mdx
FastGPT services now validate FE_DOMAIN at startup. Set it to the origin clients use to access
FastGPT, including the scheme, host, and optional port. Use the public client-facing origin in
production; local development can use http://localhost:3000.
FE_DOMAIN=https://fastgpt.example.com
Starting with V4.15.4, SYNC_INDEX is deprecated and replaced by MONGO_DEPRECATE_INDEX. The new variable controls whether indexes explicitly marked as deprecated by a schema are removed and defaults to true. Setting it to false skips only deprecated-index cleanup; missing current schema indexes are still created.
FastGPT now performs safe index synchronization automatically at startup:
This process does not call Mongoose's full syncIndexes() operation, so indexes are never removed simply because they are absent from a FastGPT schema.
Default and deletion boundary:
MONGO_DEPRECATE_INDEXdefaults totrue. It removes only built-in indexes that a FastGPT schema explicitly marks as deprecated and whose definitions match exactly; customer-created indexes are not removed. Give every custom index an explicit name instead of relying on MongoDB's key-derived default name to prevent collisions with built-in FastGPT index names.
Legacy index cleanup: V4.15.4 does not mark any existing historical indexes as deprecated, so upgrading to this version does not automatically remove old indexes. Future releases will explicitly mark verified obsolete indexes in their schemas and remove them incrementally.
To fully remove obsolete indexes before upgrading to V4.15.4:
SYNC_INDEX=true, restart the services, and wait for index synchronization to finish.V4.15.3 removes every index that is not declared in its schemas, which may include custom indexes. Back up your database and review the existing indexes before following this procedure. If custom indexes must be preserved, record their definitions and recreate them after synchronization, or do not use V4.15.3 for full cleanup.
Setting MONGO_DEPRECATE_INDEX=false skips deprecated-index cleanup that may be introduced in future releases, but does not skip creation of missing indexes.
.yaml files.