Server Configuration Reference
Ice Server supports both command line arguments and environment variables for configuration. Environment variables take precedence.
Configuration Options
| Argument | Environment Variable | Type | Default | Description |
|---|---|---|---|---|
--port | ICE_PORT | int | 8121 | Server port |
--storage-path | ICE_STORAGE_PATH | string | ./ice-data | File storage path |
--client-timeout | ICE_CLIENT_TIMEOUT | int | 60 | Client inactivity timeout (seconds). Clients that haven't reported a heartbeat within this time are marked offline |
--version-retention | ICE_VERSION_RETENTION | int | 1000 | Number of version files to retain. Excess versions are cleaned up during recycling |
--recycle-cron | ICE_RECYCLE_CRON | string | 0 3 * * * | Cron expression for the recycling scheduled task |
--recycle-way | ICE_RECYCLE_WAY | string | hard | Recycling method. soft: mark as deleted; hard: physically delete |
--recycle-protect-days | ICE_RECYCLE_PROTECT_DAYS | int | 1 | Recycling protection days. Versions within the protection period will not be recycled |
Configuration Examples
Command Line Arguments
./ice-server --port 8121 --storage-path ./ice-data --version-retention 500Environment Variables (Recommended for Docker)
docker run -d --name ice-server \
-p 8121:8121 \
-e ICE_PORT=8121 \
-e ICE_STORAGE_PATH=/app/ice-data \
-e ICE_VERSION_RETENTION=500 \
-v ./ice-data:/app/ice-data \
waitmoon/ice-server:latestDocker Compose
version: '3.8'
services:
ice-server:
image: waitmoon/ice-server:latest
ports:
- "8121:8121"
environment:
ICE_STORAGE_PATH: /app/ice-data
ICE_VERSION_RETENTION: 500
ICE_RECYCLE_CRON: "0 3 * * *"
volumes:
- ./ice-data:/app/ice-dataDebug Log Levels
The debug field in the Pack is a bitmask. Combine values by adding them to control log output:
| Value | Name | Description |
|---|---|---|
| 1 | IN_PACK | Print Pack contents before execution |
| 2 | PROCESS | Print execution process (requires the node's debug flag to be enabled) |
| 4 | OUT_ROAM | Print Roam contents after execution |
| 8 | OUT_PACK | Print Pack contents after execution |
For example, debug = 3 prints both IN_PACK (1) and PROCESS (2).