Skip to content

Commit d68be18

Browse files
authored
Merge pull request #302 from deploystackio/fix/self-hosted-update
Fix/self hosted update
2 parents 2ba92ec + 9cc8ee8 commit d68be18

File tree

5 files changed

+84
-30
lines changed

5 files changed

+84
-30
lines changed

development/backend/database/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ POSTGRES_SSL=true
397397
```yaml
398398
services:
399399
postgres:
400-
image: postgres:16-alpine
400+
image: postgres:18-alpine
401401
environment:
402402
POSTGRES_DB: deploystack
403403
POSTGRES_USER: deploystack

development/backend/database/postgresql.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ This enables SSL with `rejectUnauthorized: false` for self-signed certificates.
265265
```yaml
266266
services:
267267
postgres:
268-
image: postgres:16-alpine
268+
image: postgres:18-alpine
269269
environment:
270270
POSTGRES_DB: deploystack
271271
POSTGRES_USER: deploystack

development/satellite/process-management.mdx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ All communication uses newline-delimited JSON following JSON-RPC 2.0 specificati
116116
**Idle Process Management**: Processes that remain inactive for extended periods are automatically terminated and respawned on-demand to optimize memory usage. See [Idle Process Management](/development/satellite/idle-process-management) for details on automatic termination, dormant state tracking, and respawning.
117117
</Info>
118118

119+
<Info>
120+
**Configuration Updates**: When a user updates their MCP server configuration (args, env) via the dashboard, the backend sends a configure command to the satellite. For stdio servers, the satellite automatically restarts the process with the new configuration. See [Backend Communication](/development/satellite/backend-communication) for the command flow.
121+
</Info>
122+
119123
### Lifecycle States
120124

121125
**starting:**
@@ -161,7 +165,7 @@ Process termination follows a two-phase graceful shutdown approach to ensure cle
161165

162166
#### Termination Types
163167

164-
The system handles three types of intentional terminations differently:
168+
The system handles four types of intentional terminations differently:
165169

166170
**1. Manual Termination**
167171
- Triggered by explicit restart or stop commands
@@ -184,6 +188,19 @@ The system handles three types of intentional terminations differently:
184188
- No auto-restart triggered (intentional removal)
185189
- Invoked via `removeServerCompletely()` method
186190

191+
**4. Configuration Update Restart**
192+
- Triggered when stdio server configuration is modified (e.g., user args change)
193+
- Detected via `DynamicConfigManager` comparing old vs new configuration
194+
- Existing process terminated with graceful shutdown
195+
- Tools cleared from cache via `stdioToolDiscoveryManager.clearServerTools()`
196+
- New process spawned with updated configuration (new args, env)
197+
- Tool discovery runs automatically on the new process
198+
- Enables real-time configuration updates without satellite restart
199+
200+
<Info>
201+
**HTTP/SSE Servers**: Unlike stdio servers, HTTP/SSE servers don't require restart on config changes. Their configuration (headers, query params, URL) is read fresh on each request, so updates are immediate.
202+
</Info>
203+
187204
#### Crash Detection vs Intentional Shutdown
188205

189206
The system distinguishes between crashes and intentional shutdowns:

