private static List<PortIdPair> getPortIdPairs(TikaServerConfig tikaServerConfig) {
        List<PortIdPair> pairs = new ArrayList<>();
        int[] ports = tikaServerConfig.getPorts();
        //if there's only one port, use only the idbase, otherwise append -$port
        if (ports.length == 0) {
            throw new IllegalArgumentException("Couldn't find any ports in: " + tikaServerConfig.getPort());
        } else if (ports.length == 1) {
            pairs.add(new PortIdPair(ports[0], tikaServerConfig.getIdBase()));
        } else {
            for (int p : ports) {
                pairs.add(new PortIdPair(p, tikaServerConfig.getIdBase() + "-" + p));
            }
        }

        return pairs;
    }
This value is set to the server's id in the forked process.
tika-server/tika-server-core/src/main/java/org/apache/tika/server/core/TikaServerCli.java