sim-setup 1.0.2-preview.44.1 → 1.0.2-preview.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +261 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,272 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Sim Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`sim-setup` is the installer and management tool for a self-hosted
|
|
4
|
+
[Sim](https://sim.ai) deployment. Sim is a workspace for building, deploying,
|
|
5
|
+
and managing AI agents and workflows.
|
|
6
|
+
|
|
7
|
+
For an npm user, `sim-setup` creates a Docker Compose installation from published
|
|
8
|
+
Sim images. It generates the required secrets, writes the deployment files,
|
|
9
|
+
starts the containers, runs database migrations, and checks that the application
|
|
10
|
+
is healthy. It does not clone the Sim repository.
|
|
11
|
+
|
|
12
|
+
This package installs the Sim server. To manage workflows, tables, files, and
|
|
13
|
+
other resources in a running Sim workspace, use the separate
|
|
14
|
+
[`sim` CLI](https://www.npmjs.com/package/sim).
|
|
15
|
+
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
- Node.js 20 or newer
|
|
19
|
+
- Docker with the Compose plugin
|
|
20
|
+
- Ports `3000`, `3002`, and, by default, `5432` available
|
|
21
|
+
- At least 12 GB of system memory and 20 GB of free disk for a small installation
|
|
22
|
+
|
|
23
|
+
Allocate at least 8 GB of memory to Docker for reliable workflow execution.
|
|
24
|
+
Docker Desktop, OrbStack, Colima, and Docker Engine are supported as long as the
|
|
25
|
+
`docker` command can reach the daemon.
|
|
26
|
+
|
|
27
|
+
## Install and run
|
|
28
|
+
|
|
29
|
+
You normally do not need to install the package globally:
|
|
4
30
|
|
|
5
31
|
```bash
|
|
6
32
|
npx sim-setup
|
|
7
33
|
```
|
|
8
34
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
35
|
+
To install it globally instead:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install --global sim-setup
|
|
39
|
+
sim-setup
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The examples below use `npx`; omit it if you installed the package globally.
|
|
43
|
+
|
|
44
|
+
The default standalone setup creates a `sim` directory under the current
|
|
45
|
+
directory:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
sim/
|
|
49
|
+
├── .env
|
|
50
|
+
├── .sim-setup.json
|
|
51
|
+
└── docker-compose.prod.yml
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Use `--dir` to choose an explicit location:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx sim-setup --dir /srv/sim
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
When setup finishes, open [http://localhost:3000](http://localhost:3000) and
|
|
61
|
+
create the first account.
|
|
62
|
+
|
|
63
|
+
## What the setup wizard does
|
|
64
|
+
|
|
65
|
+
The wizard:
|
|
66
|
+
|
|
67
|
+
1. checks Docker, available ports, memory, and disk space
|
|
68
|
+
2. creates or reuses the installation directory
|
|
69
|
+
3. generates authentication, encryption, internal API, and scheduler secrets
|
|
70
|
+
4. optionally connects Sim Chat and model providers
|
|
71
|
+
5. writes `.env` and the managed production Compose file
|
|
72
|
+
6. starts PostgreSQL, Redis, the Sim application, realtime, and scheduled jobs
|
|
73
|
+
7. runs migrations and waits for the health checks to pass
|
|
74
|
+
|
|
75
|
+
Choose **Quick** for sensible defaults and the fewest questions. Choose
|
|
76
|
+
**Custom** to configure additional options such as object storage, email,
|
|
77
|
+
sign-in providers, security settings, and self-hosted feature flags. Skip the
|
|
78
|
+
prompt with:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx sim-setup --quick
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The wizard detects an existing installation. Re-running it lets you keep and
|
|
85
|
+
check the current configuration, review and update it, or archive the current
|
|
86
|
+
`.env` and build a new configuration. If setup fails partway through, fix the
|
|
87
|
+
reported problem and run the same command again; completed configuration is
|
|
88
|
+
preserved.
|
|
89
|
+
|
|
90
|
+
## Chat and model access
|
|
91
|
+
|
|
92
|
+
Sim can run without the optional Chat API key. If you skip Chat setup, the
|
|
93
|
+
wizard hides the Chat module instead of leaving it enabled but unusable. Connect
|
|
94
|
+
or replace the key later with:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npx sim-setup add chat
|
|
98
|
+
npx sim-setup start
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Agent blocks also need access to a model provider. Configure provider keys in a
|
|
102
|
+
workspace in the Sim UI, pass supported keys such as `OPENAI_API_KEY` or
|
|
103
|
+
`ANTHROPIC_API_KEY` into the setup environment, or add deployment-wide model
|
|
104
|
+
configuration later:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx sim-setup add llm
|
|
108
|
+
npx sim-setup start
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
For Docker Compose installations, `add` updates `.env` but does not recreate the
|
|
112
|
+
application container. Run `npx sim-setup start` afterward to apply the changed
|
|
113
|
+
environment. `restart` only restarts containers with their current configuration.
|
|
114
|
+
|
|
115
|
+
## Manage the installation
|
|
116
|
+
|
|
117
|
+
Run commands from the installation directory or pass `--dir <path>` to target a
|
|
118
|
+
specific installation.
|
|
119
|
+
|
|
120
|
+
| Command | What it does |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| `npx sim-setup status` | Show detected installations, container state, and app health |
|
|
123
|
+
| `npx sim-setup logs` | Follow the last 100 lines of Docker Compose logs |
|
|
124
|
+
| `npx sim-setup start` | Start or reconcile the containers; data is kept |
|
|
125
|
+
| `npx sim-setup stop` | Stop containers without removing them |
|
|
126
|
+
| `npx sim-setup restart` | Restart the current containers |
|
|
127
|
+
| `npx sim-setup update` | Refresh the managed Compose file, pull images, recreate services, and run migrations |
|
|
128
|
+
| `npx sim-setup down` | Remove containers but keep data volumes |
|
|
129
|
+
| `npx sim-setup reset` | Archive `.env`, remove containers, and delete managed data volumes |
|
|
130
|
+
|
|
131
|
+
`down` and `reset` are deliberately different. Use `down` when you want to
|
|
132
|
+
remove containers and bring the same installation back later. `reset` is a
|
|
133
|
+
destructive fresh start and asks for confirmation before deleting data.
|
|
134
|
+
|
|
135
|
+
### Check configuration
|
|
136
|
+
|
|
137
|
+
`config` reports which effective configuration sources, capabilities, and OAuth
|
|
138
|
+
integrations were detected. It does not print secret values:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npx sim-setup config
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`doctor` validates environment files, required values, cross-service
|
|
145
|
+
consistency, and live dependencies:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
npx sim-setup doctor
|
|
149
|
+
npx sim-setup doctor --fix
|
|
150
|
+
npx sim-setup doctor --json
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Use `config` to answer “what is configured?” and `status` to answer “what is
|
|
154
|
+
running and healthy?”
|
|
155
|
+
|
|
156
|
+
### Add or change capabilities
|
|
12
157
|
|
|
13
|
-
|
|
158
|
+
Configure one capability without walking through the complete wizard:
|
|
14
159
|
|
|
15
160
|
```bash
|
|
161
|
+
npx sim-setup add email
|
|
162
|
+
npx sim-setup add storage
|
|
163
|
+
npx sim-setup add sandbox
|
|
164
|
+
npx sim-setup add jobs
|
|
165
|
+
npx sim-setup add cache
|
|
166
|
+
npx sim-setup add knowledge
|
|
167
|
+
npx sim-setup add knowledge-embeddings
|
|
16
168
|
npx sim-setup add chat
|
|
169
|
+
npx sim-setup add llm
|
|
170
|
+
npx sim-setup add integration slack
|
|
17
171
|
```
|
|
172
|
+
|
|
173
|
+
Run `npx sim-setup start` after changing a Docker Compose capability so the app
|
|
174
|
+
container receives the new environment.
|
|
175
|
+
|
|
176
|
+
## Updating
|
|
177
|
+
|
|
178
|
+
Update a Docker Compose installation with:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
npx sim-setup update
|
|
182
|
+
npx sim-setup status
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The update command keeps Docker volumes, applies the current managed Compose
|
|
186
|
+
file, pulls the version selected by `SIM_VERSION`, and runs migrations. If
|
|
187
|
+
`SIM_VERSION` is unset, the deployment tracks `latest`.
|
|
188
|
+
|
|
189
|
+
For production, pin an explicit version, back up the database first, and read
|
|
190
|
+
the [upgrade guide](https://docs.sim.ai/platform/self-hosting/upgrades). Docker
|
|
191
|
+
Compose updates briefly interrupt the application because Compose does not
|
|
192
|
+
provide rolling deployments.
|
|
193
|
+
|
|
194
|
+
## Files, secrets, and data
|
|
195
|
+
|
|
196
|
+
The generated `.env` contains credentials and encryption keys. It is written
|
|
197
|
+
with owner-only permissions and must not be committed to source control.
|
|
198
|
+
|
|
199
|
+
Back up `.env` securely outside the server before using the deployment for real
|
|
200
|
+
data. In particular, `ENCRYPTION_KEY` and `API_ENCRYPTION_KEY` protect stored
|
|
201
|
+
credentials and API keys. A database backup restored without the matching keys
|
|
202
|
+
contains data that Sim cannot decrypt.
|
|
203
|
+
|
|
204
|
+
PostgreSQL data lives in a Docker volume. These commands preserve it:
|
|
205
|
+
|
|
206
|
+
- `start`
|
|
207
|
+
- `stop`
|
|
208
|
+
- `restart`
|
|
209
|
+
- `update`
|
|
210
|
+
- `down`
|
|
211
|
+
|
|
212
|
+
`reset` deletes managed volumes. It archives `.env` beside the installation
|
|
213
|
+
before doing so, but that local archive is not a substitute for an off-machine
|
|
214
|
+
backup.
|
|
215
|
+
|
|
216
|
+
The default local file-storage fallback is different: uploaded files live inside
|
|
217
|
+
the application container, not in a managed volume. They can be lost when the
|
|
218
|
+
container is removed or recreated, including during `down` or `update`.
|
|
219
|
+
Configure object storage before keeping files you care about.
|
|
220
|
+
|
|
221
|
+
## Production deployments
|
|
222
|
+
|
|
223
|
+
The generated Compose installation is suitable for local evaluation and a
|
|
224
|
+
single-node deployment. Before exposing it publicly, configure at least:
|
|
225
|
+
|
|
226
|
+
- a public application URL and TLS reverse proxy
|
|
227
|
+
- database and `.env` backups
|
|
228
|
+
- durable object storage for uploaded files
|
|
229
|
+
- email delivery for invitations and email-based authentication
|
|
230
|
+
- OAuth applications for integrations you plan to use
|
|
231
|
+
- a pinned Sim version and an upgrade procedure
|
|
232
|
+
|
|
233
|
+
See the [Docker deployment guide](https://docs.sim.ai/platform/self-hosting/docker)
|
|
234
|
+
and the complete [self-hosting documentation](https://docs.sim.ai/platform/self-hosting).
|
|
235
|
+
|
|
236
|
+
## Working from the Sim source repository
|
|
237
|
+
|
|
238
|
+
Inside a cloned Sim repository, use:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
bun run sim-setup
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
The source checkout adds local development and Kubernetes modes:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
bun run sim-setup --mode dev
|
|
248
|
+
bun run sim-setup --mode k8s
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Standalone npm use supports Docker Compose mode only. Development and Kubernetes
|
|
252
|
+
modes need source-only files and are rejected outside a complete checkout.
|
|
253
|
+
|
|
254
|
+
## Help
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
npx sim-setup --help
|
|
258
|
+
npx sim-setup --version
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Further documentation:
|
|
262
|
+
|
|
263
|
+
- [Self-hosting overview](https://docs.sim.ai/platform/self-hosting)
|
|
264
|
+
- [Docker Compose](https://docs.sim.ai/platform/self-hosting/docker)
|
|
265
|
+
- [Environment variables](https://docs.sim.ai/platform/self-hosting/environment-variables)
|
|
266
|
+
- [Upgrades](https://docs.sim.ai/platform/self-hosting/upgrades)
|
|
267
|
+
- [Troubleshooting](https://docs.sim.ai/platform/self-hosting/troubleshooting)
|
|
268
|
+
- [Verification checklist](https://docs.sim.ai/platform/self-hosting/verify)
|
|
269
|
+
|
|
270
|
+
## License
|
|
271
|
+
|
|
272
|
+
Apache-2.0
|