OSCam supports various command-line parameters to configure its behavior at startup.
OSCam offers extensive command-line configuration options to customize its behavior at startup. These parameters allow you to control directories, logging, debugging, and runtime behavior without modifying configuration files.
| `-t, --temp-dir <dir>` | Set temporary directory to `<dir>`.<br>Default: `/tmp/.oscam` (Linux/macOS) or OS-TMP (Cygwin) |
## Startup
The most commonly used options for typical setups:
| Option | Description |
```bash
|--------|-------------|
# Start as background daemon with custom config
| `-b, --daemon` | Start in the background as daemon.<br>(On STAPI/STAPI5 systems, use `-f` instead) |
oscam -b-c /etc/oscam
| `-f, --foreground` | Start in the foreground mode.<br>(Only available on STAPI/STAPI5 systems) |
| `-B, --pidfile <pidfile>` | Create pidfile when starting. |
| `-r, --restart <level>` | Set restart level (requires WebIf):<br>• `0` - Restart disabled (exit on restart request)<br>• `1` - WebIf restart is active (default)<br>• `2` - Like 1, but also restart on segfaults |
| `-w, --wait <secs>` | Set how many seconds to wait at startup for the system clock to be set correctly.<br>Default: `60` |
These options are intended for development and troubleshooting:
## Process Management
| Option | Description |
Control how OSCam runs as a system process.
|--------|-------------|
| `-a, --crash-dump` | Write `oscam.crash` file on segfault. This option requires GDB to be installed and OSCam executable to contain debug information (run `oscam-XXXX.debug`). |