> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emplio.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Emplio on a server with HTTPS

> Put self-hosted Emplio on a server with your own web address or a free one. HTTPS is set up and renewed for you by the built-in Caddy service.

On a server, Emplio gets a web address and HTTPS so your team can reach it from anywhere. The installer sets this up when you answer **On a server with its own web address**.

**1. Point your address at the server**

Add a DNS record for your address, such as `emplio.example.com`, pointing at the server's IP address. Skip this if you use the free address below.

**2. Open ports 80 and 443**

Allow both in the server's firewall. They are needed to get the HTTPS certificate and to serve Emplio.

**3. Run the installer**

```bash theme={null}
curl -fsSL https://emplio.app/install.sh | bash
```

Type your address when asked. When it says the address is secure and working, open the sign-in link it prints.

## The free address

Leave the address empty and the installer offers a free one from [sslip.io](https://sslip.io), made from the server's IP address, like `203-0-113-5.sslip.io`. It needs no sign-up, but it stops working if the server's IP address changes.

## What the installer sets

With an address, it turns on the `https` profile, which starts Caddy. Caddy fetches and renews the certificate, serves the app at the top of your address and the API under `/api`. It writes these to `.env`:

```bash .env theme={null}
EMPLIO_DOMAIN=emplio.example.com
COMPOSE_PROFILES=https
FRONTEND_URL=https://emplio.example.com
PUBLIC_API_URL=https://emplio.example.com/api
WEBHOOK_URL=https://emplio.example.com/api
```

To move an install from a computer to an address later, set the same lines yourself and run `docker compose up -d` in `~/emplio`.

## BIND\_ADDRESS

Ports 3000 and 4000 stay on `BIND_ADDRESS`, which is `127.0.0.1` by default, so only the machine itself can reach them. Caddy reaches Emplio inside Docker. Change it only if you put your own HTTPS proxy in front. That proxy should serve port 3000 at the top and port 4000 under `/api` with the prefix removed, the way `docker/Caddyfile` does.

> [!WARNING]
>
> Never open ports 3000 or 4000 to the internet without HTTPS in front of them.

> [card] [Optional features](https://docs.emplio.app/self-host/optional-features.md)
>
> Webhooks, email codes and more.

> [card] [Troubleshooting](https://docs.emplio.app/self-host/troubleshooting.md)
>
> When the certificate doesn't arrive.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.