Skip to content

Commit c9068d0

Browse files
authored
chore(readme): trim readme, add more envvar info (#2791)
1 parent 048eddd commit c9068d0

File tree

2 files changed

+33
-91
lines changed

2 files changed

+33
-91
lines changed

README.md

Lines changed: 26 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<a href="https://docs.sim.ai" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/Docs-6F3DFA.svg" alt="Documentation"></a>
1414
</p>
1515

16+
<p align="center">
17+
<a href="https://cursor.com/link/prompt?text=Help%20me%20set%20up%20Sim%20Studio%20locally.%20Follow%20these%20steps%3A%0A%0A1.%20First%2C%20verify%20Docker%20is%20installed%20and%20running%3A%0A%20%20%20docker%20--version%0A%20%20%20docker%20info%0A%0A2.%20Clone%20the%20repository%3A%0A%20%20%20git%20clone%20https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim.git%0A%20%20%20cd%20sim%0A%0A3.%20Start%20the%20services%20with%20Docker%20Compose%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.prod.yml%20up%20-d%0A%0A4.%20Wait%20for%20all%20containers%20to%20be%20healthy%20(this%20may%20take%201-2%20minutes)%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.prod.yml%20ps%0A%0A5.%20Verify%20the%20app%20is%20accessible%20at%20http%3A%2F%2Flocalhost%3A3000%0A%0AIf%20there%20are%20any%20errors%2C%20help%20me%20troubleshoot%20them.%20Common%20issues%3A%0A-%20Port%203000%2C%203002%2C%20or%205432%20already%20in%20use%0A-%20Docker%20not%20running%0A-%20Insufficient%20memory%20(needs%2012GB%2B%20RAM)%0A%0AFor%20local%20AI%20models%20with%20Ollama%2C%20use%20this%20instead%20of%20step%203%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.ollama.yml%20--profile%20setup%20up%20-d"><img src="https://img.shields.io/badge/Set%20Up%20with-Cursor-000000?logo=cursor&logoColor=white" alt="Set Up with Cursor"></a>
18+
</p>
19+
1620
### Build Workflows with Ease
1721
Design agent workflows visually on a canvas—connect agents, tools, and blocks, then run them instantly.
1822

@@ -60,17 +64,11 @@ Docker must be installed and running on your machine.
6064
### Self-hosted: Docker Compose
6165

6266
```bash
63-
# Clone the repository
64-
git clone https://github.com/simstudioai/sim.git
65-
66-
# Navigate to the project directory
67-
cd sim
68-
69-
# Start Sim
67+
git clone https://github.com/simstudioai/sim.git && cd sim
7068
docker compose -f docker-compose.prod.yml up -d
7169
```
7270

73-
Access the application at [http://localhost:3000/](http://localhost:3000/)
71+
Open [http://localhost:3000](http://localhost:3000)
7472

7573
#### Using Local Models with Ollama
7674

@@ -91,33 +89,17 @@ docker compose -f docker-compose.ollama.yml exec ollama ollama pull llama3.1:8b
9189

9290
#### Using an External Ollama Instance
9391

94-
If you already have Ollama running on your host machine (outside Docker), you need to configure the `OLLAMA_URL` to use `host.docker.internal` instead of `localhost`:
92+
If Ollama is running on your host machine, use `host.docker.internal` instead of `localhost`:
9593

9694
```bash
97-
# Docker Desktop (macOS/Windows)
9895
OLLAMA_URL=http://host.docker.internal:11434 docker compose -f docker-compose.prod.yml up -d
99-
100-
# Linux (add extra_hosts or use host IP)
101-
docker compose -f docker-compose.prod.yml up -d # Then set OLLAMA_URL to your host's IP
10296
```
10397

104-
**Why?** When running inside Docker, `localhost` refers to the container itself, not your host machine. `host.docker.internal` is a special DNS name that resolves to the host.
105-
106-
For Linux users, you can either:
107-
- Use your host machine's actual IP address (e.g., `http://192.168.1.100:11434`)
108-
- Add `extra_hosts: ["host.docker.internal:host-gateway"]` to the simstudio service in your compose file
98+
On Linux, use your host's IP address or add `extra_hosts: ["host.docker.internal:host-gateway"]` to the compose file.
10999

110100
#### Using vLLM
111101

112-
Sim also supports [vLLM](https://docs.vllm.ai/) for self-hosted models with OpenAI-compatible API:
113-
114-
```bash
115-
# Set these environment variables
116-
VLLM_BASE_URL=http://your-vllm-server:8000
117-
VLLM_API_KEY=your_optional_api_key # Only if your vLLM instance requires auth
118-
```
119-
120-
When running with Docker, use `host.docker.internal` if vLLM is on your host machine (same as Ollama above).
102+
Sim supports [vLLM](https://docs.vllm.ai/) for self-hosted models. Set `VLLM_BASE_URL` and optionally `VLLM_API_KEY` in your environment.
121103

122104
### Self-hosted: Dev Containers
123105

@@ -128,14 +110,9 @@ When running with Docker, use `host.docker.internal` if vLLM is on your host mac
128110

129111
### Self-hosted: Manual Setup
130112

131-
**Requirements:**
132-
- [Bun](https://bun.sh/) runtime
133-
- [Node.js](https://nodejs.org/) v20+ (required for sandboxed code execution)
134-
- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings)
135-
136-
**Note:** Sim uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.
113+
**Requirements:** [Bun](https://bun.sh/), [Node.js](https://nodejs.org/) v20+, PostgreSQL 12+ with [pgvector](https://github.com/pgvector/pgvector)
137114

138-
1. Clone and install dependencies:
115+
1. Clone and install:
139116

140117
```bash
141118
git clone https://github.com/simstudioai/sim.git
@@ -145,75 +122,33 @@ bun install
145122

146123
2. Set up PostgreSQL with pgvector:
147124

148-
You need PostgreSQL with the `vector` extension for embedding support. Choose one option:
149-
150-
**Option A: Using Docker (Recommended)**
151-
```bash
152-
# Start PostgreSQL with pgvector extension
153-
docker run --name simstudio-db \
154-
-e POSTGRES_PASSWORD=your_password \
155-
-e POSTGRES_DB=simstudio \
156-
-p 5432:5432 -d \
157-
pgvector/pgvector:pg17
158-
```
159-
160-
**Option B: Manual Installation**
161-
- Install PostgreSQL 12+ and the pgvector extension
162-
- See [pgvector installation guide](https://github.com/pgvector/pgvector#installation)
163-
164-
3. Set up environment:
165-
166125
```bash
167-
cd apps/sim
168-
cp .env.example .env # Configure with required variables (DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL)
126+
docker run --name simstudio-db -e POSTGRES_PASSWORD=your_password -e POSTGRES_DB=simstudio -p 5432:5432 -d pgvector/pgvector:pg17
169127
```
170128

171-
Update your `.env` file with the database URL:
172-
```bash
173-
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
174-
```
175-
176-
4. Set up the database:
177-
178-
First, configure the database package environment:
179-
```bash
180-
cd packages/db
181-
cp .env.example .env
182-
```
129+
Or install manually via the [pgvector guide](https://github.com/pgvector/pgvector#installation).
183130

184-
Update your `packages/db/.env` file with the database URL:
185-
```bash
186-
DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
187-
```
131+
3. Configure environment:
188132

189-
Then run the migrations:
190133
```bash
191-
cd packages/db # Required so drizzle picks correct .env file
192-
bunx drizzle-kit migrate --config=./drizzle.config.ts
134+
cp apps/sim/.env.example apps/sim/.env
135+
cp packages/db/.env.example packages/db/.env
136+
# Edit both .env files to set DATABASE_URL="postgresql://postgres:your_password@localhost:5432/simstudio"
193137
```
194138

195-
5. Start the development servers:
196-
197-
**Recommended approach - run both servers together (from project root):**
139+
4. Run migrations:
198140

199141
```bash
200-
bun run dev:full
142+
cd packages/db && bunx drizzle-kit migrate --config=./drizzle.config.ts
201143
```
202144

203-
This starts both the main Next.js application and the realtime socket server required for full functionality.
204-
205-
**Alternative - run servers separately:**
145+
5. Start development servers:
206146

207-
Next.js app (from project root):
208147
```bash
209-
bun run dev
148+
bun run dev:full # Starts both Next.js app and realtime socket server
210149
```
211150

212-
Realtime socket server (from `apps/sim` directory in a separate terminal):
213-
```bash
214-
cd apps/sim
215-
bun run dev:sockets
216-
```
151+
Or run separately: `bun run dev` (Next.js) and `cd apps/sim && bun run dev:sockets` (realtime).
217152

218153
## Copilot API Keys
219154

@@ -224,17 +159,17 @@ Copilot is a Sim-managed service. To use Copilot on a self-hosted instance:
224159

225160
## Environment Variables
226161

227-
Key environment variables for self-hosted deployments (see `apps/sim/.env.example` for full list):
162+
Key environment variables for self-hosted deployments. See [`.env.example`](apps/sim/.env.example) for defaults or [`env.ts`](apps/sim/lib/core/config/env.ts) for the full list.
228163

229164
| Variable | Required | Description |
230165
|----------|----------|-------------|
231166
| `DATABASE_URL` | Yes | PostgreSQL connection string with pgvector |
232167
| `BETTER_AUTH_SECRET` | Yes | Auth secret (`openssl rand -hex 32`) |
233168
| `BETTER_AUTH_URL` | Yes | Your app URL (e.g., `http://localhost:3000`) |
234169
| `NEXT_PUBLIC_APP_URL` | Yes | Public app URL (same as above) |
235-
| `ENCRYPTION_KEY` | Yes | Encryption key (`openssl rand -hex 32`) |
236-
| `OLLAMA_URL` | No | Ollama server URL (default: `http://localhost:11434`) |
237-
| `VLLM_BASE_URL` | No | vLLM server URL for self-hosted models |
170+
| `ENCRYPTION_KEY` | Yes | Encrypts environment variables (`openssl rand -hex 32`) |
171+
| `INTERNAL_API_SECRET` | Yes | Encrypts internal API routes (`openssl rand -hex 32`) |
172+
| `API_ENCRYPTION_KEY` | Yes | Encrypts API keys (`openssl rand -hex 32`) |
238173
| `COPILOT_API_KEY` | No | API key from sim.ai for Copilot features |
239174

240175
## Troubleshooting

apps/docs/content/docs/en/self-hosting/index.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ import { Callout } from 'fumadocs-ui/components/callout'
88

99
Deploy Sim Studio on your own infrastructure with Docker or Kubernetes.
1010

11+
<div className="flex gap-2 my-4">
12+
<a href="https://cursor.com/link/prompt?text=Help%20me%20set%20up%20Sim%20Studio%20locally.%20Follow%20these%20steps%3A%0A%0A1.%20First%2C%20verify%20Docker%20is%20installed%20and%20running%3A%0A%20%20%20docker%20--version%0A%20%20%20docker%20info%0A%0A2.%20Clone%20the%20repository%3A%0A%20%20%20git%20clone%20https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim.git%0A%20%20%20cd%20sim%0A%0A3.%20Start%20the%20services%20with%20Docker%20Compose%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.prod.yml%20up%20-d%0A%0A4.%20Wait%20for%20all%20containers%20to%20be%20healthy%20(this%20may%20take%201-2%20minutes)%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.prod.yml%20ps%0A%0A5.%20Verify%20the%20app%20is%20accessible%20at%20http%3A%2F%2Flocalhost%3A3000%0A%0AIf%20there%20are%20any%20errors%2C%20help%20me%20troubleshoot%20them.%20Common%20issues%3A%0A-%20Port%203000%2C%203002%2C%20or%205432%20already%20in%20use%0A-%20Docker%20not%20running%0A-%20Insufficient%20memory%20(needs%2012GB%2B%20RAM)%0A%0AFor%20local%20AI%20models%20with%20Ollama%2C%20use%20this%20instead%20of%20step%203%3A%0A%20%20%20docker%20compose%20-f%20docker-compose.ollama.yml%20--profile%20setup%20up%20-d">
13+
<img src="https://img.shields.io/badge/Set%20Up%20with-Cursor-000000?logo=cursor&logoColor=white" alt="Set Up with Cursor" />
14+
</a>
15+
</div>
16+
1117
## Requirements
1218

1319
| Resource | Minimum | Recommended |
@@ -48,3 +54,4 @@ Open [http://localhost:3000](http://localhost:3000)
4854
| realtime | 3002 | WebSocket server |
4955
| db | 5432 | PostgreSQL with pgvector |
5056
| migrations | - | Database migrations (runs once) |
57+

0 commit comments

Comments
 (0)