---
title: Configuration File Guide
description: FastGPT configuration parameters explained
---

Since environment variables aren't ideal for complex configurations, newer versions of FastGPT use ConfigMap-style mounted configuration files. You can find the default config at `projects/app/data/config.json`. See the [Docker Compose deployment guide](/docs/self-host/deploy/docker/) for how to mount the config file.

**In development**, copy the example config `config.json` to `config.local.json` for it to take effect.

The example below includes system parameters and model configurations:

## Config File Example (v4.8.20+)

> Starting from v4.8.20, models are configured through the UI.

```json
{
  "feConfigs": {
    "lafEnv": "https://laf.dev" // Laf environment. Use https://laf.run (Hangzhou Alibaba Cloud) or your private Laf instance. Laf OpenAPI requires the latest version of Laf.
  },
  "systemEnv": {
    "vectorMaxProcess": 15, // Vector processing thread count
    "qaMaxProcess": 15, // Q&A splitting thread count
    "vlmMaxProcess": 15, // Vision-language model max processing threads
    "tokenWorkers": 50, // Token calculation worker count — keeps memory occupied, don't set too high
    "hnswEfSearch": 100, // Vector search parameter (PG and OB only). Higher = more accurate but slower. 100 gives 99%+ accuracy.
    "customPdfParse": {
      // Added in v4.9.0
      "url": "", // Custom PDF parsing service URL
      "key": "", // Custom PDF parsing service key
      "doc2xKey": "", // Doc2x service key
      "price": 0 // PDF parsing service price
    }
  }
}
```

## Custom PDF Parsing Configuration

Custom PDF parsing takes priority over Doc2x. If you're using Doc2x, don't configure a custom PDF service.

### Using Sealos PDF Parsing Service

#### 1. Get a Sealos AI Proxy API Key

[Open Sealos PDF Parser](https://hzh.sealos.run/?uid=fnWRt09fZP&openapp=system-aiproxy) and apply for an API key.

#### 2. Update FastGPT Configuration

Set `systemEnv.customPdfParse.url` to `https://aiproxy.hzh.sealos.run/v1/parse/pdf?model=parse-pdf`
Set `systemEnv.customPdfParse.key` to the API key from Sealos AI Proxy.

### Using Doc2x for PDF Parsing

`Doc2x` is a professional PDF parsing service.

#### 1. Sign Up for Doc2x

[Open Doc2x website](https://doc2x.noedgeai.com?inviteCode=9EACN2) and apply for an API key.

#### 2. Update FastGPT Configuration

Community Edition users: add `systemEnv.customPdfParse.doc2xKey` to your `config.json` with the API key, then restart the service.

Commercial Edition users: fill in the Doc2x service key in the Admin dashboard following the form instructions.

#### 3. Start Using It

When importing data to your knowledge base or configuring file uploads in your app, check `Enhanced PDF Parsing`. PDFs will then be parsed using the Doc2x service.

### Using Marker for PDF Parsing

[View the Marker integration tutorial](/docs/self-host/custom-models/marker)
