# Self-hosting

> Run the open-source Custom Domain service on your own server or cloud, with one-click templates for Azure, AWS, Google Cloud, Hetzner and DigitalOcean.

Source: https://customdomainapi.com/docs/self-hosting/

The hosted plans run the open-source service
[sireto/custom-domain](https://github.com/sireto/custom-domain) (Apache
2.0). You can run it yourself, on one server, with the same API, SDK and
assertion. Your integration doesn't change between hosted and self-hosted.

## Install

On a fresh Ubuntu 22.04/24.04 or Debian 12 server with a public address:

```bash
curl -fsSL https://raw.githubusercontent.com/sireto/custom-domain/main/deploy/install.sh -o install.sh
sudo CUSTOM_DOMAIN_VERSION=0.9.0 EDGE_HOSTNAME=edge.yourcompany.com \
  ACME_EMAIL=ops@yourcompany.com bash install.sh
```

Pin a [release](https://github.com/sireto/custom-domain/releases) as
above. Point `edge.yourcompany.com` (an A record, and AAAA if you use
IPv6) at the server. The installer prints the operator portal's address and
password, and `custom-domain doctor` checks the installation.

One-click and guided options:
[Azure](https://github.com/sireto/custom-domain/blob/main/docs/hosting-azure.md),
[AWS](https://github.com/sireto/custom-domain/blob/main/docs/hosting-aws.md),
[Google Cloud](https://github.com/sireto/custom-domain/blob/main/docs/hosting-gcp.md),
[Hetzner](https://github.com/sireto/custom-domain/blob/main/docs/hosting-hetzner.md),
[DigitalOcean](https://github.com/sireto/custom-domain/blob/main/docs/hosting-digitalocean.md).

## Then

1. Create your application, register and verify its origin, and issue an
   API key, in the operator portal or with the `custom-domain` command.
2. Give the application its own assertion key if other parties' applications
   share the deployment (`custom-domain assertion-key issue`).
3. Integrate as in the [Quickstart](/docs/quickstart/), with your own edge
   name as the base URL.

Upgrades: `custom-domain upgrade <version>`. Operations, backups and
monitoring are in the
[repository's docs](https://github.com/sireto/custom-domain/tree/main/docs).
