Skip to Content

Custom File System

Note: when you update the file system, existing files in the system (including original files for all sections/documents, converted markdown files, and all static assets) will not be migrated to the new file system automatically. You must migrate them manually. Switching file systems is a high-impact operation, so it is recommended to set this after account creation and avoid switching later.

Revornix supports custom storage locations. The installable file system types are:

  • Built-in file system (based on MinIO)
  • Aliyun OSS
  • Generic S3-compatible services
  • Amazon S3

How to add

Adding a file system is simple: go to Settings, then in the file settings group click the Manage button next to My File System to open the file system management page. Click Add File System to add a new one.

Configuration details

Built-in file system

This is the default Revornix storage option and it does not require extra configuration.

Aliyun OSS

This storage method uses STS authorization to ensure least privilege. For Aliyun STS details, see the official docs: https://help.aliyun.com/zh/oss/developer-reference/use-temporary-access-credentials-provided-by-sts-to-access-oss 

Steps

Creating an Aliyun OSS bucket is straightforward, so the steps are omitted here. The key requirement is that the assumed STS role has the object-access permissions Revornix needs.

  1. Create a user

Based on least-privilege, this user only needs permission to assume an STS temporary role. See step 5 for details.

  1. Create a role

  1. Create a policy

Match the permissions and resource group in the image to your own bucket and user. Missing permissions will cause failures.

  1. Attach the policy to the role

  2. Grant the user permission to assume the role

Aliyun storage parameters in Revornix

ParameterTypeDescription
user_access_key_idstringAliyun AccessKey ID
user_access_key_secretstringAliyun AccessKey Secret
role_arnstringARN of the assumed role
region_idstringOSS bucket region
endpoint_urlstringOSS endpoint URL
bucketstringOSS bucket name

Amazon S3

This storage method uses STS authorization to ensure least privilege. For AWS S3 setup, see this Medium article: https://bharat-singh-06.medium.com/access-s3-bucket-through-sts-security-token-service-f6c613b5db5f 

Steps

Creating an AWS S3 bucket is straightforward, so the steps are omitted here. The key requirement is that permissions and browser-upload CORS are configured correctly so Revornix can upload, read, and delete objects.

Bucket policy

{ "Version": "2012-10-17", "Statement": [ { "Sid": "Statement1", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::your_bucket_name/*" } ] }

CORS

[ { "AllowedHeaders": ["*"], "AllowedMethods": ["POST", "GET"], "AllowedOrigins": ["*"], "ExposeHeaders": ["ETag"], "MaxAgeSeconds": 3000 } ]
  1. Create a user

  1. Create a role

  1. Create a policy

Match the permissions and resources exactly as shown, and adapt to your resource group.

  1. Attach the policy to the role

  1. Grant the user permission to assume the role

AWS S3 storage parameters in Revornix

ParameterTypeDescription
role_arnstringARN of the assumed role
user_access_key_idstringUser AccessKey ID
user_access_key_secretstringUser AccessKey Secret
region_namestringBucket region
bucketstringBucket name

Generic S3-compatible services

Any service that supports the S3 protocol can use this method.

This method requires credentials with full object-storage permissions, including upload, download, delete, and list. It works best as a compatibility option for S3 services that are not covered by the dedicated providers above.

ParameterTypeDescription
user_access_key_idstringAccessKey ID
user_access_key_secretstringAccessKey Secret
region_namestringBucket region
endpoint_urlstringBucket endpoint URL, including the https:// prefix
bucketstringBucket name

Default file system and switching

  • Users can install multiple file systems, but uploads and generated assets always use the selected default file system.
  • Switching the default file system does not migrate historical files automatically.
  • Document uploads, audio uploads, document assets, section assets, and similar binary files all depend on the default file system.
Last updated on