About Muattar Store
- Create a Cloudflare free account if you don’t have.
- Set up your R2 bucket:
- Navigate to R2 Object Storage in your dashboard
- Click "Create bucket"
- Enter a unique bucket name
- Select "Automatic" for location
- Choose "Standard" for storage class
- Confirm by clicking "Create bucket"
- Configure public access:
- Open your bucket's Settings
- Locate the Public Access section
- Enable R2.dev subdomain access
- Type 'allow' to confirm
- Copy the Public R2.dev Bucket URL for your
S3_FILE_URL
- Set up your credentials:
- Find your Account ID in the R2 dashboard's top right corner
- Generate API tokens:
- Select Create API token
- Edit the R2 Token name
- Under Permissions, select appropriate permission types
- Optionally scope token to specific buckets for Object Read/Write permissions
- Click Create API Token
- Save the generated token as your
S3_ACCESS_KEY_ID
,S3_SECRET_ACCESS_KEY
- Record your bucket name for configuration
- Save your public bucket URL for reference
S3_FILE_URL="https://<Public-R2.dev-Bucket-URL-Generated-on-step-3"
S3_ACCESS_KEY_ID="generated-on-step-4"
S3_SECRET_ACCESS_KEY="generated-on-step-4"
S3_REGION="auto"
S3_BUCKET="your-bucket-name"
S3_ENDPOINT="https://<your-account-id>.r2.cloudflarestorage.com"