# openrail domain

> Generate a domain or add a custom domain for the linked service.

Generate a domain or add a custom domain for the linked service.

## Usage

```sh
openrail domain
openrail domain DOMAIN [--port PORT]
openrail domain list
openrail domain delete DOMAIN
openrail domain status DOMAIN
openrail domain update DOMAIN --port PORT
openrail domain certificate retry DOMAIN
```

## Flags

| Flag | Meaning |
|---|---|
| `--port PORT` | Target port inside the container |

## Details

- With no argument it generates a name under the install's base domain. With a domain it prints the DNS records to create. See [Custom domains and HTTPS](https://openrail.app/docs/guides/custom-domains).

## Examples

```sh
openrail domain
openrail domain shop.example.com
```

## Railway equivalent

`railway domain` works the same way through the [railway alias](https://openrail.app/docs/cli/railway-alias).

Every command also accepts the [global options](https://openrail.app/docs/cli/global-options).
