Install · Domains

Domains and certificates

The orionplace command adds a domain to nginx, gets a free Let's Encrypt certificate for it and connects it to your storefront and your personal backend. The storefront install runs it for you; use it directly to add, check or remove a domain.

How it works

On port 80 nginx only confirms certificates and redirects to HTTPS. On port 443 it passes the requests to the storefront with the headers the storefront uses to choose your backend. Let's Encrypt certificates are valid for 90 days and renew automatically 30 days before they expire; nginx reloads after each renewal.

Add a domain

Run the command and answer its questions:

bash
sudo orionplace domain add shop.example.com

It asks whether to serve www.shop.example.com too (redirected to shop.example.com), which storefront serves the domain and your personal backend domain. Then it checks the backend, checks that the domain reaches this server, gets the certificate, writes the domain mapping into the storefront and reloads nginx. When a step fails, nothing is kept and the command explains what to fix. Running it again for the same domain repairs it.

Your personal backend

Enter the backend domain shown in your orionmarket.place profile, for example my-shop.orionplace.app; the full address https://my-shop.orionplace.app/api works too. The command checks that the backend answers before it changes anything. A storefront works with one backend: when you enter another backend for a storefront that already has one, the command asks before it switches all its domains.

If the backend does not accept the storefront domain yet, the command warns you: add the domain in your admin panel under Domains. Until then the storefront shows an initialization error.

DNS check

Before it asks for a certificate, the command checks over HTTP that the domain really reaches this server, the same way Let's Encrypt checks it. If it does not, the command shows the address the domain points to and the address of this server. Create or fix the A record, wait until DNS updates and run the command again.

Options

Each question has an option, so the command also runs without questions:

bash
sudo orionplace domain add shop.example.com --app shop --backend my-shop.orionplace.app --www
OptionWhat it does
--app <name>Storefront that serves the domain (see sudo orionplace app list). Without it the only installed storefront is used; with none installed, the domain shows a placeholder until a storefront is installed.
--no-appAdd the domain without a storefront. It shows a placeholder until a storefront is installed.
--backend <name.orionplace.app>Personal backend domain.
--www / --no-wwwAlso serve the www name of the domain and redirect it to the domain (--www), or not (--no-www).
--email <address>E-mail address for certificate notices from Let's Encrypt.
--skip-dns-checkSkip the DNS check, for example when a proxy in front of the server answers for the domain.
--yesTake the defaults instead of asking questions.

List and check domains

Every domain with its storefront, backend, days left on the certificate and HTTPS status:

bash
sudo orionplace domain list

Check one domain step by step: DNS, certificate, backend, storefront service, domain mapping and the HTTPS answer:

bash
sudo orionplace domain check shop.example.com

Certificates

Renewal runs automatically twice a day. To see the expiry dates, or to renew now the storefront certificates that expire within 30 days:

bash
sudo orionplace cert list
sudo orionplace cert renew

Remove a domain

Removes the domain from nginx and from the domain mappings of its storefront, then asks whether to delete the certificate too:

bash
sudo orionplace domain remove shop.example.com