You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/platform/enterprise/self-hosted.mdx
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,10 @@ ENTERPRISE_ENABLED=true
23
23
NEXT_PUBLIC_ENTERPRISE_ENABLED=true
24
24
```
25
25
26
-
That turns on organizations, permission groups, SSO, whitelabeling, audit logs, session policies, data retention, data drains, workspace forks, sandboxes, and the inbox.
26
+
That turns on organizations, permission groups, SSO, whitelabeling, audit logs,
27
+
session policies, data retention, data drains, workspace forks, the Sandbox
28
+
entitlement, and the inbox. Sandboxes remain unavailable until their remote
29
+
provider and dedicated Function base are configured.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/platform/self-hosting/index.mdx
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,12 +119,11 @@ Sim is self-contained for the core editor and execution engine. A few features r
119
119
|**Agent blocks**| An API key for at least one model provider | Or a self-hosted OpenAI-compatible endpoint: Ollama, vLLM, or LiteLLM. |
120
120
|**Chat module**|`COPILOT_API_KEY` from sim.ai | Set `NEXT_PUBLIC_CHAT_DISABLED=true` to hide the module instead. |
121
121
|**Integrations**| Your own OAuth app per service | See [Integrations & OAuth](/platform/self-hosting/integrations-oauth). |
122
-
|**Function / Pi blocks at scale**| Optional E2B or Daytona key | Without one, code runs in the in-process isolated-vm sandbox. See [Security](/platform/self-hosting/security). |
122
+
|**Remote Function / Pi execution**| Optional E2B or Daytona key | Without one, JavaScript Function code that has no `import` or `require` still runs in the in-process isolated VM. Python, Shell, JavaScript with external imports, custom Function Sandboxes, and Pi require a configured remote provider. See [Security](/platform/self-hosting/security). |
123
123
124
124
<FAQitems={[
125
125
{ question: "What are the minimum requirements to self-host Sim?", answer: "At minimum you need 2 CPU cores, 12 GB RAM, 20 GB SSD storage, and Docker 20.10 or later. Memory is typically the constraining factor due to workflow execution (isolated-vm sandboxing), file processing, and vector operations (pgvector)."},
126
126
{ question: "What are the required environment variables for production?", answer: "Three secrets are required: BETTER_AUTH_SECRET (authentication), ENCRYPTION_KEY (data encryption), and INTERNAL_API_SECRET (service-to-service auth). Generate each with openssl rand -hex 32. You also need to set NEXT_PUBLIC_APP_URL and BETTER_AUTH_URL to your domain."},
127
127
{ question: "Can I use Sim with local AI models?", answer: "Yes. Sim supports Ollama for local model inference. Use docker-compose.ollama.yml instead of docker-compose.prod.yml. It offers both GPU (with NVIDIA support) and CPU-only profiles, and automatically pulls gemma3:4b as a starter model." },
Python execution and the tooling-dependent blocks require a remote sandbox provider — the in-process isolate runs JavaScript only.
118
+
Python, Shell, JavaScript with external imports, and tooling-dependent blocks
119
+
require a remote sandbox provider. JavaScript without `import` or `require`
120
+
continues to run in the in-process isolate when no remote provider is configured.
119
121
120
122
<Callout type="warn">
121
123
With the default in-process sandbox, treat everyone who can author a workflow as someone running code in your app container's security context. If your Sim instance is open to a wide or partly-trusted audience, use a remote sandbox provider and enable the NetworkPolicy egress restrictions.
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/workflows/blocks/function.mdx
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,11 @@ The **Function block** runs your own JavaScript, Python, or Shell code as one st
16
16
17
17
### Code
18
18
19
-
JavaScript is the default. Python and Shell appear when a remote sandbox provider is enabled. Reference an earlier output directly, with no quotes around the tag, and read an environment variable with `{{VAR}}`:
19
+
JavaScript is the default. The language field is part of the saved workflow and is
20
+
never removed when Sandbox configuration changes. Python remains available as a
21
+
language choice; Shell and custom Sandbox controls appear when a remote Function
22
+
sandbox provider is enabled. Reference an earlier output directly, with no quotes
23
+
around the tag, and read an environment variable with `{{VAR}}`:
20
24
21
25
<Tabsitems={['JavaScript', 'Python', 'Shell']}>
22
26
<Tabvalue="JavaScript">
@@ -98,6 +102,13 @@ on a self-hosted instance, build and configure the provider's dedicated
98
102
generate are captured as images automatically.
99
103
</Callout>
100
104
105
+
<Callouttype="info">
106
+
If no remote provider is configured, JavaScript without `import` or `require`
107
+
continues to run in Sim's local isolated VM. Missing E2B or Daytona configuration
108
+
does not disable that path. Remote-only code fails with an explicit configuration
109
+
error; Sim does not reinterpret Python or Shell as JavaScript.
110
+
</Callout>
111
+
101
112
The dedicated Function base has the same runtime and universal package contract
102
113
on E2B and Daytona. It includes this data-science stack; use a workspace sandbox
103
114
when another dependency must be present:
@@ -128,7 +139,9 @@ Create and edit sandboxes in **Settings → Sandboxes**. Only workspace admins c
128
139
create or edit them. On sim.ai they need an active Max or Enterprise plan;
129
140
self-hosted deployments turn them on with `SANDBOXES_ENABLED` (see
130
141
[self-hosted enterprise](/platform/enterprise/self-hosted)). The section is
131
-
hidden when a deployment has no sandbox provider configured.
142
+
usable only when the deployment also has a remote provider and immutable Function
143
+
base configured. The Function block hides its custom Sandbox selector when that
144
+
runtime is unavailable.
132
145
133
146
1.**Name** the sandbox — `bigquery-etl`, `scraping`, whatever the job is.
134
147
2. Pick the **language**. This selects pip or npm for the dependency list. Python
@@ -363,8 +376,9 @@ The lazy `sim.files` and `sim.values` helpers are available only in JavaScript f
363
376
-**Use stdout to debug.**`console.log()`, `print()`, and ordinary shell output land in `<function.stdout>` and the run logs.
364
377
365
378
<FAQitems={[
366
-
{ question: "What languages does the Function block support?", answer: "JavaScript, Python, and Shell. JavaScript is the default. Python and Shell appear when a remote sandbox provider is enabled." },
379
+
{ question: "What languages does the Function block support?", answer: "JavaScript, Python, and Shell. JavaScript is the default. Python remains a stable saved language choice; Shell and custom Sandbox controls appear when a remote sandbox provider is enabled. Python and Shell execution require that provider." },
367
380
{ question: "When does code run locally vs. in a sandbox?", answer: "JavaScript without external imports runs in a local isolated sandbox for speed. JavaScript that uses import or require, Python, and Shell run in the configured remote sandbox." },
381
+
{ question: "Does JavaScript still work without E2B or Daytona?", answer: "Yes. JavaScript without import or require runs in Sim's local isolated VM and does not require a remote provider. JavaScript with external imports, Python, Shell, and custom Sandboxes require E2B or Daytona and fail explicitly when it is unavailable." },
368
382
{ question: "How do I reference outputs from other blocks inside my code?", answer: "Use angle-bracket syntax directly, like <agent.content> or <api.data>, with no quotes around the tag — Sim replaces it with the real value before execution. For environment variables, use double curly braces: {{API_KEY}}." },
369
383
{ question: "What does the Function block return?", answer: "Two outputs: result and stdout. Use return in JavaScript, assign __sim_result__ in Python, or print an __SIM_RESULT__= marker in Shell to set result. Ordinary console, print, and command output goes to stdout." },
370
384
{ question: "Can I make HTTP requests from a Function block?", answer: "Yes. fetch() is available in JavaScript with async/await. In Python, use requests or httpx. In Shell, use curl or a CLI available on the selected sandbox." },
0 commit comments