# MinIO S3 Storage Configuration for NocoDB
## Overview
Your NocoDB instance at `nocodb.v1su4.com` needs to be configured to use MinIO S3 storage at `minio-api.v1su4.com` for persistent file storage.
## MinIO Server Details
- **Endpoint**: `https://minio-api.v1su4.com`
- **Purpose**: Store NocoDB attachments, files, and binary data
- **Compatibility**: S3-compatible API
## NocoDB Environment Variables
Add these to your NocoDB configuration in Coolify:
```bash
# MinIO S3 Storage Configuration
NC_S3_BUCKET_NAME=nocodb-storage
NC_S3_REGION=us-east-1
NC_S3_ENDPOINT=https://minio-api.v1su4.com
NC_S3_ACCESS_KEY=your_minio_access_key_here
NC_S3_ACCESS_SECRET=your_minio_secret_key_here
NC_S3_FORCE_PATH_STYLE=true
NC_S3_ACL=public-read
```
### Variable Descriptions
- **NC_S3_BUCKET_NAME**: Name of the bucket in MinIO (create this first)
- **NC_S3_REGION**: Region identifier (can be any value for MinIO, typically `us-east-1`)
- **NC_S3_ENDPOINT**: Your MinIO server URL
- **NC_S3_ACCESS_KEY**: MinIO access key
- **NC_S3_ACCESS_SECRET**: MinIO secret key
- **NC_S3_FORCE_PATH_STYLE**: Set to `true` for MinIO (required)
- **NC_S3_ACL**: Access control level (`public-read`, `private`, etc.)
## MinIO Bucket Setup
### 1. Create Bucket in MinIO
```bash
# Using MinIO client (mc)
mc mb minio/nocodb-storage
# Or via MinIO web UI
# Navigate to https://minio-api.v1su4.com
# Create bucket: "nocodb-storage"
```
### 2. Set Bucket Policy
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::nocodb-storage/*"
}
]
}
```
### 3. Create Access Key in MinIO
1. Access MinIO admin console
2. Go to Access Keys section
3. Create new access key
4. Copy Access Key and Secret Key
5. Use these in NocoDB environment variables
## Verification Steps
### 1. Test MinIO Connection
```bash
# Test MinIO is accessible
curl https://minio-api.v1su4.com
# Test bucket access (if public)
curl https://minio-api.v1su4.com/nocodb-storage/
```
### 2. Test NocoDB S3 Integration
1. Log into NocoDB at `nocodb.v1su4.com`
2. Upload a file/attachment to a table
3. Check MinIO bucket to verify file appears
4. Verify file can be downloaded/accessed
### 3. Verify Persistence
1. Restart NocoDB container
2. Verify files are still accessible
3. Check MinIO bucket still contains files
## Troubleshooting
### Issue: Files not uploading to MinIO
**Check:**
- MinIO endpoint is accessible from NocoDB container
- Access keys are correct
- Bucket exists and has proper permissions
- `NC_S3_FORCE_PATH_STYLE=true` is set
### Issue: 403 Forbidden errors
**Check:**
- Access key has proper permissions
- Bucket policy allows operations
- CORS is configured if accessing from web
### Issue: Connection timeout
**Check:**
- MinIO server is running
- Network connectivity between NocoDB and MinIO
- Firewall rules allow connection
- DNS resolution works (`minio-api.v1su4.com`)
## Integration with n8n
If n8n also needs to access MinIO:
1. Use same MinIO credentials (or create separate keys)
2. Configure n8n to use MinIO for file storage if needed
3. Ensure both services can access the same bucket if sharing files
## Security Considerations
1. **Access Keys**: Store securely, never commit to git
2. **Bucket Policy**: Use least privilege principle
3. **HTTPS**: Ensure MinIO uses HTTPS
4. **Network**: Consider private network between services
5. **Backup**: Set up MinIO backup strategy
## Next Steps
1. [ ] Create `nocodb-storage` bucket in MinIO
2. [ ] Generate access keys in MinIO
3. [ ] Add environment variables to NocoDB in Coolify
4. [ ] Restart NocoDB container
5. [ ] Test file upload/download
6. [ ] Verify persistence after restart