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:
| Campo | Valor |
|---|---|
| Endpoint | https://tuapp.deployalo.com |
| Access Key | Tu Access Key (el que configuraste) |
| Secret Key | Tu Secret Key |
| Region | us-east-1 (o cualquiera) |
| Bucket | El nombre de tu bucket |
WordPress + UpdraftPlus
Configuración
- Instala UpdraftPlus en WordPress
- Ve a Ajustes > UpdraftPlus Backups
- En "Choose your remote storage", selecciona S3-Compatible (Generic)
- 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
- 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
- En n8n, agrega nodo AWS S3
- Crea credencial:
- Region:
us-east-1 - Access Key ID: Tu Access Key
- Secret Access Key: Tu Secret Key
- Region:
- En la configuración del nodo:
- Custom Endpoint:
https://tuapp.deployalo.com - Force Path Style:
true
- Custom Endpoint:
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
- Selecciona
n(New remote) - Nombre:
minio - Tipo:
s3 - Provider:
Minio - Access Key: Tu access key
- Secret Key: Tu secret key
- 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