.TH "axil" 1 "axil" \" -*- nroff -*- .ad l .nh .SH NAME axil \- axil(1) .PP axil command-line tool — HTTP(S) + WebSocket(S) server daemon\&. .SS "Overview" \fRaxil\fP runs the axil server: an HTTP/WebSocket daemon with ordered Xylem module loading, TLS certificate mappings, authentication and PTY/environment handling\&. It daemonizes into the background by default; pass \fR-d\fP to stay in the foreground\&. \fRaxil -?\fP prints the option synopsis\&. .SS "Usage" .PP .nf axil [\-Adr?] [\-C PATH] [\-k CERT] [\-K PATH] [\-p PORT] [\-s PORT] [\-B BYTES] [\-m MODS] .fi .PP .SS "Options" .IP "\(bu" 2 \fR-p PORT\fP HTTP listen port (\fRaxil_config\&.port\fP)\&. .IP "\(bu" 2 \fR-s PORT\fP HTTPS listen port (POSIX; \fRaxil_config\&.ssl_port\fP, used when TLS is active)\&. .IP "\(bu" 2 \fR-C PATH\fP change (chdir) to PATH before starting up (\fRaxil_config\&.chroot\fP)\&. As root it is a real chroot(2) plus \fRchdir("/")\fP; otherwise a plain chdir\&. Startup order is: \fR-m\fP modules load (host paths) → platform init_pre_bind() does the chroot/chdir → \fRaxil_post_chroot()\fP fires → bind → serve\&. Modules loading files after \fR-C\fP resolve them inside the jail\&. .IP "\(bu" 2 \fR-K PATH\fP load SSL certificate mappings from file (POSIX); one \fRdomain:cert:key\fP entry per line\&. .IP "\(bu" 2 \fR-k CERT\fP add a single SSL certificate mapping \fRdomain:cert:key\fP\&. .IP "\(bu" 2 \fR-B BYTES\fP maximum POST body size in bytes (default: 10485760)\&. .IP "\(bu" 2 \fR-m MODS\fP colon-separated list of module paths to load (see \fBModules\fP below)\&. .IP "\(bu" 2 \fR-A\fP auto-authenticate all WebSocket connections (development/testing; authenticates as the current user)\&. .IP "\(bu" 2 \fR-d\fP don't detach (run in the foreground)\&. .IP "\(bu" 2 \fR-r\fP root multiplex mode (\fRaxil_config\&.flags |= AXIL_ROOT\fP)\&. .IP "\(bu" 2 \fR-?\fP display this message\&. .PP .SS "Modules" \fR-m MODS\fP loads dynamic modules through the libxylem module system (\fRxy_load\fP)\&. Each module may register HTTP/WS handlers, commands and \fRon_axil_*\fP hooks (see )\&. Multiple modules are colon-separated in a single \fR-m\fP value: .PP .PP .nf axil \-d \-p 8888 \-m /path/to/libaxil\-tty\&.so:/path/to/libaxil\-cgi\&.so .fi .PP .PP Repeated \fR-m\fP flags are \fBnot\fP additive — only the last value is used\&. Sibling modules: \fRlibaxil-tty\fP (browser terminal / WebSocket PTY support, provides \fRaxil_pty()\fP) and \fRlibaxil-cgi\fP (CGI fallback for executable \fR\&./index\&.sh\fP)\&. .SS "TLS" \fR-k CERT\fP and \fR-K PATH\fP accept \fRdomain:cert:key\fP certificate mappings; \fR-s PORT\fP sets the HTTPS port\&. A certificates file loaded with \fR-K\fP holds one mapping per line: .PP .PP .nf example\&.com:cert\&.pem:key\&.pem .fi .PP .SS "Authentication" WebSocket connections authenticate by default: \fRaxil_auth_check\fP resolves the \fRQSESSION=\fP cookie to a user\&. \fR-A\fP bypasses this for development/testing, authenticating every connection as the current user\&. .SS "Examples" .PP .nf axil \-d \-p 8888 # foreground HTTP server axil \-p 80 # daemonized HTTP server sudo axil \-C /var/www \-K certs\&.txt \-d # HTTPS from cert file axil \-d \-p 8080 \-k example\&.com:cert\&.pem:key\&.pem # single TLS mapping axil \-A \-d \-p 4242 \-m libaxil\-auren # auto\-auth WS + module .fi .PP .SS "Notes" .IP "\(bu" 2 POSIX vs Windows: TLS, privilege handling, process execution and fd watching are POSIX-only; Windows builds handle HTTP/WS only\&. .IP "\(bu" 2 Responses are served with cross-origin isolation headers (COOP/COEP/CORP); static \fR\&.wasm\fP files are served as \fRapplication/wasm\fP\&. .IP "\(bu" 2 The binary defaults to daemon mode (\fRAXIL_DETACH\fP); \fR-d\fP keeps it in the foreground (useful under a supervisor such as \fRstart\&.sh\fP)\&. .PP .PP \fBSee also\fP .RS 4 axil_main .PP axil_auth .PP axil_ws_handler .PP axil_config .PP axil_register .RE .PP