Skip to content

Commit 37a9a31

Browse files
committed
clarifying admin requirements
1 parent cd2f536 commit 37a9a31

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

docs/guides/examples/puppeteer.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ In this example we use [Puppeteer](https://pptr.dev/) with a [BrowserBase](https
153153
<Warning>
154154
When web scraping, you MUST use the technique below which uses a proxy with Puppeteer. Direct
155155
scraping without using `browserWSEndpoint` is prohibited and will result in account suspension.
156+
Screenshots are also prohibited when scraping.
156157
</Warning>
157158

158159
### Task code

docs/self-hosting/docker.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,30 @@ docker compose down
184184
docker compose up -d
185185
```
186186
187+
### Creating additional worker groups
188+
189+
To create additional worker groups beyond the bootstrap group, use the admin API endpoint. This requires admin privileges.
190+
191+
**Making a user admin:**
192+
- **New users**: Set `ADMIN_EMAILS` environment variable (regex pattern) before user creation.
193+
- **Existing users**: Set `admin = true` in the `user` table in your database.
194+
195+
**Creating a worker group:**
196+
197+
```bash
198+
api_url=http://localhost:8030
199+
wg_name=my-worker
200+
admin_pat=tr_pat_...
201+
202+
curl -X POST \
203+
"$api_url/admin/api/v1/workers" \
204+
-H "Authorization: Bearer $admin_pat" \
205+
-H "Content-Type: application/json" \
206+
-d "{\"name\": \"$wg_name\"}"
207+
```
208+
209+
The response includes a `token` field if the worker group is newly created.
210+
187211
## Registry setup
188212
189213
The registry is used to store and pull deployment images. When testing the stack locally, the defaults should work out of the box.

docs/self-hosting/env/webapp.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,5 @@ mode: "wide"
142142
| `OPENAI_API_KEY` | No || OpenAI API key. |
143143
| `MACHINE_PRESETS_OVERRIDE_PATH` | No || Path to machine presets override file. See [machine overrides](/self-hosting/overview#machine-overrides). |
144144
| `APP_ENV` | No | `NODE_ENV` | App environment. Used for things like the title tag. |
145-
| `ADMIN_EMAILS` | No || Regex of user emails to automatically promote to admin. |
145+
| `ADMIN_EMAILS` | No || Regex of user emails to automatically promote to admin on signup. Does not apply to existing users. |
146146
| `EVENT_LOOP_MONITOR_ENABLED` | No | 1 | Node.js event loop lag monitor. |

0 commit comments

Comments
 (0)