---
title: "Object storage | SurrealDB"
description: "Files and durable storage in the database. Define buckets over in-memory, file-system, or object-storage backends, and separate compute from storage."
url: https://surrealdb.com/surrealdb/storage
---

OBJECT STORAGE

# Storage that scales with you

Run SurrealDB embedded over a local engine, or separate compute from storage for a fault-tolerant, horizontally scalable cluster. Manage files as first-class citizens with buckets over in-memory, file-system, or object-storage backends - all through the same SurrealQL.

[Read the docs](https://surrealdb.com/docs/manage/self-hosted/deployment-models) [Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy)

1. ![Babcock](https://surrealdb.com/assets/static/babcock.lo4rnVg1.svg)
2. ![ING](https://surrealdb.com/assets/static/ing.X3I6S3_V.svg)
3. ![British Airways](https://surrealdb.com/assets/static/british-airways.KEsZiwV-.svg)
4. ![Nvidia](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)
5. ![Apple](https://surrealdb.com/assets/static/apple.D5pq4flY.svg)
6. ![SpaceX](https://surrealdb.com/assets/static/spacex.CQJEk-IL.svg)
7. ![Samsung](https://surrealdb.com/assets/static/samsung.CH-vQgnb.svg)
8. ![adidas](https://surrealdb.com/assets/static/adidas.DdTC5qhk.svg)
9. ![Tencent](https://surrealdb.com/assets/static/tencent.paQmLxyy.svg)
10. ![Alibaba](https://surrealdb.com/assets/static/alibaba.B16idgfM.svg)
11. ![PolyAI](https://surrealdb.com/assets/static/poly-ai.c3w_fAg6.svg)
12. ![Later](https://surrealdb.com/assets/static/later.Ds736jFO.svg)
13. ![Verizon](https://surrealdb.com/assets/static/verizon.BI7CajdX.svg)
14. ![Liberty Mutual](https://surrealdb.com/assets/static/liberty-mutual.B7qOU1pd.svg)
15. ![Walmart](https://surrealdb.com/assets/static/walmart.BjDg_Sr8.svg)
16. ![Carrier](https://surrealdb.com/assets/static/carrier.D21gC6NX.svg)
17. ![Saks Fifth Avenue](https://surrealdb.com/assets/static/saks-fifth-avenue.COIDpLSb.svg)
18. ![San Francisco Compute Company](https://surrealdb.com/assets/static/sfcc.B7jlImq4.svg)
19. ![Shield AI](https://surrealdb.com/assets/static/shield-ai.pINZ0KJr.svg)
20. ![Wix](https://surrealdb.com/assets/static/wix.DvHhmoBi.svg)

01 |STORAGE ENGINES

## One interface, pluggable backends

Point the same database at an in-memory engine for a throwaway test, a local file for a single node, or a distributed backend for production - and manage files without leaving SurrealQL.

PLUGGABLE ENGINES

## Start anywhere, move without rewrites

The storage engine is chosen at startup. The query language, schema, and application code are identical across all of them.

```
# In-memory: fast, ephemeral, ideal for testssurreal start memory# SurrealKV: embedded, versioned, single nodesurreal start surrealkv://production.db# RocksDB: embedded, high-throughputsurreal start rocksdb://production.db
```

FILE BUCKETS

## Files, defined and queried like data

DEFINE BUCKET registers a file store - in-memory, on disk, or an object-storage backend - and file operations become SurrealQL you can permission and transact.

```
DEFINE BUCKET uploads BACKEND "memory";f"uploads:/readme.txt".put("SurrealDB");f"uploads:/readme.txt".get();f"uploads:/readme.txt".copy("uploads:/readme.backup.txt");
```

## From a single binary to a distributed cluster

The same engine runs embedded in your application or spread across a fault-tolerant cluster with compute and storage scaling independently.

### [Embedded engines](https://surrealdb.com/docs/manage/self-hosted/deployment-models)

Run SurrealDB in-process over SurrealKV or RocksDB - no server to operate for local and edge workloads.

Learn more

### [Compute-storage separation](https://surrealdb.com/surrealdb/deep-dive#storage)

Scale query nodes and storage independently, so heavy read or write load never forces you to over-provision the other.

Learn more

### [Object-storage backends](https://surrealdb.com/surrealdb/deep-dive#storage)

Separate compute from storage over S3-compatible object storage, and define file buckets over in-memory or file-system backends - with cloud bucket backends landing in the 3.3 beta.

Learn more

### [Built-in durability](https://surrealdb.com/surrealdb/deep-dive#storage)

Replication and object-storage durability keep data safe through node loss, with recovery handled by the engine.

Learn more

### [File buckets](https://surrealdb.com/surrealdb/features#file-storage)

Manage uploads as first-class records - put, get, copy, and delete - permissioned and transactional in SurrealQL.

Learn more

### [Versioned reads](https://surrealdb.com/surrealdb/deep-dive#storage)

MVCC storage keeps history, so time-travel VERSION queries read the database as it was at a point in time.

Learn more

02 |ONE ENGINE

## Files and data in one system

Keeping documents in one store, blobs in another, and the metadata that ties them together in a third means three systems to secure, back up, and keep consistent. SurrealDB holds them together.

### One permission model

Buckets and records share the same access control, so a file is protected by the same rules as the row that references it.

### Scale each layer on its own

Separating compute from storage lets you add query capacity or durable capacity independently, without wasting either.

### No glue to maintain

File handling is SurrealQL, not a separate SDK and object-store integration you have to write and keep in sync.

## Keep exploring

### [Technical deep-dive](https://surrealdb.com/surrealdb/deep-dive#storage)

Compute-storage separation and the storage engines, in depth.

Explore

### [Deployment documentation](https://surrealdb.com/docs/manage/self-hosted/deployment-models)

Every storage engine and how to run it.

Explore

### [All features](https://surrealdb.com/surrealdb/features#file-storage)

The complete file-storage and scalability set.

Explore

GET STARTED

## Store everything in one engine

Run SurrealDB embedded or distributed, and manage files and data through the same SurrealQL.

![Samsung](https://surrealdb.com/assets/static/4c58b81e7b3c9466.C_Hv0eml.svg)![NVIDIA](https://surrealdb.com/assets/static/nvidia.DaIEuMil.svg)![Apple](https://surrealdb.com/assets/static/f7dc2519e0d212bc.Cn8MYAK7.svg)![Verizon](https://surrealdb.com/assets/static/18b99996c689000f.B5PQ-nI9.svg)![Tencent](https://surrealdb.com/assets/static/401d8346058682c8.DqM87mst.svg)

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

[Read the docs](https://surrealdb.com/docs/manage/self-hosted/deployment-models) [Start free with SurrealDB](https://studio.surrealdb.com/current/instances/deploy)

```json
{"@context":"https://schema.org","@type":"Organization","name":"SurrealDB","url":"https://surrealdb.com","logo":"https://surrealdb.com/assets/static/logo.BG7_TG2b.svg","description":"SurrealDB is the unified data layer for AI. A multi-model database for documents, graphs, vectors, and time-series.","foundingDate":"2022","legalName":"SurrealDB Ltd","identifier":{"@type":"PropertyValue","propertyID":"GB-COH","value":"13615201"},"address":{"@type":"PostalAddress","streetAddress":"3rd Floor, 1 Ashley Road","addressLocality":"Altrincham","addressRegion":"Cheshire","postalCode":"WA14 2DT","addressCountry":"GB"},"contactPoint":[{"@type":"ContactPoint","contactType":"customer support","email":"support@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"sales","email":"info@surrealdb.com","url":"https://surrealdb.com/contact","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"security","email":"security@surrealdb.com","url":"https://surrealdb.com/.well-known/security.txt","availableLanguage":"English"},{"@type":"ContactPoint","contactType":"legal","email":"legal@surrealdb.com","url":"https://surrealdb.com/legal","availableLanguage":"English"}],"hasCertification":[{"@type":"Certification","name":"SOC 2 Type 2"},{"@type":"Certification","name":"GDPR"},{"@type":"Certification","name":"Cyber Essentials Plus"},{"@type":"Certification","name":"ISO 27001"}],"owns":[{"@type":"SoftwareApplication","name":"SurrealDB","url":"https://surrealdb.com/surrealdb"},{"@type":"SoftwareApplication","name":"Agent Memory","url":"https://surrealdb.com/agent-memory"}],"knowsAbout":["multi-model databases","document databases","graph databases","vector search","time-series databases","SurrealQL","Agent Memory","real-time databases","embedded databases","context layer","graph ontology","distributed database","knowledge graphs","distributed transaction protocols","highly-scalable databases"],"sameAs":["https://www.wikidata.org/wiki/Q124316308","https://github.com/surrealdb/surrealdb","https://twitter.com/surrealdb","https://www.youtube.com/@surrealdb","https://www.linkedin.com/company/surrealdb","https://discord.gg/surrealdb","https://www.reddit.com/r/surrealdb","https://www.instagram.com/surrealdb","https://medium.com/surrealdb","https://dev.to/surrealdb"]}
```

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://surrealdb.com"},{"@type":"ListItem","position":2,"name":"SurrealDB","item":"https://surrealdb.com/surrealdb"},{"@type":"ListItem","position":3,"name":"Storage","item":"https://surrealdb.com/surrealdb/storage"}]}
```
