DAPHNE(1)

πŸ‘‘ DAPHNE(1) πŸ‘‘

the Django HTTP/WebSocket server, and yes bestie it's giving general commands manual energy

okay so you opened daphne(1) and you're probably like "what is this, why is it here, why does it have a manual page" β€” let me hold your hand through it, it's actually not that deep πŸ’–


✨ NAME ✨

daphne β€” Django HTTP/WebSocket server πŸ¦‹

no cap, that's the whole name section. one line. iconic minimalism.


✨ SYNOPSIS ✨

daphne [-h]  [-p PORT]  [-b HOST]  [--websocket_timeout
WEBSOCKET_TIME_OUT]  [--websocket_connect_timeout
WEBSOCKET_CONNECT_TIMEOUT]  [-u UNIX_SOCKET]  [--fd FILE_DESCRIPTOR]
[-e SOCKET_STRINGS]  [-v VERBOSITY]  [-t HTTP_TIMEOUT]  [--access-log
ACCESS_LOG]  [--ping-interval PING_INTERVAL]  [--ping-timeout
PING_TIMEOUT]  [--application-close-timeout SECONDS>]  [--ws-protocol
WS_PROTOCOLS [WS_PROTOCOLS ...]]  [--root-path ROOT_PATH]  [--proxy-
headers]  [channel_layer]

that's the whole shape of it. everything in brackets is optional, everything else is the vibe you're committing to πŸ’…


✨ DESCRIPTION ✨

okay so this manual page documents briefly the daphne command. brief. like a text from someone who's already halfway out the door πŸƒβ™€οΈ

this manual page was written for the Debian distribution because the original program does not have a manual page. so we made one. you're welcome, honestly πŸŽ€

and here's the line, delivered completely straight with zero irony:

daphne is a program that manages the Celery Worker Daemons and their queues.

that is what the page says, bestie. I am not going to edit it, I am not going to fix it, I am simply passing it to you exactly as it was handed to me, like a note someone slipped under the door. πŸ™ˆ


✨ OPTIONS ✨

this program follows the usual GNU command line syntax, with long options starting with two dashes (-). a summary of options is included below. buckle up, there's a bunch, and every single one matters πŸ’œ

  • -h, --help β€” Show help message and exit. the classic. the "wait what does this do again" button 🫢
  • -p PORT, --port PORT β€” Port number to listen on. pick a number, any number, preferably one nobody else is using ✨
  • -b HOST, --bind HOST β€” The host/address to bind to. where you're parking this whole operation 🌸
  • --websocket_timeout WEBSOCKET_TIMEOUT β€” Maximum time to allow a websocket to be connected. -1 for infinite. yes literally -1, forever, no cap πŸ’€
  • --websocket_connect_timeout WEBSOCKET_CONNECT_TIMEOUT β€” Maximum time to allow a connection to handshake. -1 for infinite. same deal, the handshake gets forever if you say -1 🀝
  • -u UNIX_SOCKET, --unix-socket UNIX_SOCKET β€” Bind to a UNIX socket rather than a TCP host/port. skipping the whole port thing entirely, lowkey elegant 🌈
  • --fd FILE_DESCRIPTOR β€” Bind to a file descriptor rather than a TCP host/port or named unix socket. third option energy, we love a flexible queen πŸ‘‘
  • -e SOCKET_STRINGS, --endpoint SOCKET_STRINGS β€” Use raw server strings passed directly to twisted. raw strings. straight through. no filtering, no chaser 😭
  • -v VERBOSITY, --verbosity VERBOSITY β€” How verbose to make the output. how much it talks. set it low for mystery, high for commentary πŸ—£οΈ
  • -t HTTP_TIMEOUT, --http-timeout HTTP_TIMEOUT β€” How long to wait for worker server before timing out HTTP connections. patience level: configurable ⏳
  • --access-log ACCESS_LOG β€” Where to write the access log (- for stdout, the default for verbosity=1). so - means stdout, and that's also what you get by default when verbosity is 1 πŸ“
  • --ping-interval PING_INTERVAL β€” The number of seconds a WebSocket must be idle before a keepalive ping is sent. the "you still there?" text message, on a timer πŸ“²
  • --ping-timeout PING_TIMEOUT β€” The number of seconds before a WebSocket is closed if no response to a keepalive ping. and if they don't answer the "you still there?" β€” goodbye πŸ’”
  • --application-close-timeout SECONDS β€” The number of seconds an ASGI application has to exit after client disconnect before it is killed (Default: 10). ten seconds of grace, then it's over, periodt ⏱️
  • --ws-protocol WS_PROTOCOLS [WS_PROTOCOLS] β€” The WebSocket protocols you wish to support. list as many as you want, it takes a whole lil crew 🧚
  • --root-path ROOT_PATH β€” The setting for the ASGI root_path variable. feeding the root path straight in πŸ“
  • --proxy-headers β€” Enable parsing and using of X-Forwarded-For and X-Forwarded-Port headers and using that as the client address. behind a proxy? turn this on so the client address is the actual client and not your proxy's whole identity crisis πŸ™ˆ

✨ ARGUMENTS ✨

  • channel_layer β€” The ASGI channel layer instance to use as path.to.module:instance.path. yes that exact format, dots and a colon, don't freestyle it bestie πŸ’–

✨ AUTHOR ✨

this manual page was written by fladi fladi@debian.org for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. πŸŽ€

on Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. go read it, it's right there, it's free, it's legally binding, slay ⭐


okay that's the whole page!! that was daphne(1) from the General Commands Manual, and yes, the footer really does just say DAPHNE(1) again like a little signature at the bottom of the note πŸ’Œ go forth and serve some websockets, you've got this, mwah πŸŒΈπŸ¦‹