Last edited 2 hours ago
by Hua Jing

S3 filestore service

Revision as of 15:37, 15 July 2026 by Hua Jing (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When working on the S3 filestore features, a developer needs a local S3 service. Here we document two approaches.

Minio-based local S3 storage

Add to docker-compose.override.yaml:

x-common-dev: &x-common
...
  environment:
    FILESTORE_HOST: filestore
    FILESTORE_PORT: 9000
    FILESTORE_PROTOCOL: http
    FILESTORE_ACCESS_KEY: ${FILESTORE_ACCESS_KEY}
    FILESTORE_SECRET_KEY: ${FILESTORE_SECRET_KEY}
    FILESTORE_BUCKET_NAME: ${FILESTORE_BUCKET_NAME:-bluespice}
    FILESTORE_REGION: ${FILESTORE_REGION:-eu-north-1}
...

  filestore:
    image: minio/minio:latest
    container_name: ${COMPOSE_PROJECT_NAME:-bluespice}-filestore
    command: server /data --console-address ":9001"
    environment:
      MINIO_ROOT_USER: ${FILESTORE_ACCESS_KEY}
      MINIO_ROOT_PASSWORD: ${FILESTORE_SECRET_KEY}
    ports:
      - "9000:9000"
      - "9001:9001"
    volumes:
      - ${DATADIR}/filestore:/data
    restart: no

Also add to .env:

FILESTORE_ACCESS_KEY=...
FILESTORE_SECRET_KEY=...
FILESTORE_BUCKET_NAME=bluespice
FILESTORE_REGION=eu-north-1

Before starting the full stack:

  • create the $DATADIR/filestore directory manually
    • change its ownership to 0:0
  • run ./bluespice-deploy up -d filestore
    • access the MINIO webinterface in your browser at http://localhost:9001
    • Use the values of FILESTORE_ACCESS_KEY and FILESTORE_SECRET_KEY to log in.
    • You will need to manually create a bucket with the name of FILESTORE_BUCKET_NAME.

Then you can start the full stack with ./bluespice-deploy up -d.

Garage-based local S3 storage

Add to docker-compose.override.yaml:

x-common-dev: &x-common
  environment:
    FILESTORE_HOST: filestore
    FILESTORE_PORT: 9000
    FILESTORE_PROTOCOL: http
    FILESTORE_ACCESS_KEY: ${FILESTORE_ACCESS_KEY}
    FILESTORE_SECRET_KEY: ${FILESTORE_SECRET_KEY}
    FILESTORE_BUCKET_NAME: ${FILESTORE_BUCKET_NAME:-bluespice} 
    FILESTORE_REGION: ${FILESTORE_REGION:-eu-north-1}
services:
  wiki-installer:
    <<: *x-common
  wiki-web:
    <<: *x-common
    restart: no
  wiki-task:
    <<: *x-common
    restart: no
  filestore:
    image: dxflrs/garage:v2.3.0
    container_name: ${COMPOSE_PROJECT_NAME:-bluespice}-filestore
    command: /garage server --single-node --default-bucket
    environment:
      GARAGE_CONFIG_FILE: /etc/garage.toml
      # 32-byte-hex, e.g. openssl rand -hex 32
      GARAGE_RPC_SECRET: 8af47171e8a9c2d5147e885c84d2c63fe70616a3611518ddc1a6b516beb9dcd5
      GARAGE_DEFAULT_ACCESS_KEY: ${FILESTORE_ACCESS_KEY}
      GARAGE_DEFAULT_SECRET_KEY: ${FILESTORE_SECRET_KEY}
      GARAGE_DEFAULT_BUCKET: ${FILESTORE_BUCKET_NAME:-bluespice}
    ports:
      - "9000:9000"
      - "3903:3903"
    volumes:
      - ${DATADIR}/filestore/meta:/var/lib/garage/meta
      - ${DATADIR}/filestore/data:/var/lib/garage/data
    configs:
      - source: garage_toml
        target: /etc/garage.toml
        mode: 0444
    restart: no
configs:
  garage_toml:
    content: |
      metadata_dir = "/var/lib/garage/meta"
      data_dir = "/var/lib/garage/data"
      db_engine = "sqlite"

      replication_factor = 1

      rpc_bind_addr = "0.0.0.0:3901"
      rpc_public_addr = "filestore:3901"

      [s3_api]
      api_bind_addr = "0.0.0.0:9000"
      s3_region = "eu-north-1"

      [admin]
      api_bind_addr = "0.0.0.0:3903"

Also add to .env:

FILESTORE_ACCESS_KEY=...
FILESTORE_SECRET_KEY=...
FILESTORE_BUCKET_NAME=bluespice
FILESTORE_REGION=eu-north-1

Then you can start the full stack with ./bluespice-deploy up -d.


PDF exclude - start

To submit feedback about this documentation, visit our community forum.

PDF exclude - end