archivebox.cli.archivebox_server

Module Contents

Functions

_is_ipv4_literal

_is_ipv6_literal

_bind_host_looks_like_ip

_split_bind_spec

Split a host:port / host / port spec into (host, port).

_parse_and_validate_bind_spec

Resolve a CLI/config bind spec to (host, port) or hard-error.

_print_server_startup_warnings

Print startup-time security / routing warnings for the server command.

server

Run the ArchiveBox HTTP server

main

Data

_IPV4_RE

_IPV6_CHARS_RE

_LOCAL_BIND_HOSTS

API

archivebox.cli.archivebox_server._IPV4_RE[source]

‘compile(…)’

archivebox.cli.archivebox_server._IPV6_CHARS_RE[source]

‘compile(…)’

archivebox.cli.archivebox_server._LOCAL_BIND_HOSTS[source]

‘frozenset(…)’

archivebox.cli.archivebox_server._is_ipv4_literal(host: str) bool[source]
archivebox.cli.archivebox_server._is_ipv6_literal(host: str) bool[source]
archivebox.cli.archivebox_server._bind_host_looks_like_ip(host: str) bool[source]
archivebox.cli.archivebox_server._split_bind_spec(spec: str) tuple[str, str][source]

Split a host:port / host / port spec into (host, port).

The empty strings stand in for “not provided”; the caller fills in defaults. Bracketed IPv6 literals like [::1]:8000 are handled.

archivebox.cli.archivebox_server._parse_and_validate_bind_spec(spec: str) tuple[str, str][source]

Resolve a CLI/config bind spec to (host, port) or hard-error.

Accepts only IP literals (v4 or v6) or the special string localhost (normalized to 127.0.0.1). Bare hostnames are rejected because the bind address feeds Daphne, which has to listen on a numeric address; public hostnames belong in BASE_URL instead. Empty values fall back to 127.0.0.1 / 8000.

archivebox.cli.archivebox_server._print_server_startup_warnings(config, host: str, port: str) None[source]

Print startup-time security / routing warnings for the server command.

Runs only from archivebox server so other entry points (manage shell, plugin lookups, etc.) don’t repeat this banner on every config load.

archivebox.cli.archivebox_server.server(runserver_args: collections.abc.Iterable[str] | None = None, reload: bool = False, debug: bool = False, daemonize: bool = False, nothreading: bool = False) None[source]

Run the ArchiveBox HTTP server

archivebox.cli.archivebox_server.main(**kwargs)[source]