self-hosted/docker-compose.mdx

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ Download the `docker-compose.yml` file to your working directory:
4444
curl -o docker-compose.yml https://raw.githubusercontent.com/deploystackio/deploystack/main/docker-compose.yml
4545
```
4646

47+
<Info>
48+
**Default Database Password**: The Docker Compose file uses a default PostgreSQL password (`deploystack`) for quick demos and local testing. For production or internet-exposed deployments, set a strong password via the `POSTGRES_PASSWORD` environment variable in your `.env` file.
49+
</Info>
50+
4751
### Step 2: Generate Encryption Secret
4852

4953
DeployStack requires a secure encryption secret for protecting sensitive data like API keys and credentials.
@@ -144,13 +148,25 @@ The satellite must be deployed separately after completing the setup wizard:
144148
- Click "Generate Token" and copy the full token
145149
- Token format: `deploystack_satellite_global_eyJhbGc...`
146150

147-
3. **Deploy Satellite with Docker**:
151+
3. **Find your Docker network name**:
152+
153+
The satellite must join the same network as the backend. Find your network name:
154+
```bash
155+
docker network ls | grep deploystack
156+
```
157+
158+
You'll see something like `docker-compose_deploystack-network` or similar. Use this name in the next step.
159+
160+
4. **Deploy Satellite with Docker**:
161+
162+
<Warning>
163+
The satellite requires a running backend. If the backend is not reachable, the satellite will exit immediately. Make sure `docker-compose ps` shows the backend as healthy before proceeding.
164+
</Warning>
148165

149166
**For local development (connecting from same machine):**
150167
```bash
151168
docker run -d \
152-
--name deploystack-satellite \
153-
--network deploystack-network \
169+
--network <your-network-name> \
154170
-p 3001:3001 \
155171
-e DEPLOYSTACK_BACKEND_URL="http://deploystack-backend:3000" \
156172
-e DEPLOYSTACK_SATELLITE_NAME="docker-satellite-001" \
@@ -159,11 +175,12 @@ The satellite must be deployed separately after completing the setup wizard:
159175
deploystack/satellite:latest
160176
```
161177

178+
Replace `<your-network-name>` with the network from step 3 (e.g., `docker-compose_deploystack-network`).
179+
162180
**For remote access (connecting from MCP clients via domain/IP):**
163181
```bash
164182
docker run -d \
165-
--name deploystack-satellite \
166-
--network deploystack-network \
183+
--network <your-network-name> \
167184
-p 3001:3001 \
168185
-e DEPLOYSTACK_BACKEND_URL="http://deploystack-backend:3000" \
169186
-e DEPLOYSTACK_SATELLITE_URL="https://satellite.example.com" \
@@ -181,12 +198,14 @@ The satellite must be deployed separately after completing the setup wizard:
181198
- Required for OAuth authentication to work with remote MCP clients
182199
</Info>
183200

184-
4. **Verify Satellite Registration**:
201+
5. **Verify Satellite Registration**:
185202
```bash
186-
docker logs deploystack-satellite
203+
docker logs <container-id>
187204
# Should show: ✅ Satellite registered successfully: docker-satellite-001
188205
```
189206

207+
Get the container ID from `docker ps`.
208+
190209
<Info>
191210
**Note**: After initial registration, the satellite saves its API key to persistent storage. The registration token is only needed for the first startup. Container restarts will use the saved API key automatically.
192211
</Info>

