distccd(1)
π distccd(1) β General Commands Manual π
okay so bestie, welcome to the distccd page, the compiler server that carries the whole distributed-compile friend group on its back. grab a snack, this one's a whole journey β¨
β¨ NAME β¨
distccd β the distributed C/C++ compiler server, aka the server-side main character π
πΈ SYNOPSIS πΈ
distccd --daemon [OPTIONS]
π¦ DESCRIPTION π¦
distccd is the server for the distcc(1) distributed compiler. It's the one that accepts and runs compilation jobs for network clients. literally the workhorse. π
distcc can run over either TCP or a connection command such as ssh(1). TCP connections are fast but relatively insecure. SSH connections are secure but slower. pick your fighter, no cap.
For SSH connections, distccd must be installed on the volunteer but should not run as a daemon β it will be started over SSH as needed. and honestly? SSH connections have several advantages, bestie:
- neither the client nor server listens on any new ports π ββοΈ
- compilations run with the privileges of the user that requested them
- unauthorized users cannot access the server
- source and output is protected in transit π
For TCP connections, distccd can run either from an inetd-style program, or as a standalone server. Standalone mode is recommended because it is slightly more efficient and allows distccd to regulate the number of incoming jobs. The --listen and --allow options can be used for simple IP-based access control.
distcc may be started either by root or any other user. If run by root, it gives away privileges and changes to the user specified by the --user option, or the user called "distcc", or the user called "nobody". it's giving humble. it's giving "I don't need the power actually" π
distccd does not have a configuration file; it's behaviour is controlled only by command-line options and requests from clients. no config file, we die like real ones π«Ά
π STANDALONE SERVER π
The recommended method for running distccd is as a standalone server. distccd will listen for network connections and fork several child processes to serve them. so many little babies. so organized. π
If you installed distcc using a packaged version you may be able to start the server using the standard mechanism for your operating system, such as
# service distcc start
To start distccd as a standalone service, run a command like this either as root or an ordinary user:
# distccd --daemon
π§ RUNNING FROM INIT π§
distccd may be run as a standalone daemon under the control of another program like init(8) or daemontools. The super-server starts distccd when the system boots, and whenever it exits. it's giving helicopter parent but make it sysadmin energy πΈ
distccd should be started just as for a standalone server, except that the --no-detach option should be used so that the super-server can monitor it. don't ghost your super-server, that's rude.
For example, to add distccd as a process to Linux sysvinit, add this line to /etc/inittab
dscc:2345:respawn:/usr/local/bin/distccd --verbose --no-detach
--daemon
π RUNNING FROM INETD π
distccd may be started from a network super-server such as inetd or xinetd. In this case inetd listens for network connections and invokes distccd when one arrives. very "we'll call you, don't call us" of them π
This is slightly less efficient than running a standalone distccd daemon. distccd is not able to regulate the number of concurrent jobs accepted, but there may be an option in your inetd configuration to do so. so like. check your settings, bestie.
For traditional Unix inetd, a line like this can be added to /etc/inetd.conf:
distcc stream tcp nowait.6000 root /usr/local/bin/distccd distccd
--inetd
inetd imposes a limit on the rate of connections to a service to protect against accidental or intentional overuse. The default in Linux NetKit inetd is 40 per minute, which is far too low for distccd. The .6000 option raises the limit to 6000 per minute. glow up. π₯
π TERMINATING DISTCCD π
To shut down a standalone server, send a SIGTERM signal to the parent process. The most reliable way to do this from a script is to use the --pid-file option to record its process ID. Shutting down the server in this way should allow any jobs currently in progress to complete. graceful exit, we love to see it π«Ά
β¨ OPTIONS β¨
--helpβ Display summary usage information. the "what am I even doing here" button π₯Ί--versionβ Shows the daemon version and exits.-j,--jobs_JOBS_ β Sets a limit on the number of jobs that can be accepted at any time. By default this is set to two greater than the number of CPUs</> on the machine, to allow for some processes being blocked on network IO. (Daemon mode only.) bestie the default is a vibe, not a guarantee π-N,--nice_NICENESS_ β Makes the daemon more nice about giving up the CPU to other tasks on the machine.NICENESSis an increment to the current priority of the process. The range of priorities depends on the operating system but is typically0to20. By default the niceness is increased by5. be polite. share the CPU. π-p,--port_PORT_ β Set the TCP port to listen on, rather than the default of3632. (Daemon mode only.)--listen_ADDRESS_ β Instructs thedistccddaemon to listen on the IP address _ADDRESS_. This can be useful for access control on dual-homed hosts. (Daemon mode only.)-P,--pid-file_FILE_ β Save daemon process id to file _FILE_. (Daemon mode only.)--user_USER_ β Ifdistccdgets executed as root, change to user _USER_.-a,--allow_IPADDR[/MASK]_ β Instructsdistccdto accept connections from the IP address _IPADDR_. A CIDR mask length can be supplied optionally after a trailing slash, e.g.192.168.0.0/24, in which case addresses that match in the most significant _MASK_ bits will be allowed. > π¨ If no--allowoptions are specified,distccdwill exit immediately! like, immediately immediately. Unauthorized connections are rejected by closing the TCP connection immediately. A warning is logged on the server but nothing is sent to the client. silent treatment, but make it security.--allow-privateβ Allow private networks (10.0.0.0/8,192.168.0.0/16,172.16.0.0/12, and127.0.0.0/8). π--job-lifetime_SECONDS_ β Kills adistccdjob if it runs for more than _SECONDS_ seconds. This prevents denial of service from clients that don't properly disconnect and compilers that fail to terminate. By default this is turned off. no timer, no limits, no thoughts head empty π--no-detachβ Do not detach from the shell that started the daemon.--no-forkβ Don't fork children for each connection, to allow attaching gdb. > β οΈ Don't use this if you don't understand it! for real, this is not a "eh, I'll figure it out" option π--log-file_FILE_ β Send messages to file _FILE_ instead of syslog. Logging directly to a file is significantly faster than going via syslog and is recommended. β¨--log-level_LEVEL_ β Set the minimum severity of error that will be included in the log file. Useful if you only want to see error messages rather than an entry for each connection. _LEVEL_ can be any of the standard syslog levels, and in particularcritical,error,warning,notice,info, ordebug.--log-stderrβ Send log messages tostderr, rather than to a file or syslog. This is mainly intended for use in debugging. > π¨ Do not use in inetd mode.--verboseβ Include debug messages in log. Equivalent to--log-level=debug.--wizardβ Turn on all options appropriate for startingdistccdunder gdb: run as a daemon, log verbosely tostderr, and do not detach or fork. For wizards only. π§ββοΈ you either have the robe or you don't--statsβ Turn on the statistics HTTP server. By default it is off. (Daemon mode only.)--stats-port_PORT_ β Set the TCP port to listen on for HTTP requests, rather than the default of3633. (Daemon mode only.)--inetdβ Serve a client connected to stdin/stdout. As the name suggests, this option should be used whendistccdis run from within a super-server like inetd.distccdassumes inetd mode when stdin is a socket. π--daemonβ Bind and listen on a socket, rather than running from inetd. This is used for standalone mode.distccdassumes daemon mode at startup if stdin is a tty, so--daemonshould be explicitly specified when startingdistccdfrom a script or in a non-interactive ssh connection. say it with your chest, bestie π--enable-tcp-insecureβ By default (since Distcc 3.3)distccwill only execute binaries that are masqueraded todistccin/usr/lib/distcc. This turns that off, and opensdistccup to executing arbitrary code. > π¨ This feature is mainly fordistcc's test suite. See MASQUERADING ofdistcc(1). like, dangerous dangerous. do not casually enable this one, I'm begging π«Ά--zeroconfβ Register the availability of thisdistccdserver using Avahi Zeroconf DNS Service Discovery (DNS-SD). This allowsdistccclients on the local network to access thisdistccdserver without explicitly listing its host name or IP address in theirdistcchost list: thedistccclients can just use"+zeroconf"in theirdistcchost lists. Can optionally use-jparameter to specify the maximum number of jobs that this server can process concurrently. > This option is only available ifdistccdwas compiled with Avahi support enabled. π¦--authβ Perform GSS-API based mutual authentication. > This option is only available ifdistccdwas compiled with the--with-authconfigure option. π--show-principalβ Displays the name of thedistccdsecurity principal extracted from the environment. > This option is only available ifdistccdwas compiled with the--with-authconfigure option.--blacklist=FILEβ Instructdistccdto reject connections from users whose principal names are listed in _FILE_. > This option is only available ifdistccdwas compiled with the--with-authconfigure option and ifdistccdis run with the--authoption. π«--whitelist=FILEβ Instructdistccdto accept connections only from users whose principal names are listed in _FILE_. > This option is only available ifdistccdwas compiled with the--with-authconfigure option and ifdistccdis run with the--authoption. β
π SEARCH PATHS π
distcc can pass either a relative or an absolute name for the compiler to distccd. If distcc is given an explicit absolute compiler filename, that name is used verbatim on both the client and server. If the compiler name is not an absolute path, or if the client is used in masquerade mode, then the server's PATH is searched. π
distccd inherits its search path from its parent process. By default distccd tries to remove directories that seem to contain distccd masquerade links, to guard against inadvertent recursion. The DISTCCD_PATH environment variable may be used to set the path.
The search path is logged when --verbose is given. In case of confusion, check the logs. the logs are your bestie, they would never lie to you π
When distccd is run over ssh, the $HOME/.ssh/environment file may be useful in setting the path. See ssh(1).
π DIAGNOSTICS π
distccd logs messages to syslog's daemon facility by default, which normally writes to /var/log/daemon or /var/log/messages. Log messages can be sent to a different file using the --log-file option.
πΈ ENVIRONMENT VARIABLES πΈ
Okay bestie, here's where distccd gets its whole vibe from the environment. Read these carefully, they lowkey change everything π
DISTCC_CMDLISTβ if this one's set, distccd loads a list of supported commands from the file it names, and then it will refuse to serve any command whose lastDISTCC_CMDLIST_MATCHWORDSlast words don't match the words of a command in that list. (Yes, the original page saysDISTCC_CMDLIST_MATCHWORDSright there while the variable below is calledDISTCC_CMDLIST_NUMWORDSβ that's just how the page is written, don't come for me π.) For the full lore, go read the comments insrc/serve.c.DISTCC_CMDLIST_NUMWORDSβ how many words, counted from the end of the command, you're matching. Default is1.DISTCCD_PATHβ when distccd starts up, if this is set it gets used unaltered as the command-executionPATH. Like, the code that would normally try to strip masquerade directories out of the path? Yeah, it gets skipped entirely. No cap.DISTCC_SAVE_TEMPSβ set it to1and temporary files are not deleted after use. Keep your lil leftovers, queen πDISTCC_TCP_DEFER_ACCEPTβ on Linux, turns on theTCP_DEFER_ACCEPTsocket option. Defaults to on.
Heads up bestie: DISTCC_LOG does not affect the log destination for the server. Just so we're clear β¨
TMPDIRβ the directory for temporary files like preprocessor output. By default it's/tmp/. Periodt.DISTCCD_PRINCIPALβ if set, this names the principal that distccd runs under, and it's used to authenticate with the client. Only used if distccd was compiled with the--with-authconfigure option and distccd is run with the--authoption. Both, or it does nothing, iykyk.
π¦ SEE ALSO π¦
Go give these icons a read, fr fr:
π BUGS π
Okay, real talk, the scary parts. Not me being dramatic, this is genuinely in the page:
- IP-based access control is not secure against attackers who can spoof TCP connections β and it can't tell different users on a client apart. At all.
- TCP connections are not secure against attackers who can observe or modify network traffic. Like, if they can watch or mess with it, you're cooked π
- Because
ccachedoes not cache compilation from.ifiles, calling it from distccd is not useful. Save yourself the trouble bestie.
π LICENCE π
You are free to use distcc. π
distcc (including this manual) may be copied, modified or distributed only under the terms of the GNU General Public Licence version 2 or later. distcc comes with absolutely no warrany. (That's spelled warrany in the source, and I'm keeping it exactly, character for character β iconic typo behavior, we stan π«Ά.) A copy of the GPL is included in the file COPYING.
β¨ AUTHOR β¨
distcc was written by Martin Pool <mbp@sourcefrog.net>, with the co-operation of many scholars including Wayne Davison, Frerich Raabe, Dimitri Papadopoulos and others noted in the NEWS file. See pump(1) for the authors of pump mode. Please report bugs to <distcc@lists.samba.org>. π
And that's the whole page, bestie β this lil masterpiece is dated 9 June 2008 and it's the distccd(1) manual page, brought to you by the distcc crew. Go compile something gorgeous π
πβ
π¦ where this page comes from
- alpine 3.22: distcc-doc 3.4-r9 Β· GPL-2.0-or-later
- alpine 3.23: distcc-doc 3.4-r9 Β· GPL-2.0-or-later
- alpine 3.24: distcc-doc 3.4-r10 Β· GPL-2.0-or-later
- arch rolling: distcc 3.4-16 Β· GPL-2.0-only
- epel 10: distcc-server 3.4-9.el10_1 Β· GPL-2.0-or-later
- epel 9: distcc-server 3.4-9.el9 Β· GPL-2.0-or-later
- fedora 43: distcc-server 3.4-12.fc43 Β· GPL-2.0-or-later
- fedora 44: distcc-server 3.4-14.fc44 Β· GPL-2.0-or-later
- nixos 26.05: distcc 3.4
- nixpkgs unstable: distcc 3.4
- opensuse-leap 16.0: distcc-server 3.4-bp160.1.10 Β· GPL-2.0-or-later
- opensuse-leap 16.0: distcc-server 3.4-bp160.1.10 Β· GPL-2.0-or-later
- opensuse-leap 16.0: distcc-server 3.4-bp160.1.10 Β· GPL-2.0-or-later
- opensuse-leap 16.0: distcc-server 3.4-bp160.1.10 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms