Skip to content

Expose a Container with an External Connection

By default, a container is only reachable from within its own namespace. To accept TCP or UDP traffic from the internet directly on a container port (for example a database, game server or any non-HTTP service running in your container), you add an external connection to the container.

For HTTP and HTTPS web applications, use an ingress instead.

This guide walks you through adding, editing and removing external connections in the Nexaa portal. See Connect from the internet for an overview of all connection types.


Prerequisites

  • A Nexaa account with billing completed.
  • A container (or a container you are creating) which listens on the port you want to expose.
  • For a dedicated IP: a dedicated IP-address assigned to your account. If you do not have one yet, you can request it from the wizard (see below).

Shared IP

For no extra costs

With a shared IP external connection Nexaa provides an IPv4 and IPv6 address which is shared among multiple customers. Nexaa assigns a random port number on this shared IP-address to you, which is connected to the port of your container. TCP and UDP are supported.

  1. Create or edit the container

    Create a new container, or open the configure tab of an existing container in the Nexaa portal.

  2. Expose the container port

    You need to expose a port for container traffic; this should be the port on which the container is listening (e.g. 3306:3306).

  3. Enable External Connections

    • Toggle the setting “Make this container accessible from the internet?” to enable
    • Go to the External Connections tab
    • Click on "Enable External Connections"
  4. Add an external connection

    In the wizard, configure the external connection.

    1. Select Shared IP and click Next
    2. Select the port which you exposed in the previous step (e.g. 3306)
    3. Select the protocol (TCP, UDP or both). In most cases just TCP is enough
    4. You can restrict access by specifying allowed IP-addresses in the IP Allow list section (remember to add your IPv6 address as well if you have one). If left blank, the container will be accessible from anywhere in the world (0.0.0.0/0, ::/0).
    5. You get an overview. Click Enable to add the external connection
  5. Save

    Make sure to click Update Container to apply the new configuration to your container.

Important

Once saved, Nexaa will generate a random port number for your external connection. Your container will become available at this port number and the Nexaa shared IP-address. You can find the IP-address and port number in the overview of your container. In the configure tab you can also edit or remove the external connection.


Dedicated IP

For extra costs

With a dedicated IP external connection Nexaa provides an IPv4 and IPv6 address which is only available to your services. You choose yourself which port number on this IP-address is connected to which container port. This is the right option when your application needs a specific, predictable external port number. TCP and UDP are supported.

No dedicated IP yet?

A dedicated IP-address is assigned to your account on request. If your account does not have one yet, the Dedicated IP option in the wizard is marked On request at extra cost and the button reads Submit request. Fill in the request form and we will get in touch to set up the dedicated IP. As soon as it is assigned to your account, you can add and manage dedicated IP external connections yourself using the steps below.

  1. Create or edit the container

    Create a new container, or open the configure tab of an existing container in the Nexaa portal.

  2. Expose the container port

    You need to expose a port for container traffic; this should be the port on which the container is listening (e.g. 3306:3306).

  3. Enable External Connections

    • Toggle the setting “Make this container accessible from the internet?” to enable
    • Go to the External Connections tab
    • Click on "Enable External Connections"
  4. Add an external connection

    In the wizard, select Dedicated IP and click Next. The Add external connection dialog opens.

    1. Container port: select the port which you exposed in the previous step (e.g. 3306)
    2. External port: type the port number on your dedicated IP-address that should be connected to the container port (e.g. 13306) and press ENTER
    3. Protocol: select TCP, UDP or both. In most cases just TCP is enough
    4. IP Allow list: you can restrict access by specifying allowed IP-addresses (remember to add your IPv6 address as well if you have one). If left blank, the container will be accessible from anywhere in the world (0.0.0.0/0, ::/0).
    5. Click Add to add the external connection
  5. Save

    Make sure to click Update Container to apply the new configuration to your container.

Important

Once saved, your container will become available at the external port you chose on your dedicated IPv4 and IPv6 address. The external connection is listed in the overview of your container with connection type Dedicated IP, the container port, the external port, the protocol and the IP allow list. In the configure tab you can also edit or remove the external connection.


Manage external connections

Existing external connections (shared IP and dedicated IP) of a container are listed in a table in the configure tab of the container: toggle “Make this container accessible from the internet?” and open the External Connections tab.

Each row shows the connection type (Shared IP or Dedicated IP), the container port, the external port, the protocol and the IP allow list.

  • Edit: click the pencil icon of the row. The same dialog as when adding the connection opens with the current configuration. Change the protocol, the IP allow list or (for dedicated IP) the external port and click Save.
  • Remove: click the cross icon of the row.
  • Add another: click Add external connection to expose another container port or protocol. A container uses either shared IP or dedicated IP external connections, not both.

Make sure to click Update Container afterwards to apply the changes to your container.


What's Next