Object Storages

This guide describes how to register an object storage in AI Knowledge Fabric, so Topics can keep the original files of their documents in a bucket of your own instead of in the vector database.


1. What it is for

A Topic keeps three kinds of file content next to the search data:

  • the original of every document you upload,

  • the pictures taken from those documents (or uploaded on their own),

  • one small manifest per document that lists its pictures.

By default all of this lives in the vector database, as before. With an object storage it goes to a bucket of an S3-compatible service instead: AWS S3, or a service in your own network such as MinIO, Ceph, Garage or SeaweedFS.

Use an object storage when:

  • your documents are large. Milvus keeps files only up to about 48 KB; a larger document is not stored there at all and cannot be downloaded,

  • your own rules for backup, retention or encryption should apply to the original files,

  • you want the files outside the vector database.

The search works the same either way. The vector database still holds the text pieces and decides which documents a Topic has. The object storage holds only the files. A file in the bucket that no document refers to is a leftover, not a document. Search and chat do not need the object storage; while it is down, only uploads and downloads are affected.

Both options stay equal. A Topic that uses the vector database keeps working exactly as before. You do not need to move anything.

You register a storage once, then select it in as many Topics as you like. You (or your cloud provider) operate the service: the platform does not start an object storage for you and never creates a bucket.


2. Before you start

Switch the choice on

The choice is hidden by default. Until the Topic and GraphRAG containers that understand the new settings are released, an older container would silently ignore them and keep the files in the vector database anyway. So the File storage section in the wizards stays hidden and the REST API refuses an object storage while the switch is off.

Switch it on together with the release of the container images that include it, by setting OBJECT_STORAGE_ENABLED=true for the app (see Supported settings) and restarting the app. Check first that the Topic and GraphRAG images you start are from that release.

The admin page Admin → Object Storages is always there. You can register and test a storage before you switch the choice on.

Prepare the bucket

  • The bucket must exist already. This page never creates one.

  • Create an access key for the app and the Topics, or give the containers a role (see Credentials).

  • Give it only the rights below, bound to the base folder you will use.

Example policy for the bucket kf-files and the base folder kf:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:AbortMultipartUpload"],
      "Resource": "arn:aws:s3:::kf-files/kf/*"
    },
    {
      "Effect": "Allow",
      "Action": "s3:ListBucket",
      "Resource": "arn:aws:s3:::kf-files",
      "Condition": { "StringLike": { "s3:prefix": ["kf/*"] } }
    }
  ]
}
  • s3:ListBucket is used for the Topic’s health check. It also decides what a missing file looks like: without it, S3 answers 403 instead of 404 for a file that is not there, and the Topic reports the storage as unavailable.

  • The condition on s3:prefix keeps the key from listing other folders. A plain HeadBucket then fails, which is why the Topic checks the storage by listing one file of its own folder instead.

  • The policy is bound to the base folder, not to one Topic.

Topics on one entry share its keys

All Topics that use one entry share its access keys. In principle one Topic could read or delete the files of another. Every Topic always gets a folder of its own inside the bucket, so Topics do not overwrite each other, but the folder is a convention, not a barrier.

If you must keep customers or teams apart, register one entry per customer, each with its own bucket (or base folder) and its own keys.


3. Register the storage

Navigate to Admin → Object Storages and click Add Object Storage.

Viewing this page requires the SERVER_VIEW permission; Add, Edit and Delete require SERVER_MANAGE. If the buttons are missing, ask an administrator to check your role.

The list shows these columns: Name (with a Default badge for the preselected entry), Type, Endpoint (AWS when no address is set), Bucket and Used by (not used, 1 topic, N topics). The search field filters by name, bucket and endpoint.

Fill in the dialog

The dialog is modal on purpose: it does not close on a click outside or on Esc, because it may hold a secret you pasted that cannot be recovered.

Field Required Notes

Name

Yes

A name that tells you which storage this is, e.g. MinIO production. Shown in the Topic wizards. Names are unique, ignoring case

Type

Yes

S3 (AWS or compatible). The only type. It covers AWS and every service that speaks the same protocol

Service address

No

Leave empty for AWS S3. For your own server enter its address, e.g. minio.example.com. The Topics use this address to store and read files. Must start with http:// or https://, with no user name, password, ? or #

Region

For AWS

Required for AWS, e.g. eu-central-1. For your own server it can stay empty: us-east-1 is used, which such servers accept

Bucket

Yes