self-hosted/quick-start.mdx

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ The fastest way to get DeployStack backend and frontend running with proper netw
3838
<Info>
3939
**Note**: This deploys the backend and frontend only. The satellite service must be deployed separately after completing the setup wizard (see [Satellite Service](#satellite-service) section below).
4040
</Info>
41+
42+
<Info>
43+
**Default Database Password**: The Docker Compose file uses a default PostgreSQL password (`deploystack`) for quick demos and local testing. For production or internet-exposed deployments, add `POSTGRES_PASSWORD=your_secure_password` before the command.
44+
</Info>
4145
</Step>
4246

4347
<Step title="Access DeployStack">
@@ -46,14 +50,14 @@ The fastest way to get DeployStack backend and frontend running with proper netw
4650
- **Backend API**: [http://localhost:3000](http://localhost:3000)
4751
</Step>
4852

49-
<Step title="Complete Setup Wizard">
50-
Follow the on-screen setup wizard to:
51-
- Create your admin account
52-
- Configure basic settings
53+
<Step title="Create Admin Account">
54+
When opening the frontend, you will be redirected to `http://localhost:8080/login`
55+
- Go to "Create Account" to set up your admin user ([read more about user types](/roles))
56+
- Login with your new admin account
5357
</Step>
5458

5559
<Step title="Deploy Satellite">
56-
After completing the setup wizard, proceed to the [Satellite Service](#satellite-service) section below to deploy your first satellite and start managing MCP servers.
60+
After creating your admin account, proceed to the [Satellite Service](#satellite-service) section below to deploy your first satellite and start managing MCP servers.
5761
</Step>
5862
</Steps>
5963

@@ -209,25 +213,43 @@ After completing the basic backend and frontend setup, deploy at least one satel
209213
The token format will be: `deploystack_satellite_global_eyJhbGciOi...`
210214
</Step>
211215

216+
<Step title="Find Docker Network">
217+
The satellite must join the same Docker network as the backend. Find your network name:
218+
219+
```bash
220+
docker network ls | grep deploystack
221+
```
222+
223+
You'll see something like `docker-compose_deploystack-network` or similar. Use this name in the next step.
224+
</Step>
225+
212226
<Step title="Start Satellite Service">
227+
<Warning>
228+
The satellite requires a running backend. If the backend is not reachable, the satellite will exit immediately. Make sure the backend is running before proceeding.
229+
</Warning>
230+
213231
**For local development (connecting from same machine):**
214232
```bash
215-
docker run -d \
216-
--name deploystack-satellite \
233+
docker run \
234+
--network <your-network-name> \
217235
-p 3001:3001 \
218-
-e DEPLOYSTACK_BACKEND_URL="http://localhost:3000" \
236+
-e DEPLOYSTACK_BACKEND_URL="http://deploystack-backend:3000" \
219237
-e DEPLOYSTACK_SATELLITE_NAME="my-satellite-001" \
220238
-e DEPLOYSTACK_REGISTRATION_TOKEN="your-token-here" \
221239
-v deploystack_satellite_persistent:/app/persistent_data \
222240
deploystack/satellite:latest
223241
```
224242

243+
Replace `<your-network-name>` with the network from the previous step (e.g., `docker-compose_deploystack-network`).
244+
245+
The logs will be displayed directly in your terminal. You should see the satellite connect to the backend and register successfully.
246+
225247
**For remote access (connecting from MCP clients via domain/IP):**
226248
```bash
227-
docker run -d \
228-
--name deploystack-satellite \
249+
docker run \
250+
--network <your-network-name> \
229251
-p 3001:3001 \
230-
-e DEPLOYSTACK_BACKEND_URL="http://YOUR_SERVER_IP:3000" \
252+
-e DEPLOYSTACK_BACKEND_URL="http://deploystack-backend:3000" \
231253
-e DEPLOYSTACK_SATELLITE_URL="https://satellite.example.com" \
232254
-e DEPLOYSTACK_SATELLITE_NAME="my-satellite-001" \
233255
-e DEPLOYSTACK_REGISTRATION_TOKEN="your-token-here" \
@@ -242,27 +264,23 @@ After completing the basic backend and frontend setup, deploy at least one satel
242264
- Use base URL only (e.g., `https://satellite.example.com`) - no `/mcp` or `/sse` paths
243265
- Required for OAuth authentication to work with remote MCP clients
244266
</Info>
245-
267+
246268
<Warning>
247269
**Satellite Name Requirements:**
248270
- 10-32 characters
249271
- Only lowercase letters, numbers, hyphens, and underscores
250272
- No spaces or special characters
251273
</Warning>
252274
</Step>
253-
275+
254276
<Step title="Verify Satellite Registration">
255-
Check the satellite logs to confirm successful registration:
256-
257-
```bash
258-
docker logs deploystack-satellite
259-
```
260-
261-
You should see:
277+
In the terminal output, you should see:
262278
```
263279
✅ Satellite registered successfully: my-satellite-001
264280
🔑 API key received and ready for authenticated communication
265281
```
282+
283+
Once verified, you can stop the container with `Ctrl+C` and restart it in detached mode by adding `-d` flag to the command.
266284
</Step>
267285
</Steps>
268286

0 commit comments

Comments
 (0)