mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-12 15:34:58 -05:00
125 lines
3.2 KiB
Plaintext
125 lines
3.2 KiB
Plaintext
---
|
|
title: Plataformas en la nube
|
|
description: Despliega Sim en plataformas en la nube
|
|
---
|
|
|
|
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
|
|
import { Callout } from 'fumadocs-ui/components/callout'
|
|
|
|
## Railway
|
|
|
|
Despliegue con un solo clic con aprovisionamiento automático de PostgreSQL.
|
|
|
|
[
|
|
|
|

|
|
|
|
](https://railway.com/new/template/sim-studio)
|
|
|
|
Después del despliegue, añade variables de entorno en el panel de Railway:
|
|
- `BETTER_AUTH_SECRET`, `ENCRYPTION_KEY`, `INTERNAL_API_SECRET` (generadas automáticamente)
|
|
- `OPENAI_API_KEY` u otras claves de proveedores de IA
|
|
- Dominio personalizado en Configuración → Redes
|
|
|
|
## Despliegue en VPS
|
|
|
|
Para DigitalOcean, AWS EC2, Azure VMs o cualquier servidor Linux:
|
|
|
|
<Tabs items={['DigitalOcean', 'AWS EC2', 'Azure VM']}>
|
|
<Tab value="DigitalOcean">
|
|
**Recomendado:** Droplet de 16 GB RAM, Ubuntu 24.04
|
|
|
|
```bash
|
|
# Create Droplet via console, then SSH in
|
|
ssh root@your-droplet-ip
|
|
```
|
|
|
|
</Tab>
|
|
<Tab value="AWS EC2">
|
|
**Recomendado:** t3.xlarge (16 GB RAM), Ubuntu 24.04
|
|
|
|
```bash
|
|
ssh -i your-key.pem ubuntu@your-ec2-ip
|
|
```
|
|
|
|
</Tab>
|
|
<Tab value="Azure VM">
|
|
**Recomendado:** Standard_D4s_v3 (16 GB RAM), Ubuntu 24.04
|
|
|
|
```bash
|
|
ssh azureuser@your-vm-ip
|
|
```
|
|
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
### Instalar Docker
|
|
|
|
```bash
|
|
# Install Docker (official method)
|
|
curl -fsSL https://get.docker.com | sudo sh
|
|
sudo usermod -aG docker $USER
|
|
|
|
# Logout and reconnect, then verify
|
|
docker --version
|
|
```
|
|
|
|
### Desplegar Sim
|
|
|
|
```bash
|
|
git clone https://github.com/simstudioai/sim.git && cd sim
|
|
|
|
# Create .env with secrets
|
|
cat > .env << EOF
|
|
DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
|
|
BETTER_AUTH_SECRET=$(openssl rand -hex 32)
|
|
ENCRYPTION_KEY=$(openssl rand -hex 32)
|
|
INTERNAL_API_SECRET=$(openssl rand -hex 32)
|
|
NEXT_PUBLIC_APP_URL=https://sim.yourdomain.com
|
|
BETTER_AUTH_URL=https://sim.yourdomain.com
|
|
NEXT_PUBLIC_SOCKET_URL=https://sim.yourdomain.com
|
|
EOF
|
|
|
|
# Start
|
|
docker compose -f docker-compose.prod.yml up -d
|
|
```
|
|
|
|
### SSL con Caddy
|
|
|
|
```bash
|
|
# Install Caddy
|
|
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
|
|
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
|
|
sudo apt update && sudo apt install caddy
|
|
|
|
# Configure (replace domain)
|
|
echo 'sim.yourdomain.com {
|
|
reverse_proxy localhost:3000
|
|
handle /socket.io/* {
|
|
reverse_proxy localhost:3002
|
|
}
|
|
}' | sudo tee /etc/caddy/Caddyfile
|
|
|
|
sudo systemctl restart caddy
|
|
```
|
|
|
|
Apunta el registro DNS A de tu dominio a la IP de tu servidor.
|
|
|
|
## Kubernetes (EKS, AKS, GKE)
|
|
|
|
Consulta la [guía de Kubernetes](/self-hosting/kubernetes) para la implementación con Helm en Kubernetes gestionado.
|
|
|
|
## Base de datos gestionada (Opcional)
|
|
|
|
Para producción, utiliza un servicio de PostgreSQL gestionado:
|
|
|
|
- **AWS RDS** / **Azure Database** / **Cloud SQL** - Habilita la extensión pgvector
|
|
- **Supabase** / **Neon** - pgvector incluido
|
|
|
|
Establece `DATABASE_URL` en tu entorno:
|
|
|
|
```bash
|
|
DATABASE_URL="postgresql://user:pass@host:5432/db?sslmode=require"
|
|
```
|