EPMD(1) General Commands Manual EPMD(1)

epmd - Erlang Port Mapper Daemon

The epmd command be used to start the port mapper daemon:

epmd [-d|-debug] [DbgExtra...] [-address Addresses]
    [-port No] [-daemon] [-relaxed_command_check]

It can also be used to communicate with a running port mapper daemon:

epmd [-d|-debug] [-port No] [-names|-kill|-stop Name]

This daemon acts as a name server on all hosts involved in distributed Erlang computations. When an Erlang node starts, the node has a name and it obtains an address from the host OS kernel. The name and address are sent to the epmd daemon running on the local host. In a TCP/IP environment, the address consists of the IP address and a port number. The node name is an atom on the form of Name@Node. The job of the epmd daemon is to keep track of which node name listens on which address. Hence, epmd maps symbolic node names to machine addresses.

The TCP/IP epmd daemon only keeps track of the Name (first) part of an Erlang node name. The Host part (whatever is after the @) is implicit in the node name where the epmd daemon was contacted, as is the IP address where the Erlang node can be reached. Consistent and correct TCP naming services are therefore required for an Erlang network to function correctly.

Note
On Windows the maximum number of nodes allowed in one epmd instance is 60. This is because of limitations in the current implementation. If you need more nodes, you should look into using and erlang based epmd implementation such as Erlang EPMD.
Starting the port mapper daemon - The daemon is started automatically by command erl(1) if the node is to be distributed and no running instance is present. If automatically launched environment variables must be used to change the behavior of the daemon; see section Environment Variables.
If argument -daemon is not specified, epmd runs as a normal program with the controlling terminal of the shell in which it is started. Normally, it is to be run as a daemon.
Regular startup options are described in section Regular Options.
The DbgExtra options are described in section DbgExtra Options.
Communicating with a running port mapper daemon - Communicating with the running epmd daemon by the epmd program is done primarily for debugging purposes.
The different queries are described in section Interactive options.

These options are available when starting the name server. The name server is normally started automatically by command erl(1) (if not already available), but it can also be started at system startup.

With relaxed command checking enabled, you can forcibly unregister live nodes.
Relaxed command checking can also be enabled by setting environment variable ERL_EPMD_RELAXED_COMMAND_CHECK before starting epmd.
Use relaxed command checking only on systems with very limited interactive usage.

Note

These options are only for debugging and testing epmd clients. They are not to be used in normal operation.

These options make epmd run as an interactive command, displaying the results of sending queries to an already running instance of epmd. The epmd contacted is always on the local node, but option -port can be used to select between instances if several are running using different ports on the host.

Killing the running epmd is only allowed if epmd -names shows an empty database or if -relaxed_command_check was specified when the running instance of epmd was started.
Notice that -relaxed_command_check is specified when starting the daemon that is to accept killing when it has live nodes registered. When running epmd interactively, -relaxed_command_check has no effect. A daemon that is started without relaxed command checking must be killed using, for example, signals or some other OS-specific method if it has active clients registered.
-stop Name - Forcibly unregisters a live node from the epmd database.
This command can only be used when contacting epmd instances started with flag -relaxed_command_check.
Notice that relaxed command checking must enabled for the epmd daemon contacted. When running epmd interactively, -relaxed_command_check has no effect.

On some operating systems syslog will be used for error reporting when epmd runs as a daemon. To enable the error logging, you must edit the /etc/syslog.conf file and add an entry:

  !epmd
  *.*<TABs>/var/log/epmd.log

where <TABs> are at least one real tab character. Spaces are silently ignored.

The epmd daemon accepts messages from both the local host and remote hosts. However, only the query commands are answered (and acted upon) if the query comes from a remote host. It is always an error to try to register a node name if the client is not a process on the same host as the epmd instance is running on. Such requests are considered hostile and the connection is closed immediately.

The following queries are accepted from remote nodes:

To restrict access further, firewall software must be used.

January 2025