Skip to content

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

  1. Bucket accessibility โ€” verifies the configured bucket exists and is reachable
  2. List operation โ€” confirms you can list objects in the bucket
  3. 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_KEY and RUSTFS_SECRET_KEY
  • Connection refused โ€” verify RUSTFS_ENDPOINT and that RustFS is running
  • Bucket not found โ€” run python manage.py rustfs_init_buckets first

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

  1. Creates the media bucket (RUSTFS_BUCKET_NAME) if it doesn't exist
  2. Creates the static bucket (RUSTFS_STATIC_BUCKET_NAME) if it doesn't exist
  3. Sets public-read policy on buckets when --public is 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

Dry run

Use --dry-run to preview what would be created without making any changes:

python manage.py rustfs_init_buckets --dry-run