Skip to main content

Storage Settings

Settings โ†’ Advanced โ†’ Storage controls where LeadHub stores uploaded files โ€” lead attachments, avatar images, export archives, and form uploads.


Storage Driversโ€‹

DriverWhen to Use
Local (server filesystem)Default. Files are stored on the server's disk at storage/app/. Fine for single-server installs.
S3-CompatibleFor cloud deployments, CDN delivery, or when the server disk is limited. Supports AWS S3, DigitalOcean Spaces, MinIO, Backblaze B2, Cloudflare R2, and any S3-compatible provider.

Local Storageโ€‹

This is the default. No configuration needed. Files are stored under:

/path/to/leadhub/storage/app/public/

Accessible at https://yourdomain.com/storage/... via the storage symlink set up during installation.


S3-Compatible Storageโ€‹

Step 1 โ€” Choose Your Providerโ€‹

ProviderNotes
AWS S3Most common. Leave Endpoint URL blank.
DigitalOcean SpacesEndpoint: https://nyc3.digitaloceanspaces.com (replace region)
MinIO (self-hosted)Endpoint: your MinIO server URL
Backblaze B2Endpoint: https://s3.us-west-004.backblazeb2.com (varies by region)
Cloudflare R2Endpoint: https://ACCOUNT_ID.r2.cloudflarestorage.com

Step 2 โ€” Create a Bucketโ€‹

  1. In your provider's control panel, create a new bucket.
  2. Set the bucket to public if you want direct public access to uploaded files (recommended for avatars and form attachments).
  3. Note the Bucket Name and Region.

Step 3 โ€” Create Access Keysโ€‹

Generate an Access Key ID and Secret Access Key with read/write permissions on the bucket.

For AWS S3:

  1. IAM โ†’ Users โ†’ Create User โ†’ attach policy AmazonS3FullAccess (or a scoped bucket policy).
  2. Create Access Key โ†’ copy both values.

Step 4 โ€” Configure in LeadHubโ€‹

  1. Go to Settings โ†’ Advanced โ†’ Storage.

  2. Set Storage Disk to S3-Compatible.

  3. Fill in:

    FieldValue
    Endpoint URLLeave blank for AWS S3. Set for other providers (see table above).
    Bucket NameYour bucket name
    RegionAWS region code or provider region (e.g. us-east-1, nyc3)
    Access Key IDFrom Step 3
    Secret Access KeyFrom Step 3 (leave blank to keep stored secret)
  4. Click Test Connection to verify the settings before saving.

  5. Click Save Settings.


Testing the Connectionโ€‹

Click Test Connection โ€” LeadHub writes a tiny test file to the storage disk and immediately deletes it. A โœ… notification means the connection is working. A โŒ notification shows the error.

Always test before saving โ€” an incorrect configuration can break file uploads across the entire workspace.


Migrating from Local to S3โ€‹

  1. Configure S3 settings and test the connection.
  2. Save the settings โ€” new uploads will now go to S3.
  3. Existing files on the local disk are not automatically migrated. Copy them manually using your provider's CLI or sync tool (e.g. aws s3 sync storage/app/public s3://your-bucket).

Troubleshootingโ€‹

ProblemSolution
"Test connection failed: Access Denied"Check that the Access Key has write permissions on the bucket
Files not publicly accessibleEnsure the bucket has public read ACL, or configure a CDN
"NoSuchBucket" errorVerify the bucket name and region are correct
Endpoint URL errorsFor non-AWS providers, ensure the endpoint URL is correct and includes https://
Secret not savingLeave the Secret Access Key blank to keep the existing stored secret