3 to 63 characters: lower-case letters, digits, dots and hyphens. The bucket must exist

Base folder

No

Optional folder inside the bucket, e.g. kf/prod. Every Topic gets its own folder below it. Empty means the top of the bucket. No empty, . or .. part

Use path-style addresses

No

On for most servers in your own network (MinIO, Ceph, Garage), off for AWS. It switches on by itself when you enter a service address. If a server answers "bucket not found" although the bucket exists, try the other setting

Authentication

Yes

Access key — see Credentials

Access key ID, Secret access key

For Access key

Both are required. The secret is never shown again after you save

The browser can reach this storage

No

Tick it only if people can open the service address in their browser, e.g. because it is public or on your company network. Needed for direct downloads

Direct downloads

No

Greyed out until the browser box is ticked — see Direct downloads

Address for direct downloads

No

Only with direct downloads: the address the browser must use, if it differs from the one the Topics use

Address used by this app

No

Only if this app reaches the storage under a different address than the Topics do. The app uses it for the connection test. The Topics never use it

Server-side encryption

No

Storage default, AES256 (keys of the storage) or aws:kms (a key of your AWS account). Leave it on the default if the bucket already encrypts everything

KMS key

No

Only with aws:kms: key ID or alias. Empty means the account’s default key

Preselect in new topics

No

The Topic wizards offer this storage first. Only one entry can have this; choosing it here removes it from another. It has an effect only while the choice is switched on

Description

No

Free-form note for your own documentation

Click Save. Addresses lose a trailing slash, and the base folder loses leading and trailing slashes.

Not allowed as an address: a link-local address (for example the cloud’s metadata service) and the address of the Kubernetes API. No server can be registered under them.

Credentials

Authentication What happens

Access key

The key pair is stored in this app and handed to every Topic that uses the entry. Use it for MinIO, Ceph, Garage and for AWS keys

An access key is stored unencrypted in the app’s database. It is never shown again and never returned by the REST API, but anyone who can read the database can read it. The platform also writes it as a literal environment variable into the generated Docker Compose file of every Topic that uses the entry. On Kubernetes it goes into the Topic’s own Secret (<name>-secrets), not into the Deployment; the key ID is a plain environment variable, as it is no secret. The downloadable manifest of a Topic contains the key in clear text, like every other credential (see the risk register).

Restrict who can read the app’s database, the compose directory and the Secrets, and give the key only the rights of the policy above.


4. Test the connection

The dialog has a Test Connection button. Use it before saving. It tests the values currently typed, saved or not. If the secret field is empty it uses the key stored for an existing entry. Each call has a timeout of 20 seconds, with no retries. The results appear as a list below the form.

Step What it does Success text

Bucket is reachable

Asks the storage for the bucket (HeadBucket)

The bucket answers.

Write a test file

Writes 18 bytes to <base folder>/.kf-connection-test/<id>, with the chosen encryption

A test file was written.

Read the test file back

Reads it and compares the bytes

The test file was read back unchanged.

Delete the test file

Deletes it again. It runs even if the read failed

The test file was deleted.

Direct download link

Only with Direct downloads: pre-signs a link valid for 2 minutes and opens it once from this app

A link opened from this app and delivered the file under the requested name. Whether people’s browsers can open it is not tested.

If a step fails, the steps that depend on it are shown as not tried. The test never creates the bucket.

A green result proves less than it looks. The test runs from this app, with the keys in the dialog. Topic containers and browsers may reach the storage under other addresses. A green test does not prove that a Topic can reach the storage.

Message Meaning

The access key or the secret is wrong.

Host and bucket are right; the key pair is not

Access denied. The keys are wrong, or they lack the right for this step.

The keys are accepted, but the policy lacks an action. Compare it with the example above

The bucket does not exist. This app does not create buckets.

Wrong bucket name, or create the bucket first

The bucket is in another region. Check the region. / The region does not match the one of the bucket.

Correct the Region

The host name cannot be resolved.

Wrong Service address

Nothing answers at that address and port.

The service is not running there, or the port is wrong

The secure connection failed. The certificate may not be trusted, or the address needs http:// instead of https://.

TLS and address do not match, or the certificate is not trusted by the app

The storage did not answer in time.

A firewall or a wrong address. The timeout is 20 seconds

The file that came back is not the one that was written.

The service changed the file. Do not use it

The link answered with status N. The address in the link may not be the one the storage expects, or the clocks of this app and the storage differ by minutes.

