Skip to main content

MinIO Single Node Deployment

  • The MinIO node requires Docker installation in advance.
  • After Docker installation, execute the command docker swarm init to initialize the swarm environment.
  1. Download the image

    docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-minio:RELEASE.2025-04-22T22-12-26Z
  2. Create configuration file and data storage directory

    mkdir -p /usr/local/minio
    mkdir -p /data/minio/volume
  3. Create the MinIO configuration file

    cat > /usr/local/minio/minio.yaml <<'EOF'
    version: '3'
    services:
    minio:
    image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-minio:RELEASE.2025-04-22T22-12-26Z
    environment:
    MINIO_ROOT_USER: "mingdao"
    MINIO_ROOT_PASSWORD: "123456789"
    volumes:
    - /usr/share/zoneinfo/Etc/GMT-8:/etc/localtime
    - /data/minio/volume:/data/storage
    ports:
    - "9011:9000"
    # - "19111:9001" # Uncomment if MinIO console access is needed
    command: minio server /data/storage/data --console-address ":9001"
    EOF
    • The access key for object storage is specified by the MINIO_ROOT_USER environment variable, which is a core credential. Please ensure to use a strong password during deployment.
    • The secret key for object storage is specified by the MINIO_ROOT_PASSWORD environment variable, which is a critical security key. Please ensure to use a strong password during deployment.
  4. Configure start and stop scripts

    cat > /usr/local/minio/start.sh <<'EOF'
    docker stack deploy -c /usr/local/minio/minio.yaml minio --detach=false
    EOF

    cat > /usr/local/minio/stop.sh <<'EOF'
    docker stack rm minio
    EOF

    chmod +x /usr/local/minio/start.sh
    chmod +x /usr/local/minio/stop.sh
  5. Start the MinIO service

    bash /usr/local/minio/start.sh
  6. Check the MinIO container status

    docker stack ps minio