YANKD(8) System Manager's Manual YANKD(8)

yankdYank Pastebin Daemon

yankd [-dhnVv] [-f file]

yankd is a pastebin server that listens on the configured interfaces for connections sending paste requests. The contents are written to a file called a slug in the configured pastebin directory, and a unique URL is returned to the client.

A webserver such as httpd(8) should be configured to serve http requests to the pastebin directory. A sample httpd.conf(5) configuration is provided below.

If yankd is run without a configuration file, a default server will be instantiated. See yankd.conf(5) for default server details and the configuration file format.

The options for yankd are as follows:

Do not daemonize. Send log output to stderr.
file
Set the configuration file path. If not specified, yankd will use the default configuration file path /etc/yankd.conf.
Print yankd usage and exit.
Config test mode. Parse the configuration file for validity, report any errors, and exit without starting the daemon.
Print yankd version and exit.
Produce verbose output. Verbosity increases if this option is used multiple times.

/etc/yankd.conf
Default location of the yankd.conf(5) configuration file.
/var/www/yankd
Default chroot(2) environment of the pastebins served by yankd.

Example configuration for httpd.conf(5) serving the default yankd pastebin:

server "yankd.example.com" {
	listen on * port 80
	location "/*" {
		root "/yankd"
		directory index index.txt
	}
}

Host pastebins from two yankd servers on the same httpd(8) instance from different directories within the chroot(2) environment. The first in /var/www/yankd/y1 and the second in /var/www/yankd/y2. This corresponds to the multiple server example shown in yankd.conf(5):

server "y1.example.com" {
	listen on * port 80
	location "/*" {
		root "/yankd/y1"
		directory index index.txt
	}
}

server "y2.example.com" {
	listen on * port 80
	location "/*" {
		root "/yankd/y2"
		directory index index.txt
	}
}

httpd.conf(5), yankd.conf(5), httpd(8)

Mark Jamsek <mark@jamsek.dev>

March 20, 2024 OpenBSD 7.5