Skip to content

S3 Object Storage

Preparations

To install Seatable server and use S3 object storage, you need to do:

  • According to the SeaTable deployment document to install and deploy SeaTable server.
  • Install python library boto. It can be used to access S3 service.
sudo easy_install boto
  • Install and use Memcached. To improve performance, Seatable will cache some small objects in memcached. We recommend to allocate 128MB of memory to memcached. Modify memcached config file (Ubuntu: /etc/memcached.conf):
# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default
# Note that the daemon will grow to this size, but does not start out holding this much
# memory
# -m 64
-m 128

Modify seafile.conf

modify /opt/seatable/seatable-data/seatable/conf/seafile.conf

[commit_object_backend]
name = s3
# bucket's name can only use lowercase letters, numbers, and dashes
bucket = my-commit-objects
key_id = your-key-id
key = your-secret-key
memcached_options = --SERVER=memcached --POOL-MIN=10 --POOL-MAX=100

[fs_object_backend]
name = s3
# bucket's name can only use lowercase letters, numbers, and dashes
bucket = my-fs-objects
key_id = your-key-id
key = your-secret-key
memcached_options = --SERVER=memcached --POOL-MIN=10 --POOL-MAX=100

[block_backend]
name = s3
# bucket's name can only use lowercase letters, numbers, and dashes
bucket = my-block-objects
key_id = your-key-id
key = your-secret-key
memcached_options = --SERVER=memcached --POOL-MIN=10 --POOL-MAX=100

It is recommended that you create buckets for commit, fs and block objects respectively. key_id and key are used to provide S3 authentication. You can find the key_id and key in the "Security Credentials" section of your AWS account page.

When you create buckets on S3, please read the S3 rules for naming first. Note, especially do not use capital letters in the name of the bucket (do not use camel-style naming, such as MyCommitOjbects).

For best performance, it is strongly recommended that you install memcached and enable memcache for objects.

Use the new S3 service area

Since January 2014, the new AWS service area only provides version 4 certification and signing protocol support for S3. This includes such as China region, EU central regions.

To use S3 in the new service area, add the following additional options in the three buckets "commit_object_backend", "fs_object_backend", "block_backend":

use_v4_signature = true
# eu-central-1 for Frankfurt region
aws_region = eu-central-1

If you are using S3 in China or Germany, you also need to add the host configuration of the corresponding region under each bucket configuration section, for example, Beijing, China:

host = s3.cn-north-1.amazonaws.com.cn

In order for search and other services to work in the new AWS service area, you also need to add the following content to the ~/.boto file:

[s3]
use-sigv4 = True

Use HTTPS to connect to S3

You can use HTTPS to connect to S3. Add the following options to seafile.conf:

[commit_object_backend]
name = s3
......
use_https = true

[fs_object_backend]
name = s3
......
use_https = true

[block_backend]
name = s3
......
use_https = true

Use object storage products compatible with S3

There are already many object storage products compatible with S3 protocols, such as OpenStack Swift and Ceph's RGW. You can use object storage compatible with S3 through the following configuration:

[commit_object_backend]
name = s3
bucket = my-commit-objects
key_id = your-key-id
key = your-secret-key
host = 192.168.1.123:8080
path_style_request = true
memcached_options = --SERVER=memcached --POOL-MIN=10 --POOL-MAX=100

[fs_object_backend]
name = s3
bucket = my-fs-objects
key_id = your-key-id
key = your-secret-key
host = 192.168.1.123:8080
path_style_request = true
memcached_options = --SERVER=memcached --POOL-MIN=10 --POOL-MAX=100

[block_backend]
name = s3
bucket = my-block-objects
key_id = your-key-id
key = your-secret-key
host = 192.168.1.123:8080
path_style_request = true
memcached_options = --SERVER=memcached --POOL-MIN=10 --POOL-MAX=100

host is the address and port of the S3 compatible service. You can not add "http" or "https" before the option. By default, it will use http connection. If you want to use https connection, set the option:hostuse_https = true path_style_request option tells Seatable to use the form https://192.168.1.123:8080/bucketname/object to access the object. In AWS S3 service, the default URL format is virtual host format, such as https://bucketname.s3.amazonaws.com/object. But general object storage products do not support this format.