Skip to main content
The run command is the primary command for starting paqet in either client or server mode based on your configuration file.

Syntax

paqet run [flags]

Description

The run command reads a YAML configuration file and starts paqet as either a client or server depending on the role specified in the config. It initializes the logging system, buffer pools, and starts the appropriate transport layer.

Flags

FlagShortDefaultDescription
--config-cconfig.yamlPath to the configuration file

Usage Examples

Start with default config

sudo paqet run

Start with custom config file

sudo paqet run -c /etc/paqet/server.yaml

Start client

sudo paqet run -c client-config.yaml

Start server

sudo paqet run -c server-config.yaml
Root privileges required: The run command requires sudo/root access because paqet uses raw sockets for packet manipulation. Raw sockets require elevated privileges on most operating systems.
The configuration file determines whether paqet runs as a client or server based on the role field. See Configuration for details on setting up your config file.

What Happens When You Run

  1. Configuration Loading: The specified YAML file is loaded and validated
  2. Initialization: Log level and buffer pools are configured based on settings
  3. Role Detection: paqet checks the role field in the config
  4. Startup: Launches either client or server mode with the specified parameters
If the configuration file is invalid or the role is not specified correctly, paqet will exit with an error message.

Build docs developers (and LLMs) love