Saltar al contenido principal

Conectar Aplicaciones a MinIO

MinIO es compatible con la API de Amazon S3. Cualquier app que soporte S3 puede conectarse a MinIO.

Credenciales necesarias

Para conectar cualquier app necesitas:

CampoValor
Endpointhttps://tuapp.deployalo.com
Access KeyTu Access Key (el que configuraste)
Secret KeyTu Secret Key
Regionus-east-1 (o cualquiera)
BucketEl nombre de tu bucket

WordPress + UpdraftPlus

Configuración

  1. Instala UpdraftPlus en WordPress
  2. Ve a Ajustes > UpdraftPlus Backups
  3. En "Choose your remote storage", selecciona S3-Compatible (Generic)
  4. Configura:
    • S3 access key: Tu Access Key
    • S3 secret key: Tu Secret Key
    • S3 location: s3://nombre-de-tu-bucket
    • S3 endpoint: tuapp.deployalo.com
  5. Guarda y haz backup de prueba

Solución de problemas

Si falla la conexión:

  • Asegúrate de que el bucket existe
  • Verifica que uses HTTPS en el endpoint
  • En UpdraftPlus, marca "Use only path-style bucket access"

n8n

Nodo S3

  1. En n8n, agrega nodo AWS S3
  2. Crea credencial:
    • Region: us-east-1
    • Access Key ID: Tu Access Key
    • Secret Access Key: Tu Secret Key
  3. En la configuración del nodo:
    • Custom Endpoint: https://tuapp.deployalo.com
    • Force Path Style: true

Ejemplo: Guardar archivo en MinIO

Webhook → S3 (Put Object)

Configuración del nodo S3:

  • Operation: Put
  • Bucket Name: tu-bucket
  • File Name: {{ $json.filename }}
  • Binary Property: data

rclone (backups)

Instalación

# Linux
curl https://rclone.org/install.sh | sudo bash

# Mac
brew install rclone

Configuración

rclone config
  1. Selecciona n (New remote)
  2. Nombre: minio
  3. Tipo: s3
  4. Provider: Minio
  5. Access Key: Tu access key
  6. Secret Key: Tu secret key
  7. Endpoint: https://tuapp.deployalo.com

Comandos útiles

# Listar buckets
rclone lsd minio:

# Listar archivos
rclone ls minio:mi-bucket

# Subir archivo
rclone copy archivo.txt minio:mi-bucket/

# Sincronizar carpeta
rclone sync /local/folder minio:mi-bucket/folder

# Descargar carpeta
rclone sync minio:mi-bucket/folder /local/folder

AWS CLI

Configuración

aws configure
  • Access Key: Tu access key
  • Secret Key: Tu secret key
  • Region: us-east-1

Uso

Siempre agrega --endpoint-url:

# Listar buckets
aws s3 ls --endpoint-url https://tuapp.deployalo.com

# Subir archivo
aws s3 cp archivo.txt s3://mi-bucket/ --endpoint-url https://tuapp.deployalo.com

# Descargar archivo
aws s3 cp s3://mi-bucket/archivo.txt . --endpoint-url https://tuapp.deployalo.com

SDK de Python (boto3)

import boto3

s3 = boto3.client(
's3',
endpoint_url='https://tuapp.deployalo.com',
aws_access_key_id='tu-access-key',
aws_secret_access_key='tu-secret-key',
)

# Subir archivo
s3.upload_file('local.txt', 'mi-bucket', 'remote.txt')

# Descargar archivo
s3.download_file('mi-bucket', 'remote.txt', 'local.txt')

# Listar archivos
response = s3.list_objects_v2(Bucket='mi-bucket')
for obj in response.get('Contents', []):
print(obj['Key'])

SDK de JavaScript

import { S3Client, PutObjectCommand, GetObjectCommand } from "@aws-sdk/client-s3";

const s3 = new S3Client({
endpoint: "https://tuapp.deployalo.com",
region: "us-east-1",
credentials: {
accessKeyId: "tu-access-key",
secretAccessKey: "tu-secret-key",
},
forcePathStyle: true,
});

// Subir archivo
await s3.send(new PutObjectCommand({
Bucket: "mi-bucket",
Key: "archivo.txt",
Body: "contenido del archivo",
}));

// Descargar archivo
const { Body } = await s3.send(new GetObjectCommand({
Bucket: "mi-bucket",
Key: "archivo.txt",
}));

Problemas comunes

"SignatureDoesNotMatch"

  • Verifica que Access/Secret Key estén correctos
  • Asegúrate de no tener espacios extra

"The specified bucket does not exist"

  • Crea el bucket primero en la consola de MinIO
  • Verifica el nombre exacto (case sensitive)

"Connection refused"

  • Usa HTTPS, no HTTP
  • Verifica la URL del endpoint