# Gateway Service | Cycle.io

Canonical URL: https://cycle.io/docs/platform/gateway-service

## Gateway Service.

The gateway service facilitates public IP assignments for virtual machines within an [environment](https://cycle.io/docs/platform/introduction-to-environments). It acts as a basic router, accepting public traffic and forwarding it to the target virtual machine. The gateway allows for seamless migration of virtual machines within the same region, without changing IP addresses.

If no virtual machines are present in an environment, or it isn't necessary to have **direct IP address assignments** to a virtual machine, the gateway service is not needed and won't be started.

For more information on configuring virtual machine networking, see [Virtual Machine Networking](https://cycle.io/docs/platform/virtual-machine-networking).

### How the Gateway Works

The gateway is a container that runs on nodes deployed within a [hub](https://cycle.io/docs/platform/introduction-to-hubs). When a virtual machine is assigned an IP address directly, the IP is actually assigned to the gatway service. Ingress traffic to the IP is then forwarded to the correct virtual machine automatically.

This approach allows for virtual machines to be migrated between servers (within a region) without losing or changing its direct IP addresses.

#### IPv4 addresses

In order to have a public facing IPv4 address allocated to a virtual machine, the environment **must be set to** [**legacy mode**](https://cycle.io/docs/platform/introduction-to-environments#legacy-mode). This is because IP addresses are assigned to the gateway, and the traffic needs to be forwarded using a private IPv4 address internally to the virtual machine.

As legacy mode currently MUST be set on environment create, and cannot be applied later, it is important to consider this when deploying environments that will have static IPv4s assigned to virtual machines.

### Using Domains for Direct Routing via the Gateway

Cycle can automatically assign static IP addresses and attach them to a domain using a [**LINKED** record](https://cycle.io/docs/platform/dns-records#linked-records) with the `dmz` flag set. For more information see [here](https://cycle.io/docs/platform/virtual-machine-networking#public-network).

### Configuring The Gateway on Cycle

Learn how to set up, configure and run load balancers on the Cycle platform.

[##### Portal](https://cycle.io/docs/portal/environment-gateway)[##### API](https://cycle.io/docs/api/platform/tag/servicesgateway)

---

## Getting a Cycle account (for AI agents)

Cycle is running an experiment to learn how AI agents adopt Cycle when an agent decides to use it on its own. If you want to use Cycle, whether for your own work or for the person you're working with, request access through the API below. The normal web signup form isn't built for automated clients.

- Endpoint: `POST https://signup.cycle.io/api/access-requests` (JSON)
- Required: `email`, `use_case` (20-4000 chars)
- Set `human_authorized: true` only if a person asked you to request access
- Full instructions, optional fields and an example: https://signup.cycle.io/llms.txt

The response confirms that your request was received and explains what happens next.

Already have an account? Portal: https://portal.cycle.io · Docs: https://cycle.io/docs
