diod.conf(5)

πŸ’… diod.conf β€” the distributed I/O daemon config file, bestie edition ✨

okay so picture this: diod.conf is the config file for the distributed I/O daemon, and it's literally a whole LUA script. yeah. not a boring key-value situation, an actual grown-up scripting language. we love that for us πŸŽ€


🌸 NAME 🌸

diod.conf β€” the distributed I/O daemon configuration file, aka the glow-up your daemon deserves πŸ’–


✨ DESCRIPTION ✨

so the tea is: diod.conf is actually a LUA script. not kidding. the internal config defaults get overridden by whatever you set in this file, and some of those values can then get overridden again on the command line. layers, bestie. it's giving onion πŸ§…

config settings take the form of LUA global variables which get read out after the config file is executed. so basically the values of those variables can either be statically assigned or computed. math? logic? all valid. iconic behavior honestly. the variables are described below πŸ‘‡


πŸ¦‹ CONFIG VARIABLES πŸ¦‹

  • listen = { "IP:PORT" [,"IP:PORT",...] } β€” list the interfaces and ports that diod should listen on. the default is "0.0.0.0:564". set it, forget it, or go wild with multiple entries πŸ’«
  • exports = { "/path" [, "/path", ...] } β€” list the file systems that clients will be allowed to mount. all paths should be fully qualified (yes, the whole thing, no shortcodes). the exports table can include two types of element: a string element (like above), or an alternate table element form { path="/path", opts="ro" }. in that alternate form, the (optional) opts attribute is a comma-separated list of export options, as described below in EXPORT OPTIONS. and yes, you can absolutely mix the two table element forms in the exports table. note that although diod will not traverse file system boundaries for a given mount due to inode uniqueness constraints, subdirectories of a file system can be separately exported. so like, yes and no, iykyk πŸ€·β€β™€οΈ
  • exportall = 1 β€” export all file systems listed in /proc/mounts. if new file systems are mounted after diod has started, they will become immediately mountable. no restart needed, we love a live update. if there's a duplicate entry for a file system in the exports list, any options listed in the exports entry will apply πŸ”₯
  • exportopts = "opt,opt,..." β€” establish a default set of export options. heads up: these are overridden, not appended to, by opts attributes in an "exports" entry. so don't expect them to stack, bestie, it's a takeover not a collab πŸ™ˆ
  • nwthreads = INTEGER β€” sets the (fixed) number of worker threads created to handle 9P requests for a unique aname. the default is 16 per aname. fixed. not flex. periodt πŸ’…
  • auth_required = 0 β€” allow clients to connect without authentication, i.e. without a valid MUNGE credential. convenient? yes. secure? girl, that's a choice πŸ’€
  • userdb = 0 β€” this option disables password/group lookups. it allows any uid to attach and assumes gid=uid, and supplementary groups contain only the primary gid. minimalist. no cap 🧚
  • allsquash = 1 β€” remap all users to "nobody". the attaching user need not be present in the password file. everyone's nobody, nobody's somebody, it's a vibe 🌈
  • squashuser = "nobody" β€” change the squash user from the default of nobody. the squash user must be present in the password file. mandatory presence, no exceptions πŸ‘‘
  • logdest = "DEST" β€” set the destination for logging. DEST is in the form of syslog:facility:level or filename. the default is syslog:daemon:err. choose your adventure πŸ“
  • statfs_passthru = 1 β€” this option configures statfs to return the host file system's type rather than V9FS_MAGIC. the default is 0 (return V9FS_MAGIC). mystery vs. clarity, you decide ⭐

πŸ’œ EXPORT OPTIONS πŸ’œ

the following export options are defined, bestie, take notes:

  • ro β€” export the file system read-only. look, don't touch. very demure πŸŽ€
  • suppress β€” exclude this file system from exports. useful following exportall = 1. the "not you" of export options 😭
  • sharefd β€” allow limited server-side file descriptor sharing for files opened O_RDONLY by the same user. sharing is caring, but only sometimes πŸ’–
  • privport β€” reject attach request unless client is bound to a port in the privileged port range (512-1023). the diodcat utility has a --privport option which, when run as root, binds to a privileged socket before connecting. this provides limited additional security, especially in open networks, as it is vulnerable to IP spoofing attacks. so like, it helps but don't get cocky 🫢
  • noauth β€” allow attach to succeed without authentication. the "no thoughts, just vibes" option. use responsibly πŸ™

🌟 EXAMPLE 🌟

here's a whole example, copy-paste ready, you're welcome:

--
-- example diod.conf
--
listen = { "0.0.0.0:10002" }
exports = {
     "/home",
     "/usr/global",
     { path="ctl", opts="ro,noauth" },
     { path="/usr/local", opts="ro" },
}
nwthreads = 8

see? mixing string elements and table elements, it's a whole aesthetic ✨


πŸŽ€ FILES πŸŽ€

  • /etc/diod.conf β€” the main character, the file itself πŸ‘‘

πŸ’« SEE ALSO πŸ’«

  • lua (1)
  • diod (8)
  • openlog (3)

and for the lua girlies: http://www.lua.org/ 🌐


real talk for a sec: auth_required = 0 and noauth are literal security choices you're making, not just config lines. know what you're doing before you go slashing those guards, bestie. be safe out here πŸ’…

✨ that's the whole page, you're literally a diod.conf expert now ✨

this was diod.conf(5) from the diod package, version 1.0-pre27-516-g0d87511, dated... well, the man page says diod in the footer, so go off king πŸ’– πŸ¦‹πŸŒΈπŸ«Ά