Skip to main content

MinIO Single Node Deployment

  • The MinIO node requires Docker installation beforehand
  • After Docker installation, execute the docker swarm init command 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 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" # Access port for minio console; uncomment if needed
    command: minio server /data/storage/data --console-address ":9001"
    EOF
    • The value of the MINIO_ROOT_USER variable is the accessKey for object storage
    • The value of the MINIO_ROOT_PASSWORD variable is the secretKey for object storage
  4. Configure startup and shutdown scripts

    cat > /usr/local/minio/start.sh <<EOF
    docker stack deploy -c /usr/local/minio/minio.yaml minio
    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