Cloud Computing 9 min read

Deploy Private MinIO Object Storage with Docker and Connect to Webman PHP Backend

This guide walks you through setting up a private MinIO object storage server using Docker, explains core concepts like buckets and access keys, and demonstrates how to configure the Webman PHP framework with the MinIO plugin to upload, manage, and preview files via the MinIO console.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub
Deploy Private MinIO Object Storage with Docker and Connect to Webman PHP Backend

MinIO Overview

MinIO is an open‑source object storage service compatible with the Amazon S3 API, suitable for storing large amounts of unstructured data such as images, videos, logs, backups, and container images. Objects can range from a few kilobytes up to 5 TB.

Core Concepts

Bucket : A container for objects. Buckets have configuration options like region, access permissions, and storage class. They are flat (no hierarchical directories) and each bucket name must be globally unique.

Object : The basic storage unit, consisting of metadata, user data, and a key (filename). Objects are immutable after upload, except when using append‑style uploads.

ObjectKey : The identifier used in SDKs to refer to an object, e.g., tinywan/img/2024.jpg.

Endpoint : The URL through which MinIO services are accessed, e.g., http://s3.tinywan.com.

AccessKey / SecretKey : Credentials used for symmetric‑key authentication. The AccessKey identifies the user, while the SecretKey signs requests and must be kept confidential.

Deployment

Docker Deployment

docker run \
  -p 9000:9000 \
  -p 9090:9090 \
  -d \
  -e "MINIO_ROOT_USER=admin" \
  -e "MINIO_ROOT_PASSWORD=admin123456" \
  -v d:/minio/data:/data \
  -v d:/minio/config:/root/.minio \
  minio/minio server /data --console-address ":9090" --address ":9000"
-p 9000:9000

: Maps the container’s API port to the host. -p 9090:9090: Maps the container’s console UI port to the host.

-e "MINIO_ROOT_USER=admin" -e "MINIO_ROOT_PASSWORD=admin123456"

: Sets the root credentials. -v d:/minio/data:/data and -v d:/minio/config:/root/.minio: Mount host directories for data storage and configuration.

minio/minio server /data --console-address ":9090" --address ":9000"

: Starts MinIO in server mode with the specified data directory and listening ports.

Accessing the MinIO Console

Open http://localhost:9090/ in a browser to reach the MinIO web console.

MinIO console login screen
MinIO console login screen

In the console you can create a new bucket and generate Access/Secret keys.

Create bucket UI
Create bucket UI
Create Access/Secret keys UI
Create Access/Secret keys UI
Access Keys: aFbJYjvuJJHKVQYokxON
Secret Keys: 0k1cWvrT8I56VMdxTn5KTpKJi3I2SoMDpiOrUfcu

Using MinIO with Webman

The open‑source webman-admin backend can manage files via the MinIO storage plugin.

Plugin URL: https://www.workerman.net/app/view/storage

Install Dependency

composer require league/flysystem-aws-s3-v3

S3 Configuration

Configure the storage settings in Webman to point to the MinIO endpoint, e.g., http://192.168.3.29:9000, and provide the generated AccessKey and SecretKey.

Webman S3 configuration screen
Webman S3 configuration screen

Test Upload

Upload test UI
Upload test UI

Successful upload returns a JSON response similar to:

{
  "code": 0,
  "msg": "ok",
  "data": [
    {
      "key": "file",
      "origin_name": "webman实战教程.png",
      "save_name": "108b7f4d06ad88f608df22a4888a5ba7.png",
      "save_path": "/108b7f4d06ad88f608df22a4888a5ba7.png",
      "url": "http://192.168.3.29:9000/108b7f4d06ad88f608df22a4888a5ba7.png",
      "unique_id": "108b7f4d06ad88f608df22a4888a5ba7",
      "size": 24556,
      "mime_type": "image/png",
      "extension": "png"
    }
  ]
}

Viewing Files in the MinIO Console

File list in MinIO console
File list in MinIO console
File preview in MinIO console
File preview in MinIO console

Common Issues

If you encounter an error such as "cURL error 56: Recv failure: Connection reset by peer", it is often caused by a local proxy interfering with the request from inside the Docker container.

Error executing "PutObject" on "http://127.0.0.1:9000/webman//ef50587a9304c299238d7828ea1eca0f.png"; AWS HTTP error: cURL error 56: Recv failure: Connection reset by peer

Fix: Change the endpoint configuration to the host’s IP address (e.g., http://192.168.3.29:9000) or a public IP, so the container can reach the MinIO service directly.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Dockercloud computingBackend DevelopmentPHPMinioobject storageWebman
Open Source Tech Hub
Written by

Open Source Tech Hub

Sharing cutting-edge internet technologies and practical AI resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.