Kokomo

Networking

Port mapping

As described in the core concepts Kokomo allows you to configure the ports that you can use to use the exposed service.


When Kokomo receives a request from a CLI agent to expose a service, it will ask for a local port and a remote port:

  • Local port: the port of the service you want to expoise on your host computer (or server) where the CLI agent is running.
  • Remote port: the port that you wish to expose on the Kokomo tunnel that clients will use when consuming the exposed service.

The remote port is optional and if not specified it will default to the local port.

Using different ports

If you want to expose your service to a different port on Kokomo, that can be done by specifying a custom remote port. Kokomo will take care of properly remapping the ports to consume your service via the agent.

For example, if you want to expose an API running locally on port 8000 to port 80 on Kokomo, you can start the agent with the following configuration:

$ kokomo \
  --service-name "my-api" \
  --local-port 8000 \
  --remote-port 80 \
  --api-key [API KEY]

By doing so, the client will consume the exposed service on port 80 instead of port 8000.

Reserved remote ports

You can use all remote ports that are equal or greater than 1024, except 65534 and 65535 which are used by Kokomo for internal purposes. No such limit exists for local ports.

Previous
Dedicated & Static