KAMID.CONF(5)
β¨ KAMID.CONF(5) β¨
okay bestie, so you know kamid.conf β that's the configuration file for the 9p file server daemon kamid(8). Yes, the whole thing. It lives in the File Formats Manual section of the manual pages (section 5, iykyk), so likeβ¦ it's a file format page, not a command page. She's a different breed π
π DESCRIPTION π
kamid.conf is literally the config file for the 9p file server daemon kamid(8). That's the whole vibe.
The format is fairly flexible β she's chill like that π. Here's the tea:
- The current line can be extended over multiple lines using a backslash (
\). - Comments can go anywhere in the file using a hash mark (
#), and they extend to the end of the current line. - β οΈ But be careful when you're commenting out multi-line text: the comment is effective until the end of the entire block. So like, don't think you killed one line and accidentally nuked the whole thing π
Argument names that don't begin with a letter, digit, or underscore β plus reserved words (such as listen, pki and table) β must be quoted. And if an argument contains whitespace, wrap it in double quotes (").
π¦ macros (yes, she does macros) π¦
Macros can be defined and are later expanded in context. Slay.
- Macro names must start with a letter, digit, or underscore, and may contain any of those characters β but they may not be reserved words. (rude, but rules are rules.)
- Macros are not expanded inside quotes. Periodt.
For example:
lan_addr = "192.168.0.1"
listen on $lan_addr prot 5640 tls auth <users>
πΈ include (reusing your fave configs) πΈ
Additional configuration files can be included with the include keyword, like:
include "/etc/kamid.conf.local"
So organized, honestly obsessed π«Ά
The syntax of kamid.conf is described below β¬οΈ
π the syntax π
listen [options...]
The options are as follows:
on address port numberβ Listen on address for incoming connection on the given port number. address can be an IP address or a domain name.tls pki nameβ Use the tls certificate name previously defined with thepkirule.auth <table>β Use the given authentication table to authorize the clients.userdata <table>β Maps user (virtuals or not) to their exported tree. By default the user home directory obtained withgetpwnam(3)is used.virtual <table>β Maps virtual users to local user.
pki pkiname cert certfileβ Associate certificate file certfile with pki entry pkiname. The pki entry defines a keypair configuration that can be referenced in listener rules. πpki pkiname key keyfileβ Associate the key located in keyfile with pki entry pkiname.table name {value => value [, ...]}β Tables provide additional configuration information forkamid(8)in the form of key-value mappings. Declare a mapping table containing the given static key-value pairs. It's giving dictionary energy, fr fr π
π₯ EXAMPLES π₯
A sample configuration file β screenshot this, she's iconic:
pki localhost cert "/etc/ssl/localhost.crt"
pki localhost key "/etc/ssl/private/localhost.key"
table users { "SHA256:..." => "op" }
listen on localhost port 5640 tls pki localhost auth <users>
Look at her go. Chef's kiss π
π SEE ALSO π
kamictl(8), kamid(8) β go read those too bestie, they're the main characters of this saga π
β¨ and that's the whole page! β¨ This one's from the Debian crew, dated December 14, 2021 β so she's got that vintage-but-timeless thing going on. Go configure something gorgeous ππ
π¦ where this page comes from
- nixos 26.05: kamid 0.2
- nixpkgs unstable: kamid 0.2
- Copyright (c) 2021 Omar Polo <op@omarpolo.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms