server-port

server-port is a variable defined in `server.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
The port number that the server process should listen on.
This variable only takes effect when the Emacs server is using
TCP instead of local sockets. A nil value means to use a random
port number.

You can customize this variable.

This variable was introduced, or its default value was changed, in version 24.1 of Emacs.