# MinIO Configuration for MinIO WebUI ## Overview The MinIO WebUI requires access to a MinIO server to manage buckets and objects. You need to configure the MinIO connection details in the `.env` file. ## Configuration Steps ### 1. Update MinIO Connection Details Edit your `.env` file and update the MinIO configuration: ```bash # MinIO Configuration DEFAULT_MINIO_ALIAS=kopiaminio # Alias name for the MinIO server MINIO_ENDPOINT=https://your-minio.com # Your MinIO server URL MINIO_ACCESS_KEY=your-access-key # MinIO access key MINIO_SECRET_KEY=your-secret-key # MinIO secret key ``` ### 2. Common MinIO Endpoints - **Local MinIO**: `http://localhost:9000` or `http://host.docker.internal:9000` (from Docker) - **MinIO Docker**: `http://minio:9000` (if MinIO is in the same Docker network) - **Remote MinIO**: `https://your-minio-server.com` ### 3. Set Up the MinIO Alias After updating the `.env` file, restart the containers and run: ```bash ./scripts/setup-mc-alias.sh ``` This script will: - Configure the MinIO client (mc) with your connection details - Test the connection - Show any connection errors ### 4. Troubleshooting #### Permission Denied Error If you see "permission denied" errors, the mc config has been fixed with a dedicated volume. #### Connection Refused - Ensure your MinIO server is running - Check the endpoint URL is correct - Verify network connectivity from the Docker container #### Invalid Credentials - Double-check your access key and secret key - Ensure they match your MinIO server configuration ### 5. Testing the Connection You can manually test the connection: ```bash # List buckets docker exec minio-webui-backend-dev mc ls kopiaminio # Create a test bucket docker exec minio-webui-backend-dev mc mb kopiaminio/test-bucket # Remove test bucket docker exec minio-webui-backend-dev mc rb kopiaminio/test-bucket ``` ## Example: Local MinIO Setup If you're running MinIO locally: 1. Start MinIO: ```bash docker run -p 9000:9000 -p 9001:9001 \ -e MINIO_ROOT_USER=minioadmin \ -e MINIO_ROOT_PASSWORD=minioadmin \ minio/minio server /data --console-address ":9001" ``` 2. Update `.env`: ```bash DEFAULT_MINIO_ALIAS=local-minio MINIO_ENDPOINT=http://host.docker.internal:9000 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin ``` 3. Run setup: ```bash docker compose -f docker-compose.dev.yml restart backend ./scripts/setup-mc-alias.sh ```