Management Commands¶
rustfs_health¶
Check connectivity, authentication, and run an upload/download roundtrip test.
python manage.py rustfs_health
python manage.py rustfs_health --bucket=my-bucket
python manage.py rustfs_health --verbose
Options¶
| Option | Description |
|---|---|
--bucket |
Specific bucket to check (defaults to RUSTFS_BUCKET_NAME) |
--verbose |
Show detailed response information |
What it checks¶
- Bucket accessibility โ verifies the configured bucket exists and is reachable
- List operation โ confirms you can list objects in the bucket
- Roundtrip test โ uploads a test file, downloads it, verifies contents, and cleans up
Expected output
๐ Checking RustFS health...
Endpoint: http://localhost:9000
Bucket: django-media
โ
Bucket 'django-media' is accessible
Response time: 12.3ms
โ
List operation works (0 objects visible)
๐งช Running upload/download roundtrip test...
โ
Upload/download roundtrip successful
โ
RustFS health check completed successfully!
Troubleshooting
- 403 / Auth error โ check
RUSTFS_ACCESS_KEYandRUSTFS_SECRET_KEY - Connection refused โ verify
RUSTFS_ENDPOINTand that RustFS is running - Bucket not found โ run
python manage.py rustfs_init_bucketsfirst
rustfs_init_buckets¶
Create and configure RustFS buckets for Django media and static files.
python manage.py rustfs_init_buckets
python manage.py rustfs_init_buckets --bucket=my-custom-bucket
python manage.py rustfs_init_buckets --public
python manage.py rustfs_init_buckets --dry-run
Options¶
| Option | Description |
|---|---|
--bucket |
Create only this specific bucket |
--skip-static |
Skip creating the static files bucket |
--public |
Make the bucket public-readable |
--dry-run |
Show what would be done without making changes |
What it does¶
- Creates the media bucket (
RUSTFS_BUCKET_NAME) if it doesn't exist - Creates the static bucket (
RUSTFS_STATIC_BUCKET_NAME) if it doesn't exist - Sets public-read policy on buckets when
--publicis used
Expected output
๐ชฃ Initializing RustFS buckets...
๐ฆ Bucket: django-media
Status: Created โ
๐ฆ Bucket: django-static
Status: Created โ
Policy: public-read โ
==================================================
RESULTS
==================================================
โ
Created: django-media
โ
Created: django-static
โ
All done: 2 bucket(s) ready to use