Skip to content

Storage Providers

Slink stores images on the local filesystem by default. Set the STORAGE_PROVIDER environment variable to local, smb, or s3 to choose a backend.

ProviderBest forKey variables
Local (local)Single-host deployments (default)None
SMB / CIFS (smb)Shared network or NAS storageSMB_HOST, SMB_SHARE, SMB_USERNAME, SMB_PASSWORD
Amazon S3 (s3)Cloud / scalable object storageAMAZON_S3_REGION, AMAZON_S3_BUCKET, AMAZON_S3_ACCESS_KEY_ID, AMAZON_S3_SECRET_ACCESS_KEY

The default provider. Stores images on the container’s local filesystem and needs no configuration beyond STORAGE_PROVIDER=local.

VariableRequiredDescription
STORAGE_PROVIDERYesSet to local (default).

Stores images on a network share over the SMB/CIFS protocol. Useful for centralized storage in enterprise environments.

VariableRequiredDescription
STORAGE_PROVIDERYesSet to smb.
SMB_HOSTYesHostname or IP address of the SMB server.
SMB_SHAREYesName of the SMB share to use.
SMB_USERNAMEYesUsername for authentication.
SMB_PASSWORDYesPassword for authentication.
SMB_WORKGROUPNoSMB workgroup (defaults to workgroup).
environment:
STORAGE_PROVIDER: smb
SMB_HOST: 192.168.1.100
SMB_SHARE: slink-storage
SMB_USERNAME: slink-user
SMB_PASSWORD: your-secure-password
SMB_WORKGROUP: workgroup

Stores images in an Amazon S3 bucket (or any S3-compatible service). Ideal for cloud deployments and scalable object storage.

VariableRequiredDescription
STORAGE_PROVIDERYesSet to s3.
AMAZON_S3_BUCKETYesName of your S3 bucket.
AMAZON_S3_REGIONAmazon S3 onlyAWS region of your bucket (e.g. us-east-1). Optional for custom S3-compatible providers, where it defaults to auto.
AMAZON_S3_ACCESS_KEY_IDUnless IAM roleAWS access key ID. Not needed when AMAZON_S3_USE_IAM_ROLE is true.
AMAZON_S3_SECRET_ACCESS_KEYUnless IAM roleAWS secret access key. Not needed when AMAZON_S3_USE_IAM_ROLE is true.
AMAZON_S3_USE_IAM_ROLENoAuthenticate with the instance’s IAM role / instance profile instead of static keys. Amazon S3 only; ignored when a custom endpoint or provider is used. Default false.
AMAZON_S3_ENDPOINTNoCustom endpoint URL for S3-compatible services (e.g. http://localhost:9000). Setting this enables custom-provider mode.
AMAZON_S3_USE_CUSTOM_PROVIDERNoEnable for S3-compatible services. Default false (auto-enabled when an endpoint is set).
AMAZON_S3_FORCE_PATH_STYLENoForce path-style URLs for S3-compatible services. Default false.
environment:
STORAGE_PROVIDER: s3
AMAZON_S3_REGION: us-east-1
AMAZON_S3_BUCKET: my-slink-bucket
AMAZON_S3_ACCESS_KEY_ID: EXAMPLEKEYID
AMAZON_S3_SECRET_ACCESS_KEY: exampleSecretKey

When running on AWS with an attached IAM role (e.g. EC2 or ECS), omit the keys and enable the role instead:

environment:
STORAGE_PROVIDER: s3
AMAZON_S3_REGION: us-east-1
AMAZON_S3_BUCKET: my-slink-bucket
AMAZON_S3_USE_IAM_ROLE: true

For an S3-compatible service:

environment:
STORAGE_PROVIDER: s3
AMAZON_S3_REGION: us-east-1
AMAZON_S3_BUCKET: my-slink-bucket
AMAZON_S3_ACCESS_KEY_ID: your-access-key
AMAZON_S3_SECRET_ACCESS_KEY: your-secret-key
AMAZON_S3_ENDPOINT: http://your-s3-host:9000
AMAZON_S3_USE_CUSTOM_PROVIDER: true
AMAZON_S3_FORCE_PATH_STYLE: true

The local and SMB providers store files using the same layout:

  • slink/images/: original uploaded images
  • slink/cache/: transformed/cached images