{
    "mode": "man",
    "parameter": "gpg-wks-server",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/gpg-wks-server/1/json",
    "generated": "2026-09-01T06:33:36Z",
    "synopsis": "gpg-wks-server [options] --receive\ngpg-wks-server [options] --cron\ngpg-wks-server [options] --list-domains\ngpg-wks-server [options] --check-key user-id\ngpg-wks-server [options] --install-key file user-id\ngpg-wks-server [options] --remove-key user-id\ngpg-wks-server [options] --revoke-key user-id",
    "sections": {
        "NAME": {
            "content": "gpg-wks-server - Server providing the Web Key Service\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "gpg-wks-server [options] --receive\ngpg-wks-server [options] --cron\ngpg-wks-server [options] --list-domains\ngpg-wks-server [options] --check-key user-id\ngpg-wks-server [options] --install-key file user-id\ngpg-wks-server [options] --remove-key user-id\ngpg-wks-server [options] --revoke-key user-id\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  gpg-wks-server  is a server side implementation of the Web Key Service.  It receives re‐\nquests for publication, sends confirmation requests, receives  confirmations,  and  published\nthe key.  It also has features to ease the setup and maintenance of a Web Key Directory.\n\nWhen  used  with  the command --receive a single Web Key Service mail is processed.  Commonly\nthis command is used with the option --send to directly send the created mails back.  See be‐\nlow for an installation example.\n\nThe command --cron is used for regular cleanup tasks.  For  example  non-confirmed  requested\nshould  be removed after their expire time.  It is best to run this command once a day from a\ncronjob.\n\nThe command --list-domains prints all configured domains.  Further it creates missing  direc‐\ntories for the configuration and prints warnings pertaining to problems in the configuration.\n\nThe  command --check-key (or just --check) checks whether a key with the given user-id is in‐\nstalled.  The process returns success in this case; to also print a diagnostic use the option",
            "subsections": [
                {
                    "name": "-v",
                    "content": "suppress  the diagnostic, use option -q.  More than one user-id can be given; see also option\nwith-file.\n\nThe command --install-key manually installs a key into the WKD.  The  arguments  are  a  file\nwith  the keyblock and the user-id to install.  If the first argument resembles a fingerprint\nthe key is taken from the current keyring; to force the use of a file, prefix the first argu‐\nment with \"./\".  If no arguments are given the parameters are read from stdin;  the  expected\nformat are lines with the fingerprint and the mailbox separated by a space.\n\nThe  command --remove-key uninstalls a key from the WKD.  The process returns success in this\ncase; to also print a diagnostic, use option -v.  If the key is not installed a diagnostic is\nprinted and the process returns failure; to suppress the diagnostic, use option -q.\n\nThe command --revoke-key is not yet functional.\n\n\n",
                    "flag": "-v"
                }
            ]
        },
        "OPTIONS": {
            "content": "gpg-wks-server understands these options:\n\n\n",
            "subsections": [
                {
                    "name": "-C _",
                    "content": "--directory dir\nUse dir as top level directory for domains.  The default is ‘/var/lib/gnupg/wks’.\n\n\n--from mailaddr\nUse mailaddr as the default sender address.\n\n\n--header name=value\nAdd the mail header \"name: value\" to all outgoing mails.\n\n\n--send Directly send created mails using the sendmail command.  Requires installation of that\ncommand.\n\n",
                    "flag": "-C"
                },
                {
                    "name": "-o _",
                    "content": "--output file\nWrite the created mail also to file. Note that the value - for file would write it  to\nstdout.\n\n",
                    "flag": "-o"
                },
                {
                    "name": "--with-dir",
                    "content": "When  used  with the command --list-domains print for each installed domain the domain\nname and its directory name.\n\n",
                    "long": "--with-dir"
                },
                {
                    "name": "--with-file",
                    "content": "When used with the command --check-key print for each user-id, the  address,  'i'  for\ninstalled key or 'n' for not installed key, and the filename.\n\n",
                    "long": "--with-file"
                },
                {
                    "name": "--verbose",
                    "content": "Enable extra informational output.\n\n",
                    "long": "--verbose"
                },
                {
                    "name": "--quiet",
                    "content": "Disable almost all informational output.\n\n",
                    "long": "--quiet"
                },
                {
                    "name": "--version",
                    "content": "Print version of the program and exit.\n\n\n--help Display a brief help page and exit.\n\n",
                    "long": "--version"
                }
            ]
        },
        "EXAMPLES": {
            "content": "The  Web  Key Service requires a working directory to store keys pending for publication.  As\nroot create a working directory:\n\n# mkdir /var/lib/gnupg/wks\n# chown webkey:webkey /var/lib/gnupg/wks\n# chmod 2750 /var/lib/gnupg/wks\n\nThen under your webkey account create directories for all your domains.  Here we  do  it  for\n\"example.net\":\n\n$ mkdir /var/lib/gnupg/wks/example.net\n\nFinally run\n\n$ gpg-wks-server --list-domains\n\nto create the required sub-directories with the permissions set correctly.  For each domain a\nsubmission  address  needs to be configured.  All service mails are directed to that address.\nIt can be the same address for all configured domains, for example:\n\n$ cd /var/lib/gnupg/wks/example.net\n$ echo key-submission@example.net >submission-address\n\nThe protocol requires that the key to be published is sent with an encrypted mail to the ser‐\nvice.  Thus you need to create a key for the submission address:\n\n$ gpg --batch --passphrase '' --quick-gen-key key-submission@example.net\n$ gpg -K key-submission@example.net\n\nThe output of the last command looks similar to this:\n\nsec   rsa3072 2016-08-30 [SC]\nC0FCF8642D830C53246211400346653590B3795B\nuid           [ultimate] key-submission@example.net\nbxzcxpxk8h87z1k7bzk86xn5aj47intu@example.net\nssb   rsa3072 2016-08-30 [E]\n\nTake the fingerprint from that output and manually publish the key:\n\n$ gpg-wks-server --install-key C0FCF8642D830C53246211400346653590B3795B \\\n>                key-submission@example.net\n\nFinally that submission address needs to be redirected to a  script  running  gpg-wks-server.\nThe  procmail  command can be used for this: Redirect the submission address to the user \"we‐\nbkey\" and put this into webkey's ‘.procmailrc’:\n\n:0\n* !^From: webkey@example.net\n* !^X-WKS-Loop: webkey.example.net\n|gpg-wks-server -v --receive \\\n--header X-WKS-Loop=webkey.example.net \\\n--from webkey@example.net --send\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "gpg-wks-client(1)\n\nGnuPG 2.4.4                                  2024-01-25                            GPG-WKS-SERVER(1)",
            "subsections": []
        }
    },
    "summary": "gpg-wks-server - Server providing the Web Key Service",
    "flags": [
        {
            "flag": "-C",
            "long": null,
            "arg": null,
            "description": "--directory dir Use dir as top level directory for domains. The default is ‘/var/lib/gnupg/wks’. --from mailaddr Use mailaddr as the default sender address. --header name=value Add the mail header \"name: value\" to all outgoing mails. --send Directly send created mails using the sendmail command. Requires installation of that command."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": null,
            "description": "--output file Write the created mail also to file. Note that the value - for file would write it to stdout."
        },
        {
            "flag": "",
            "long": "--with-dir",
            "arg": null,
            "description": "When used with the command --list-domains print for each installed domain the domain name and its directory name."
        },
        {
            "flag": "",
            "long": "--with-file",
            "arg": null,
            "description": "When used with the command --check-key print for each user-id, the address, 'i' for installed key or 'n' for not installed key, and the filename."
        },
        {
            "flag": "",
            "long": "--verbose",
            "arg": null,
            "description": "Enable extra informational output."
        },
        {
            "flag": "",
            "long": "--quiet",
            "arg": null,
            "description": "Disable almost all informational output."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print version of the program and exit. --help Display a brief help page and exit."
        }
    ],
    "examples": [
        "The  Web  Key Service requires a working directory to store keys pending for publication.  As",
        "root create a working directory:",
        "# mkdir /var/lib/gnupg/wks",
        "# chown webkey:webkey /var/lib/gnupg/wks",
        "# chmod 2750 /var/lib/gnupg/wks",
        "Then under your webkey account create directories for all your domains.  Here we  do  it  for",
        "\"example.net\":",
        "$ mkdir /var/lib/gnupg/wks/example.net",
        "Finally run",
        "$ gpg-wks-server --list-domains",
        "to create the required sub-directories with the permissions set correctly.  For each domain a",
        "submission  address  needs to be configured.  All service mails are directed to that address.",
        "It can be the same address for all configured domains, for example:",
        "$ cd /var/lib/gnupg/wks/example.net",
        "$ echo key-submission@example.net >submission-address",
        "The protocol requires that the key to be published is sent with an encrypted mail to the ser‐",
        "vice.  Thus you need to create a key for the submission address:",
        "$ gpg --batch --passphrase '' --quick-gen-key key-submission@example.net",
        "$ gpg -K key-submission@example.net",
        "The output of the last command looks similar to this:",
        "sec   rsa3072 2016-08-30 [SC]",
        "C0FCF8642D830C53246211400346653590B3795B",
        "uid           [ultimate] key-submission@example.net",
        "bxzcxpxk8h87z1k7bzk86xn5aj47intu@example.net",
        "ssb   rsa3072 2016-08-30 [E]",
        "Take the fingerprint from that output and manually publish the key:",
        "$ gpg-wks-server --install-key C0FCF8642D830C53246211400346653590B3795B \\",
        ">                key-submission@example.net",
        "Finally that submission address needs to be redirected to a  script  running  gpg-wks-server.",
        "The  procmail  command can be used for this: Redirect the submission address to the user \"we‐",
        "bkey\" and put this into webkey's ‘.procmailrc’:",
        ":0",
        "* !^From: webkey@example.net",
        "* !^X-WKS-Loop: webkey.example.net",
        "|gpg-wks-server -v --receive \\",
        "--header X-WKS-Loop=webkey.example.net \\",
        "--from webkey@example.net --send"
    ],
    "see_also": [
        {
            "name": "gpg-wks-client",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/gpg-wks-client/1/json"
        },
        {
            "name": "GPG-WKS-SERVER",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/GPG-WKS-SERVER/1/json"
        }
    ],
    "tldr": {
        "source": "not_found",
        "examples": []
    }
}