Skip to Content
Usage

Usage

The base command starts the server:

qaws [options]

Default behavior:

host: 0.0.0.0 port: 80 serve: ./public

Use a high port for local development:

qaws --host 127.0.0.1 --port 8080 --serve ./public

Commands

CommandPurpose
qawsStart the server.
qaws helpPrint usage.
qaws versionPrint the current version.
qaws check --config qaws.jsonValidate config and serve directory without starting.
qaws statusCheck a daemon by PID file or derived identity.
qaws stopStop a daemon with SIGTERM.
qaws stop --forceEscalate to SIGKILL after timeout.
qaws restartStop and start a daemon using the same identity.

Flags

FlagDefaultPurpose
--host <addr>0.0.0.0Address to bind.
--port <port>80Port to bind.
--serve <directory>./publicDirectory to serve.
--config <path>noneLoad strict JSON config.
-dforegroundStart as a daemon on supported Unix targets.
--pid-file <path>derivedDaemon PID file.
--log-format plainplainHuman-readable logs.
--log-format jsonlplainJSON-lines logs.
--log-file <path>stderr or derivedWrite logs to a file.
--access-logenabledEnable access logs.
--no-access-logenabledDisable access logs.
--keep-aliveenabledEnable HTTP keep-alive.
--no-keep-aliveenabledDisable HTTP keep-alive.
--sendfileenabledEnable platform sendfile.
--no-sendfileenabledDisable platform sendfile.
--keep-alive-timeout-ms <n>5000Idle keep-alive timeout.
--max-requests-per-connection <n>1000Per-connection request cap.
--max-connections <n>1024Active plus queued connection cap.
--workers <n>topology-selectedExplicit event or fallback-worker count.

Boolean flag pairs exist so CLI flags can override config in both directions. For example, a config file can enable access logs while one command run uses --no-access-log.

Config precedence

qaws loads defaults first, then applies config, then applies CLI flags.

qaws --config qaws.json --port 18086 --no-access-log

In this example, --port and --no-access-log override the JSON file.

Daemon mode

Start a daemon:

qaws -d --host 127.0.0.1 --port 18086 --serve ./public

Check it:

qaws status --host 127.0.0.1 --port 18086

Stop it:

qaws stop --host 127.0.0.1 --port 18086

Restart it:

qaws restart --host 127.0.0.1 --port 18086 --serve ./public

Use explicit files when you want stable process identity:

qaws -d --pid-file /tmp/qaws.pid --log-file /tmp/qaws.log --port 18086 qaws status --pid-file /tmp/qaws.pid qaws stop --pid-file /tmp/qaws.pid --force

If no PID or log file is configured, qaws derives paths from the bind host and port under $XDG_RUNTIME_DIR/qaws, then $PREFIX/var/run/qaws on Termux, then /tmp/qaws-$UID.

Daemon control is Unix/Termux-first. Windows foreground serving works, but daemon commands report unsupported.

qaws docs. Built for static hosting.