Direct download: check Address for direct downloads and the clocks

The link works, but the storage ignores the requested file name.

Direct download: downloads would arrive under the name of the object, not the document’s name


5. Use the storage in a Topic

In the wizard, the section File storage offers:

  • Vector database (current behaviour) — the default, as before,

  • every registered object storage, shown as Name (S3 · endpoint · bucket b · folder f).

With an object storage, every Topic gets a folder of its own below the Base folder of the entry. The wizards do not offer a different folder for a Topic for now; it can only be set through the REST API (fileStoragePrefix), where it replaces the Base folder for this Topic (e.g. tenant-a):

<folder>/<topic id>/documents/<file name>
<folder>/<topic id>/images/<picture id>
<folder>/<topic id>/manifests/<file name>.json

File names are percent-encoded in the key, so a / in a name never makes a folder. Every object also carries labels (kf-resource-id, kf-kind, kf-file-name) that make it recognisable when you browse the bucket.

The wizards: RAG Topic — step 3, Vector DB, below the vector database; GraphRAG Topic — step 1, section Storage. The Topic detail shows the choice in the row File Storage. See also RAG Topic, creation step by step and GraphRAG Topic, creation step by step.

When the choice can change

Choose before the first upload. The files are not moved when the choice changes.

Topic Rule

RAG Topic

Fixed once the Topic is created. The wizard has no edit mode

GraphRAG Topic

Can change in the edit wizard only while the Topic holds no documents. The app asks the running Topic whether it is empty. A Topic that is stopped, or does not answer, counts as not empty. A Topic that was never started is open. Files are not moved and the old folder is left as it is

Milvus: if the vector database is Milvus and the file storage is Vector database, the wizard warns that Milvus keeps files only up to about 48 KB. Choose an object storage to keep files of any size.

After a change on the entry

A change reaches a running Topic only after it is stopped and started again: the settings are handed to the container when it starts. This holds for new keys, the download settings and the encryption.

While a Topic uses an entry, the Type, Service address, Bucket and Base folder are locked, because the Topic’s files would no longer be found. The dialog says which Topics use the entry. You can still change the name, region, path-style setting, the authentication and keys, the download settings, the encryption and the texts — a wrong change there can break existing Topics, so check the Topics that are listed and restart them afterwards.


6. Downloads

A document is downloaded from the chat through the app and the Topic container. There are two ways:

Mode What happens

Through the Topic (default, PROXY)

The bytes travel from the storage to the Topic container, then through the app to the browser. Needs nothing else

Direct downloads

The Topic answers with a short-lived link of the storage and the browser fetches the file from there. The file never travels through the Topic or the app. Relieves the Topic with big files

Images always travel through the Topic, in either mode, so the Topic can mark them safe to show.

For direct downloads:

  1. Tick The browser can reach this storage. Without it, Direct downloads stays greyed out: every file would still travel through the app, so nothing is gained.

  2. Tick Direct downloads.

  3. If the browser must use another address than the Topics do (the Topics use minio:9000, people use files.example.com), enter it in Address for direct downloads. The link is signed for that address.

  4. Restart the Topics that use the entry.

Things to know:

  • The link is a secret for a short time. It works until it expires and cannot be withdrawn before. It lives as long as the download token of the chat link that earned it, and never longer than the Topic’s link lifetime setting (7 days at most). It is made for each request and never stored or logged.

  • The clocks must agree. A link is valid by the clock of the storage. Keep the Topic’s clock in step with it; a link whose clocks differ by more than its lifetime is refused.

  • There is no integrity check on a direct download (see Integrity).

  • If the Topic cannot create a link, the download fails with a clear error; it does not fall back to the other mode.

  • A deleted file gives the storage’s own 404 at the link, because the link is not checked for the file’s existence.

  • If the browser cannot reach the storage after all (the box is unticked but a Topic still hands out links, for example because it was not restarted), the app follows the link itself, once, and only to an address of the entry. It sends no login and no cookie. A link to any other host is refused.

Integrity

The Topic records a SHA-256 of every document when it is uploaded, and compares it with the bytes on every download that goes through the Topic. If someone changed a file in the bucket from outside, the download is still served, but the Topic logs one warning, counts it in the metric kf_file_store_integrity_mismatch_total and records it in the DEV report.

Limits: direct downloads are not checked. Images are not checked either. The manifest lies in the bucket and is protected only by the rights of the key.


