# Network: outbound, public URLs, SSH

> What your agent can reach on the internet, how to publish the apps it builds at a public HTTPS address, and how to reach the instance over SSH.

## Outbound: what the agent can reach

An instance reaches the internet like a cloud server: any site, any API, any port, over TCP and UDP.

Blocked:

- **Port 25 (SMTP).** To send email, use an email provider's API or a [connected app](connected-apps.md)
  (Gmail, Outlook…).
- **Other customers' instances** and the platform's own internal services.
- Cloud metadata addresses.

We watch for abuse (spam, attacks, mining) and may stop an instance that breaks our acceptable use
policy; see our [legal terms](https://www.molted.net/legal).

## Public URLs

The apps your agent builds (a dashboard, a booking page, an API, a webhook receiver) can be published at a
public HTTPS address in one step.

- The agent exposes a **port** (1024 to 65535) and gets an address like
  `https://<prefix>-<port>-<handle>.<domain>`. The prefix is random by default, so the address cannot be guessed.
- HTTPS and its certificate are handled for you. The server just listens on `0.0.0.0` over plain HTTP.
- Up to 10 ports per instance.
- A few ports are reserved for the runtime, the platform and SSH, and cannot be exposed.

**Anyone who has the address can open the page.** There is no sign-in in front of it: an app that shows
private data must have its own sign-in. Your agent can add one.

The agent manages this with its tools (`MOLTED_PORT_EXPOSE`, `MOLTED_PORTS_LIST`, `MOLTED_PORT_UNEXPOSE`), and
you can do it through the API (`/v2/instances/{id}/ports`).

With your own domain, instances and their public URLs can live under it: see
[Your branded app and domains](branded-app.md).

## The agent's own address

Each instance also has the address of its runtime (`https://<handle>.<domain>`), protected by a token: the
Mue app, the Hermes API. Hermes has a second address for its dashboard.

## SSH

Every instance accepts SSH, with a key (no passwords):

```
ssh -p 2222 -o VersionAddendum=molted:v1:<instance> -o HostKeyAlias=<instance> agent@ssh.<region>.molted.net
```

- `<instance>` is the instance's handle or id; `<region>` is `eu1` or `na1`. With your own domain:
  `ssh.<your-domain>`.
- **OpenSSH 10 or newer** is required (for the `VersionAddendum` option).
- Your public key goes in `~/.ssh/authorized_keys` on the instance. The simplest way: give it to your agent
  and ask it to add it.
- `scp`, `sftp`, port forwarding (`-L`, `-D`) and reverse tunnels (`-R`) work. A reverse tunnel lets the agent
  reach your own computer or a service on your network, when you want it to.
- SSH can be turned off per instance.

The connection is encrypted end to end between your computer and the instance.

## Web terminal

The instance page of the dashboard has a terminal in the browser. In Mue, the terminal and the file explorer
are features you turn on in the agent's app.

> **With Enterprise, on request:** we can set up private networking to your systems, fixed outbound addresses,
> network rules of your own, or a deployment inside your network. See [Dedicated and
> on-premise](dedicated-and-on-premise.md).
