Skip to Content
Edit on GitHub

Content Storage

LearnHouse supports two storage backends for uploaded content such as images, videos, and documents.

Storage Options

Filesystem (Default)

By default, uploaded content is stored on the local filesystem using a Docker volume. This is the simplest option and works well for small to medium deployments.

LEARNHOUSE_CONTENT_DELIVERY_TYPE=filesystem

Content is persisted in a Docker volume, so it survives container restarts. The learnhouse backup command includes filesystem content in its backups.

S3-Compatible Storage

For production deployments or when you need scalable storage, you can use any S3-compatible storage service:

  • AWS S3
  • CloudFlare R2
  • MinIO (self-hosted)
  • Any other S3-compatible provider
LEARNHOUSE_CONTENT_DELIVERY_TYPE=s3api
LEARNHOUSE_S3_API_BUCKET_NAME=learnhouse-content
LEARNHOUSE_S3_API_ENDPOINT_URL=https://s3.amazonaws.com

After updating your storage configuration, restart your instance:

learnhouse stop
learnhouse start

When using S3-compatible storage, make sure the bucket exists and the credentials have read/write permissions. For AWS S3, credentials are typically provided via standard AWS environment variables or instance roles.

Choosing a Storage Backend

ConsiderationFilesystemS3-Compatible
Setup complexitySimple, works out of the boxRequires external service or additional container
ScalabilityLimited by server diskVirtually unlimited
BackupIncluded in learnhouse backupManaged separately by your storage provider
CostIncluded with your serverVaries by provider
RedundancySingle disk, no redundancyBuilt-in redundancy (provider-dependent)

For most self-hosted installations starting out, filesystem storage is a good default. You can migrate to S3-compatible storage later as your needs grow.

Using MinIO for Self-Hosted S3

If you want S3-compatible storage without relying on a cloud provider, you can run MinIO alongside LearnHouse. MinIO provides an S3-compatible API on your own infrastructure.

Configure the endpoint URL to point to your MinIO instance:

LEARNHOUSE_CONTENT_DELIVERY_TYPE=s3api
LEARNHOUSE_S3_API_BUCKET_NAME=learnhouse-content
LEARNHOUSE_S3_API_ENDPOINT_URL=http://minio:9000