# Addresses

Source: https://openpanel.sh/docs/concepts/addresses

How a service is reached, an opnl.app address, your own domain, a public TCP or UDP port, or no address at all, and when to use each.

How a service is reached is one of its settings, **address**, with three values. See [Service settings](/docs/projects/settings).

| Address | Who reaches it | How |
|---|---|---|
| **Public** | Anyone on the internet | Its HTTP ports at opnl.app addresses and your own domains, with HTTPS; its TCP and UDP ports at ports on OpenPanel's edge. |
| **Private** | Your organization's devices and servers | An address in your [private network](/docs/network). Being built: see [Private addresses for services](/docs/network/private-addresses). |
| **None** (the default) | The project's other services | By its name, on the project's own network. |

Whatever the setting, a service's containers publish no ports on your server. Public traffic reaches OpenPanel's edge first and travels to the container through the [agent](/docs/servers/agent)'s own outgoing connection.

## Public: opnl.app addresses [#public-opnlapp-addresses]

Every public service with an HTTP port gets an address under opnl.app at once, named after the service, its project and four random characters:

```text
web-shop-k3x9.opnl.app
```

It works as soon as the service runs: there is no DNS record to add and no domain to verify. You can add more names under opnl.app, as long as they are free. See [opnl.app addresses](/docs/domains/opnl-app).

## Public: your own domain [#public-your-own-domain]

You can give a public service your own domain, such as `app.example.com`, with two DNS records: a CNAME that points it at OpenPanel's edge and a TXT record that proves it is yours. OpenPanel keeps the domain and shows the records, but does not serve it yet: the check that verifies the TXT record is being built. See [Your own domain](/docs/domains/own-domain).

## Public: TCP and UDP ports [#public-tcp-and-udp-ports]

A public service's TCP and UDP ports, for a database, a game server or anything that is not a website, each get a port on OpenPanel's edge between 30000 and 32767. See [TCP and UDP services](/docs/tcp-udp).

## None: inside the project [#none-inside-the-project]

A service with no address is reached only by the other services of its project, by its name. Each service's name is also its host name on the project's own network, so a service named `db` listening on port 5432 is `db:5432` to a service beside it on the same server. Use this for databases, queues and workers that nobody outside the project should reach.

## Which one to use [#which-one-to-use]

| You run | Use |
|---|---|
| A website, an API or a web app | **Public**, with an HTTP port. Start with its opnl.app address; add your own domain when you have one. |
| A database or cache only your app uses | **None**: your app reaches it by name. |
| A service people reach from outside over TCP or UDP, such as a game server | **Public**, with TCP or UDP ports. |
| An internal tool only your team should open | **Private**, once private addresses ship. |

## Rules that tie them together [#rules-that-tie-them-together]

- **A domain needs a public service with an HTTP port.** Adding one to any other service is refused with "Make the service public before giving it a domain." or "Add an HTTP port to the service first."
- **An opnl.app address follows the service.** It moves to another HTTP port when its port goes, and it is removed when the service is no longer public or has no HTTP port left.
- **Your own domains hold the service public.** A service with your own domains cannot stop being public ("This service has its own domains. Remove them before taking it off its public address."), nor lose the HTTP port a domain reaches.
- **Several replicas need the load balancer** on a public service. See [Load balancer on or off](/docs/load-balancing).

<Cards>
<Card href="/docs/domains" title="Domains and certificates" description="opnl.app addresses, your own domains, and HTTPS." />

<Card href="/docs/tcp-udp" title="TCP and UDP services" description="Public ports on the edge for services that are not websites." />

<Card href="/docs/concepts/regions" title="Regions and the edge" description="Where OpenPanel's edge runs." />
</Cards>