Storage configuration
The Storage settings screen at /admin/storage controls where Marketix stores uploaded files — branding assets (logos, favicons), generated QR code images, and PDF reports. You can choose between the local container disk or any S3-compatible object storage service.
How it works
Section titled “How it works”Storage configuration is persisted via Spatie Laravel Settings under the storage group, overriding the FILESYSTEM_DISK and AWS_* environment defaults at runtime. The secret access key is stored encrypted; it is never returned to the browser.
Storage backend
Section titled “Storage backend”| UI label | Setting key | Values |
|---|---|---|
| Storage backend | driver | local — files stored in storage/app inside the container; s3 — files stored in an S3-compatible bucket. |
S3-compatible fields (shown when driver = S3)
Section titled “S3-compatible fields (shown when driver = S3)”| UI label | Setting key | Description |
|---|---|---|
| Access key ID | s3_key | IAM or provider-specific access key identifier. |
| Secret access key | s3_secret | Corresponding secret. Stored encrypted; leave blank to keep the current value. |
| Region | s3_region | AWS region (e.g. us-east-1) or provider equivalent. |
| Bucket | s3_bucket | Name of the target bucket. |
| Endpoint | s3_endpoint | Custom endpoint URL for non-AWS providers (e.g. https://your-account.r2.cloudflarestorage.com). Leave blank for standard AWS. |
| Use path-style endpoint | s3_use_path_style | Checkbox. Enable for providers that require path-style URLs (e.g. MinIO, some Hetzner configurations). Disable for AWS and Cloudflare R2. |
Common provider examples
Section titled “Common provider examples”| Provider | Endpoint | Path-style |
|---|---|---|
| AWS S3 | (blank) | No |
| Cloudflare R2 | https://<account>.r2.cloudflarestorage.com | No |
| MinIO | https://minio.example.com | Yes |
| DigitalOcean Spaces | https://<region>.digitaloceanspaces.com | No |
| Hetzner Object Storage | https://<region>.your-objectstorage.com | Provider-dependent |
Environment defaults
Section titled “Environment defaults”The AWS_* env vars seed the database settings on a fresh install. Once you save from the UI, the database values take precedence.
FILESYSTEM_DISK=localAWS_ACCESS_KEY_ID=AWS_SECRET_ACCESS_KEY=AWS_DEFAULT_REGION=us-east-1AWS_BUCKET=AWS_USE_PATH_STYLE_ENDPOINT=falseTesting the connection
Section titled “Testing the connection”Click Test connection on the Storage settings page to verify credentials without saving. The test:
- Builds a temporary S3 disk instance using the values currently in the form (using the stored secret if the secret field is blank).
- Writes a small test file (
storage-test-<uuid>.txt), reads it back, then deletes it. - Reports success or the error message from the SDK.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause |
|---|---|
| ”Storage test failed: NoSuchBucket” | The bucket name is wrong or does not exist yet. |
| ”Storage test failed: InvalidAccessKeyId” | Access key ID is incorrect or does not have write access to the bucket. |
| ”Storage test failed: SignatureDoesNotMatch” | Wrong secret access key. Enter the secret again (the field only updates when a value is typed). |
| Test passes but images are not publicly accessible | The bucket or object ACL may not allow public reads. For branding assets to display, the bucket must serve objects publicly, or set visibility = public in your bucket policy. |
| Wrong endpoint or path-style errors on MinIO | Enable Use path-style endpoint and ensure the endpoint URL does not include the bucket name. |