general.yaml file controls general application settings and behaviors. These settings affect how Shipped operates and how configuration changes are distributed to clients.
File Location
Placegeneral.yaml in your config directory:
- Docker:
/data/config/general.yaml(default) - Custom: Set via
SERVER_CONFIG_DIRenvironment variable
Configuration Options
streamConfigChanges
Controls whether configuration changes are streamed to connected clients in real-time via Server-Sent Events (SSE).Enable real-time streaming of configuration changes to connected clients. When enabled:
- File changes are detected by the watcher
- Configuration is validated and updated
- Changes are broadcast to all connected clients via SSE
- UI updates automatically without page refresh
- Configuration still hot-reloads on the server
- Clients must manually refresh to see changes
- Reduces server-side event streaming overhead
trueSchema
The general configuration uses a simple schema:Example Configuration
general.yaml
Default Values
Ifgeneral.yaml is missing or empty, these defaults are used:
Default general.yaml
Streaming Architecture
WhenstreamConfigChanges is enabled, configuration updates flow from server to clients via ORPC’s streaming capabilities:
How It Works
File Change Detection
Chokidar detects a change in any config file (lists.yaml, providers.yaml, etc.)
Validation and Update
Config is parsed, validated with Effect Schema, and the SubscriptionRef is updated
Client-Side Behavior
The client-side handles streaming automatically via theuseUserConfig() composable:
Stream Status
You can monitor the stream status in your application:Performance Considerations
When to Enable Streaming
When to Enable Streaming
Enable when:
- You frequently update configuration
- Multiple users need to see changes immediately
- Your deployment supports SSE connections
- You want the best user experience
- Instant UI updates without refresh
- No polling overhead
- Efficient server-to-client communication
When to Disable Streaming
When to Disable Streaming
Disable when:
- Configuration rarely changes
- SSE connections are problematic (some proxies/load balancers)
- You want to reduce server-side event streaming overhead
- Manual refresh is acceptable
- Slightly reduced server overhead
- No long-lived SSE connections
- Simpler debugging
Validation and Error Handling
Validation Rules
Validation Rules
- streamConfigChanges must be a boolean
- Invalid values fall back to the default (
true)
Invalid Configuration Handling
When general configuration is invalid:- Invalid fields are ignored
- Default values are used
- A warning is logged with validation details
- The application continues running normally
IDE Autocompletion
Enable IDE autocompletion by adding the schema reference:general.yaml
Hot Reloading
Changes togeneral.yaml are automatically detected and applied:
- Edit
general.yamlin your config directory - Save the file
- Shipped automatically reloads the configuration
- Streaming behavior updates based on new setting
Changing
streamConfigChanges from true to false will disconnect active SSE streams. Clients will need to manually refresh to see further config updates.Changing from false to true requires clients to refresh to establish the SSE connection.Usage Examples
Enable real-time updates (recommended)
Enable real-time updates (recommended)
Default configuration with optimal user experience:
general.yaml
Disable streaming for static deployments
Disable streaming for static deployments
When configuration rarely changes:
general.yaml
SSE Connection Details
When streaming is enabled:- Protocol: Server-Sent Events (SSE) over HTTP
- Transport: ORPC event iterator
- Reconnection: Automatic with 2-second retry delay
- Heartbeat: Managed by ORPC
- Compression: Depends on server/proxy configuration
Proxy Considerations
Manual Refresh
Even with streaming enabled, you can manually refresh configuration:Server-Side Implementation
The server exposes two RPC endpoints for configuration:Stream that’s converted to an EventIterator for ORPC transport.
Complete Example
Here’s a completegeneral.yaml with all available options:
general.yaml
Troubleshooting
Streaming not working
Streaming not working
- Verify
streamConfigChanges: trueingeneral.yaml - Check browser console for connection errors
- Verify SSE endpoint is accessible (check network tab)
- Check for proxy/load balancer issues
- Try disabling browser extensions that might block SSE
Frequent disconnections
Frequent disconnections
- Check proxy timeout settings (need to allow long-lived connections)
- Verify network stability
- Look for error messages in browser console
- Check server logs for connection issues
Config changes not appearing
Config changes not appearing
- Verify file is saved in the correct location
- Check YAML syntax is valid
- Look for validation errors in application logs
- Try manually refreshing the page
- Verify
streamConfigChangesis enabled
Environment Variables
General configuration works alongside environment variables:| Variable | Type | Default | Description |
|---|---|---|---|
SERVER_CONFIG_DIR | string | config | Config files directory |
SERVER_CONFIG_WATCH_POLLING | boolean | false | Use polling for file watching |
general.yaml which supports hot reloading.
Next Steps
UI Customization
Customize the user interface
Configuration Overview
Learn about the config system