> ## Documentation Index
> Fetch the complete documentation index at: https://docs.powersync.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Storage Version 4 with Sync Rules

> What storage version 4 and S3 object storage mean for instances that still use Sync Rules.

<Info>
  Sync Rules are deprecated. For the Sync Streams version of this page, see [Storage Version 4](/sync/advanced/storage-version-4).
</Info>

Storage version 4 is a new version of the format the PowerSync Service uses to store the data it syncs to clients. It is in [Beta](/resources/feature-status) as of PowerSync Service v1.26.0. Once it is generally available, it becomes the default for all supported instances.

With Sync Rules, storage version 4 provides:

* Faster sync and faster reprocessing after a deployment.
* [S3 object storage](/sync/advanced/storage-version-4#s3-object-storage): larger blocks of synced data move from the storage database to S3. This reduces load on the storage database when many clients sync at once or sync large amounts of data. During the Beta, PowerSync enables it per instance on PowerSync Cloud. Self-hosted instances follow the [S3 setup instructions](/sync/advanced/storage-version-4#self-hosted-s3-setup).

[Incremental reprocessing](/sync/advanced/storage-version-4#incremental-reprocessing) requires Sync Streams. With Sync Rules, every deployment still reprocesses all data, and clients download all their data again. To use incremental reprocessing, [migrate to Sync Streams](/sync/rules/migrate-to-sync-streams).

## Opt In

Free plan instances on PowerSync Cloud are upgraded automatically during the Beta. On other plans, and on self-hosted instances, add `storage_version: 4` to the `config` block of your Sync Rules and deploy them:

```yaml theme={null}
config:
  storage_version: 4

bucket_definitions:
  user_lists:
    parameters: SELECT request.user_id() AS user_id
    data:
      - SELECT * FROM lists WHERE owner_id = bucket.user_id
```

Self-hosted instances must use MongoDB [bucket storage](/architecture/powersync-service#bucket-storage). Postgres bucket storage is not supported with version 4.

The first deployment on version 4 reprocesses all data in the background, and clients download their data again once.
