Daemon
WarpDL uses a daemon architecture where a background process manages all downloads.
How It Works
Section titled “How It Works”CLI Command → Unix Socket/Named Pipe → Daemon → Download EngineThe daemon:
- Runs in the background
- Manages multiple concurrent downloads
- Persists state across CLI sessions
- Handles retry and resume logic
Starting the Daemon
Section titled “Starting the Daemon”The daemon starts automatically when you run any download command. To start it manually:
warpdl daemonDaemon Options
Section titled “Daemon Options”| Flag | Default | Description |
|---|---|---|
--max-concurrent | 3 | Maximum number of concurrent downloads (0 = unlimited) |
--rpc-secret | - | Secret token for JSON-RPC API authentication (required to enable RPC) |
--rpc-listen-all | false | Bind RPC to all interfaces instead of localhost only |
Examples:
# Start with max 5 concurrent downloadswarpdl daemon --max-concurrent 5
# Enable JSON-RPC API with authenticationwarpdl daemon --rpc-secret my-secret-token
# Enable RPC and bind to all interfaces (use with caution)warpdl daemon --rpc-secret my-secret-token --rpc-listen-allEnvironment variables are also supported:
export WARPDL_MAX_CONCURRENT=5export WARPDL_RPC_SECRET=my-secret-tokenwarpdl daemonDownload Queue Management
Section titled “Download Queue Management”The daemon maintains a download queue that manages active and waiting downloads. Use the queue command to manage queue state.
View Queue Status
Section titled “View Queue Status”warpdl queue# orwarpdl queue statusThis displays:
- Queue state (running/paused)
- Maximum concurrent download limit
- Active download count and waiting count
- List of active downloads (with hashes)
- Waiting queue with positions and priorities
Pause the Queue
Section titled “Pause the Queue”Prevent new downloads from starting automatically:
warpdl queue pauseActive downloads continue, but no new downloads will start from the waiting queue.
Resume the Queue
Section titled “Resume the Queue”Allow downloads to start automatically again:
warpdl queue resumeMove a Queued Download
Section titled “Move a Queued Download”Reposition a download in the waiting queue:
warpdl queue move <hash> <position><hash>- The download hash (shown in queue status)<position>- New position in queue (1-based index)
Example:
# Move download with hash "abc123" to position 1 (front of queue)warpdl queue move abc123 1Stopping the Daemon
Section titled “Stopping the Daemon”warpdl stop-daemonCommunication
Section titled “Communication”| Platform | Default IPC |
|---|---|
| Linux/macOS | Unix socket at $TMPDIR/warpdl.sock (defaults to /tmp/warpdl.sock) |
| Windows | Named pipe \\.\pipe\warpdl |
Custom Daemon URI
Section titled “Custom Daemon URI”Use the --daemon-uri flag to connect to a specific daemon:
warpdl download --daemon-uri unix:///custom/path.sock https://example.com/file.zipwarpdl download --daemon-uri tcp://192.168.1.100:3849 https://example.com/file.zipwarpdl download --daemon-uri pipe://custom-pipe https://example.com/file.zip # WindowsOr set via environment variable:
export WARPDL_DAEMON_URI=tcp://192.168.1.100:3849Legacy Configuration
Section titled “Legacy Configuration”To customize the socket path:
export WARPDL_SOCKET_PATH=/custom/path.sockTo force TCP connection:
export WARPDL_FORCE_TCP=1export WARPDL_TCP_PORT=3849Daemon as a Service
Section titled “Daemon as a Service”See Service Setup for running the daemon as a system service.