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) |
--speed-schedule |
- | Throttle window HH:MM-HH:MM:SPEED (e.g. 09:00-17:00:512KB) |
--rpc-listen-all |
false |
Bind the JSON-RPC endpoint to all interfaces instead of localhost only |
Throttle example (full speed overnight, 512 KB/s during work hours):
# Via flagwarpdl daemon --speed-schedule 09:00-17:00:512KB
# Via environment variable (used when the flag is not set)export WARPDL_SPEED_SCHEDULE=09:00-17:00:512KBwarpdl daemonExamples:
# Start with max 5 concurrent downloadswarpdl daemon --max-concurrent 5JSON-RPC Endpoint
Section titled “JSON-RPC Endpoint”The daemon always serves its JSON-RPC API on /jsonrpc (HTTP) and /jsonrpc/ws (WebSocket). It binds to 127.0.0.1 by default and is unauthenticated — there is no token or secret to configure. Only bind it to all interfaces when something else provides the access control (reverse proxy, SSH tunnel, firewall):
warpdl daemon --rpc-listen-allEnvironment variables are also supported:
export WARPDL_MAX_CONCURRENT=5export WARPDL_RPC_LISTEN_ALL=1warpdl 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.
