# MinIO Server Setup Guide This guide provides step-by-step instructions to set up and run a MinIO server on a Linux system. ## Prerequisites - Python 3.x installed - Required Python packages: `python-dotenv`, `wget` (install using `pip install python-dotenv wget`) - A `minio.env` environment file - Administrative privileges for file permissions and port usage - Free ports for MinIO API (default: 9000) and WebUI (default: 9001) ## Setup Instructions ### 1. Download and Prepare MinIO Binary Run the following commands to download the MinIO server binary and set up the data directory: ```bash wget https://dl.min.io/server/minio/release/linux-amd64/minio chmod +x minio mkdir -p ~/minio-data mkdir -p ~/minio-logs ``` ### 2. Configure Environment Variables Create a `minio.env` file in the same directory as the MinIO binary with the following content, replacing placeholders with your desired values: ``` MINIO_ROOT_USER= MINIO_ROOT_PASSWORD= MINIO_HOST=localhost: MINIO_CONSOLE_ADDRESS=localhost: ``` - ``: Choose a secure username for the MinIO admin account. - ``: Use a strong password (at least 8 characters). - Ensure ports `` (API) and `` (WebUI) are free, or update them to available ports. ### 3. Start the MinIO Server Run the following command to start the MinIO server in the background, using the environment variables from `minio.env`: ```bash export MINIO_ROOT_USER= export MINIO_ROOT_PASSWORD= MINIO_ROOT_USER=$MINIO_ROOT_USER MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD \ ./minio server ~/minio-data --address : --console-address : > ~/minio-logs/minio_server.log 2>&1 & ``` - This command exports environment variables and starts the MinIO server. - Logs are saved to `~/minio-logs/minio_server.log` for troubleshooting. ### 4. Access MinIO - **API Access**: Connect to `http://localhost:` for programmatic access. - **WebUI Access**: Open `http://localhost:` in a browser and log in with `` and ``. ## Notes - **Stopping the Server**: To stop the MinIO server, find its process ID using `ps aux | grep minio` and terminate it with `kill `. - **Port Conflicts**: If ports `` or `` are in use, modify `MINIO_ADDRESS` and `MINIO_CONSOLE_ADDRESS` in `minio.env` to use different ports. - **Security**: Store `minio.env` securely and avoid exposing sensitive credentials. - **Data Directory**: The `~/minio-data` directory stores MinIO buckets and objects. Ensure it has sufficient disk space.