Skip to content

Daemon

WarpDL uses a daemon architecture where a background process manages all downloads.

CLI Command → Unix Socket/Named Pipe → Daemon → Download Engine

The daemon:

  • Runs in the background
  • Manages multiple concurrent downloads
  • Persists state across CLI sessions
  • Handles retry and resume logic

The daemon starts automatically when you run any download command. To start it manually:

Terminal window
warpdl daemon
FlagDefaultDescription
--max-concurrent3Maximum number of concurrent downloads (0 = unlimited)
--rpc-secret-Secret token for JSON-RPC API authentication (required to enable RPC)
--rpc-listen-allfalseBind RPC to all interfaces instead of localhost only

Examples:

Terminal window
# Start with max 5 concurrent downloads
warpdl daemon --max-concurrent 5
# Enable JSON-RPC API with authentication
warpdl 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-all

Environment variables are also supported:

Terminal window
export WARPDL_MAX_CONCURRENT=5
export WARPDL_RPC_SECRET=my-secret-token
warpdl daemon

The daemon maintains a download queue that manages active and waiting downloads. Use the queue command to manage queue state.

Terminal window
warpdl queue
# or
warpdl queue status

This 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

Prevent new downloads from starting automatically:

Terminal window
warpdl queue pause

Active downloads continue, but no new downloads will start from the waiting queue.

Allow downloads to start automatically again:

Terminal window
warpdl queue resume

Reposition a download in the waiting queue:

Terminal window
warpdl queue move <hash> <position>
  • <hash> - The download hash (shown in queue status)
  • <position> - New position in queue (1-based index)

Example:

Terminal window
# Move download with hash "abc123" to position 1 (front of queue)
warpdl queue move abc123 1
Terminal window
warpdl stop-daemon
PlatformDefault IPC
Linux/macOSUnix socket at $TMPDIR/warpdl.sock (defaults to /tmp/warpdl.sock)
WindowsNamed pipe \\.\pipe\warpdl

Use the --daemon-uri flag to connect to a specific daemon:

Terminal window
warpdl download --daemon-uri unix:///custom/path.sock https://example.com/file.zip
warpdl download --daemon-uri tcp://192.168.1.100:3849 https://example.com/file.zip
warpdl download --daemon-uri pipe://custom-pipe https://example.com/file.zip # Windows

Or set via environment variable:

Terminal window
export WARPDL_DAEMON_URI=tcp://192.168.1.100:3849

To customize the socket path:

Terminal window
export WARPDL_SOCKET_PATH=/custom/path.sock

To force TCP connection:

Terminal window
export WARPDL_FORCE_TCP=1
export WARPDL_TCP_PORT=3849

See Service Setup for running the daemon as a system service.