Skip to content

MinIO App

About

Minio is a high performance S3 compatible Object Storage.

Admin credentials

To change admin credentials, use the File manager to edit the variables MINIO_ROOT_USER and MINIO_ROOT_PASSWORD in /app/data/env.sh .

export MINIO_ROOT_USER=superadmin
export MINIO_ROOT_PASSWORD='Secr$et#pass'

Be sure to restart the app after making changes.

Domains

MinIO uses two domains:

  • Console domain - this domain is for accessing the MinIO console.

  • API Domain - this endpoint responds to S3 API requests. This is the domain that you need to put into various configs and tools like s3cmd. Only the domain name is needed, no port should be added.

In the screenshot below, you would use minio.cloudron.site as the console domain. You can login and view your files. The minio-api.cloudron.site is the API domain which responds to API requests.

Access Keys

Recent version of MinIO removed the ability to manage and generate keys via the UI. The mc CLI tool must be used instead. See the CLI section for more information.

To create access keys, you have to set up a user, attach a policy to the user and generate access keys for the user.

  • Connect the CLI to your MinIO server
    mc alias set myminio https://minio-api.smartserver.io minioadmin minioadmin
  • Create a user
    mc admin user add myminio alice sTr0ngPassword!
  • Create the bucket policy. Create a file named policy.json:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:*"
      ],
      "Resource": [
        "arn:aws:s3:::mybucket",
        "arn:aws:s3:::mybucket/*"
      ]
    }
  ]
}

Then, create the policy on the server:

    mc admin policy create myminio mybucket-fullaccess ./policy.json
  • Attach the bucket with the user:
    mc admin policy attach myminio mybucket-fullaccess --user alice
  • Finally, generate access keys for the user:
    mc admin accesskey create myminio/ alice

Cloudron Backup

Cloudron supports backing up to minio. Backing up a Cloudron to a minio installed in another Cloudron will work fine. However, backing up a Cloudron to a minio installed in the very same Cloudron is not supported.

Custom configuration

Custom config variables can be exported in /app/data/env.sh. This file is sourced automatically on startup.

CLI

MinIO supports multiple long term users in addition to default user created during server startup. New users have to added using the CLI tool. You can read the full docs here.

    mc alias set myminio https://minio.cloudron.club minioadmin minioadmin --api s3v4
  • Create a policy file
cat > getonly.json << EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "s3:GetObject"
      ],
      "Effect": "Allow",
      "Resource": [
        "arn:aws:s3:::my-bucketname/*"
      ],
      "Sid": ""
    }
  ]
}
EOF
  • Add the policy
   mc admin policy add myminio getonly getonly.json
  • Add new user
   mc admin user add myminio newuser password123
  • Set policy on user
    mc admin policy set myminio getonly user=newuser