7. Deleting Topics and files in the bucket

Deleting a Topic does not delete its files. The app treats the files like the data in the vector database and the graph database: it never removes them. The folder of the Topic (<folder>/<topic id>/) stays in the bucket, and so does the old folder when the file storage of a GraphRAG Topic is changed in the edit wizard. Neither stopping nor deleting a Topic container touches them either.

Removing them is up to you: delete the folder by hand, or set a lifecycle rule on the bucket that expires objects below the base folder after a time you choose. A file that was uploaded to a Topic and removed there again is deleted from the bucket by the Topic itself.

Deleting an entry only removes the registration here: the bucket and its files are untouched. An entry cannot be deleted while Topics use it.

A failed delete of a single document does not fail the delete of its search data; the leftover file in the bucket stays behind. There is no list of those yet, and no automatic cleanup. If you suspect leftovers, compare the bucket folder of the Topic with its documents.

Unfinished uploads. Large files are uploaded in parts. If a container is stopped in the middle of an upload (a rolling update, a crash), the started upload stays in the bucket: it is not listed as a file, but the storage still bills for its parts. Set a rule on the bucket that aborts unfinished multipart uploads after a few days (1 to 7 is usual). On AWS S3 this is the lifecycle rule Abort incomplete multipart uploads; MinIO and the other S3-compatible storages have an equivalent.


8. Observability

Every call a Topic makes to its file storage is measured, with these metrics:

  • kf_file_store_ops_seconds with op (put, get, delete, presign), backend (vector_store, s3) and outcome (succeeded, error, unreachable, timeout),

  • kf_file_store_bytes_total, kf_file_store_errors_total,

  • kf_file_store_integrity_mismatch_total.

No file name or bucket name is ever a label. The DEV report of an upload shows the decision file storage (type, bucket, host and folder, never a key) and a step store file for every file. The Topic’s health shows fileStore; it is not part of the readiness check, so a storage outage does not take search and chat out of service.


9. Kubernetes remark

Both Deployments of a Topic, the chat pods and the ingest pod, get the same file storage settings: the chat pods read files, the ingest pod writes them. The secret key is written into the Topic’s Secret (<name>-secrets), every other setting into the Deployments. A new key rolls both Deployments, and the ingest pod is recreated, so uploads pause for a short while.

  • There is no way to add a private CA certificate for the storage. Use a certificate the container’s Java trusts, or plain http inside the cluster.

  • The network policy of a Topic restricts incoming traffic only. Outgoing traffic to the storage is allowed.

  • The pods show fileStore as up or down on /health without a reason.

See Credentials for the key and its storage.


10. Troubleshooting

Symptom Cause and fix

The File storage section is missing in the wizard

The choice is switched off. See Switch the choice on

The wizard says the storage is not switched on and cannot be changed

An existing Topic has an entry while the switch is off. Switch it on

The REST API answers Object storage for files is not switched on in this installation

The same switch

Direct downloads is greyed out

Tick The browser can reach this storage first

Save is refused: "…cannot be changed while topics use the storage"

Type, Service address, Bucket or Base folder of an entry in use. Create a new entry and a new Topic instead

An entry cannot be deleted

Topics use it. Choose another file storage for them first

Upload fails with 503 and "file storage unavailable"

The Topic cannot write to the storage. Read the Topic’s log and DEV report; run Test Connection

A download fails with 503

The Topic cannot read from (or sign a link for) the storage

A download fails with 404

The file is not in the storage, or the key is not allowed to list the folder (see the ListBucket right in the policy)

The Topic log says the object storage does not know the access key / rejected the secret key

The key pair is wrong. Change it, then stop and start the Topic

The Topic log says the clock of this container and the object storage’s differ too much

Clock skew. Fix the clocks

The Topic log says the bucket does not exist / access denied

Wrong bucket name, or the policy lacks an action

The Topic log says no credentials found

The entry has no keys. Enter an access key

Test Connection passes, the Topic fails

The Topic reaches the storage under another address, or with another identity. See Test the connection

The Topic’s health shows fileStore down but chat works

By design: the storage affects only uploads and downloads. Fix the storage; the Topic recovers by itself

Files of deleted Topics remain in the bucket

By design: the app never deletes them. Remove the folder <folder>/<topic id>/ yourself, or set a lifecycle rule

The Topic keeps writing to the vector database

The container image does not know the file storage, or the Topic was not restarted after the entry was set. Use images from the release that includes it