UALPN(1)
π ualpn(1) β User Commands, but make it group chat: the lightweight proxying ACMEv2 tls-alpn-01 responder π
π¦ NAME π¦
ualpn β lightweight proxying ACMEv2 tls-alpn-01 responder. Thatβs the whole name, bestie π
β¨ SYNOPSIS β¨
Hereβs the whole invocation vibe, flags, brackets, and all:
ualpn [-4|--ipv4] [-6|--ipv6] [-b|--bind address[@port]] [-c|--connect address[@port]] [-d|--daemon] [-l|--logfile file] [-m|--max-auths N] [-n|--num-workers N] [-p|--pidfile file] [-P|--proxy N] [-r|--chroot dir] [-s|--sock path] [-S|--sock-mode mode] [-t|--terminate] [-u|--user user[:group]] [-v|--verbose ...] [-V|--version] [-?|--help]
πΈ DESCRIPTION πΈ
Okay so ualpn is a lightweight proxying ACMEv2 tls-alpn-01 challenge responder that is compliant with RFC8737 (https://tools.ietf.org/html/RFC8737) and RFC8738 (https://tools.ietf.org/html/RFC8738). Itβs giving certified-but-chill π§
Depending on how it is invoked, ualpn runs in either client mode or server mode. In client mode ualpn connects to a running server mode instance of itself through a unix domain socket, in order to add or remove ACMEv2 authorizations. See CLIENT MODE below.
In server mode ualpn listens for incoming connections (by default on port 443, which is mandatory for tls-alpn-01 challenges). It then handles any such connection in one of two different ways:
- if the connection begins with a
"ClientHello"TLS handshake packet including a"acme-tls/1"RFC7301 Application Level Protocol Negotiation extension and a RFC6066 Server Name Indication extension matching an identifier for which it has an authorization,ualpnperforms the tls-alpn-01 handshake and closes the connection; - otherwise
ualpntransparently proxies the connection to one of the backend servers it is configured with. By defaultualpnadds PROXY v1 headers (http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) in order to safely transport connection information such as the clientβs address to the backend. The PROXY protocol is currently supported byapache,nginxand several other server programs.
The event-driven implementation is based on libev (http://libev.schmorp.de) and considerably reduces the cost of context switches and memory usage. In addition on systems such as Linux supporting the splice() system call, ualpn is able to move network data without copying it to/from kernel/user address space. Iconic. π
π OPTIONS π
This is the part where every single flag gets its moment. No skipping, no cap:
-4,--ipv4β Only listen to IPv4 connections.-6,--ipv6β Only listen to IPv6 connections.-b,--bind address[@port]β Enable server mode and listen to address. The address must be specified in numeric format using the standard IPv4 or IPv6 notation. Optionally, a port number can be given (default is443). This flag can be specified multiple times to listen to multiple IP addresses. If this flag is not specified and server mode was enabled by some other option,ualpnlistens to the wildcard interface; otherwise it runs in client mode (see CLIENT MODE below).-c,--connect address[@port]β Enable server mode and add a new backend. The backend address must be specified in numeric format using the standard IPv4 or IPv6 notation. Optionally, a port number can be given (default is443). This flag can be specified multiple times to add multiple backends. This flag must be specified at least once in server mode.-d,--daemonβ Enable server mode and fork in the background.-l,--logfile fileβ Log to file. By defaultualpnlogs to syslog if-d,--daemonwas specified orstderrotherwise. See also-v,--verbose.-m,--max-auths Nβ Enable server mode and allow managing ACMEv2 tls-alpn-01 challenges for up toNdifferent identifiers (default100).-n,--num-workers Nβ Enable server mode and spawnNworker processes (default2) to handle connections. Note that worker processes are single threaded but thanks to the event based implementation each can handle several (potentially thousands) connections concurrently.-p,--pidfile fileβ Specify pidfile location (default/var/run/ualpn.pid).-P,--proxy Nβ Enable server mode and disable (0) or specify (1,2) the PROXY header version (default1). The backend server needs to be configured accordingly:-r,--chroot dirβ Enable server mode and specify a directory to chroot to. If logging to syslog it is necessary to ensure that asyslogd(8)socket is available at/dev/login the chroot directory, otherwiseualpnwill not produce any log output.-s,--sock pathβ Specify unix socket path (default/var/run/ualpn.sock).-S,--sock-mode modeβ Enable server mode and specify socket access permissions (default644).-t,--terminateβ Try to terminate a runningualpnserver. This is achieved by looking up the process id stored by the server in the pidfile (see-p,--pidfile) and signalling it to terminate.-u,--user user[:group]β Enable server mode and drop user (and optionally group) privileges to those of user after binding the sockets. Also affects the ownership of the unix socket, pidfile and logfile (if any).-v,--verboseβ By defaultualpnonly produces logs upon errors or warnings. When this option is specifiedualpnalso logs notice messages. This option can be specified more than once to increase verbosity and include information (twice) or debug (three times) messages.-V,--versionβ Print program version onstderrand exit.-?,--helpβ Print a brief usage text onstderrand exit.
π CLIENT MODE π
In client mode ualpn pipes stdin/stdout to/from the unix socket of the running server instance of itself. The protocol is ASCII text based, case sensitive, line oriented, with two commands:
auth identifier authorizationβ Theauthcommand instructs the runningualpnserver to handle ACMEv2 tls-alpn-01 challenges for identifier, which can be a string representing either a domain (typednsaccording to RFC8555 section 9.7.8) or an IP address (typeipaccording to RFC8738 section 6). authorization must contain the base64url encoding of the SHA-256 digest of the key authorization computed according to RFC8737 section 3 (note theuacmesoftware executes hook scripts with the correct authorization passed as the 5th argument). Upon successful invocation of theauthcommandualpngenerates a self signed certificate as required by the tls-alpn-01 challenge, and then uses it to perform tls-alpn-01 handshakes for the given identifier.unauth identifierβ Theunauthcommand instructs the runningualpnserver to no longer handle ACMEv2 tls-alpn-01 challenges for identifier.
ualpn responds to both commands with a line beginning with either OK or ERR, followed by a space and additional error information.
π EXAMPLES π
Three lilβ real-world invocations, coming right up π«
Example 1 β daemon mode with proxy and user drop
ualpn -vv -d -u nobody:nogroup -c 127.0.0.1@4443 -S 666
Start ualpn as a daemon, binding to the default port 443 on the wildcard interface. Proxy connections to port 4443 on 127.0.0.1. After opening the sockets, drop the user privileges and run as nobody:nogroup. Allow anyone on the local host to access the unix socket. Also increase the verbosity to include notice and information messages.
Example 2 β authorize a domain
echo "auth www.example.com DEi0apzMOdMT2DAro57oIvn-wEzPiYcAYDh2Cvjra3I" | ualpn
Instruct the running ualpn server to handle ACMEv2 tls-alpn-01 challenges for www.example.com with the given key authorization.
Example 3 β un-authorize a domain
echo "unauth www.example.com" | ualpn
Instruct the running ualpn server to no longer handle ACMEv2 tls-alpn-01 challenges for www.example.com.
β EXIT STATUS β
0β Success.1β Failure (syntax or usage error; configuration error; processing failure; unexpected error).
π EXAMPLE UACME HOOK SCRIPT π
The ualpn.sh hook script included in the distribution can be used to automate the certificate issuance with uacme, provided ualpn is listening on port 443 of the webserver for the domain being validated:
#!/bin/sh
ARGS=5
E_BADARGS=85
if test $# -ne "$ARGS"
then
echo "Usage: $(basename "$0") method type ident token auth" 1>&2
exit $E_BADARGS
fi
METHOD=$1
TYPE=$2
IDENT=$3
TOKEN=$4
AUTH=$5
if [ "$TYPE" != "tls-alpn-01" ]; then
exit 1
fi
case "$METHOD" in
"begin")
UALPN_OUT=$(echo "auth $IDENT $AUTH" | ualpn)
if [ "x$UALPN_OUT" = "xOK" ]; then
exit 0
else
exit 1
fi
;;
"done"|"failed")
UALPN_OUT=$(echo "unauth $IDENT" | ualpn)
if [ "x$UALPN_OUT" = "xOK" ]; then
exit 0
else
exit 1
fi
;;
*)
echo "$0: invalid method" 1>&2
exit 1
esac
π BUGS π
If you believe you have found a bug, please create a new issue at https://github.com/ndilieto/uacme/issues with any applicable information. No gatekeeping, bestie π«Ά
π SEE ALSO π
π AUTHOR π
ualpn was written by Nicola Di Lieto. Iconic.
π COPYRIGHT π
Copyright Β© 2019-2026 Nicola Di Lieto <nicola.dilieto@gmail.com>
This file is part of uacme.
uacme is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
uacme is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
π Thatβs the whole page, bestie β source/version ualpn 1.8.1, date 04/07/2026. Go slay those ACME challenges! πβ¨
π¦ where this page comes from
- alpine 3.24: uacme-doc 1.8.1-r0 Β· GPL-3.0-or-later AND ISC AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms