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

# Automatic SSL Setup

> Automatically provision SSL certificates to your machine.

If your hosting provider does not easily offer SSL certificate provisioning for your machine, you can use the `-autossl` flag or `AUTO_SSL` environment variable to automatically provision SSL certificates to the specified domain and redirect HTTP requests to HTTPS.

The flag accepts a domain name as an argument. For example:

```sh theme={null}
./medama start -autossl example.com
```

This feature requires the server to run on ports 80 and 443. The domain **MUST** be publicly accessible and resolve to the server using A/AAAA records.

## FAQ

### Do I need root privileges to bind to ports 80 and 443?

On Linux, you may not have permission to bind to ports 80 and 443. You can use the following command to allow the binary to bind to these ports without requiring root privileges:

```sh theme={null}
sudo setcap cap_net_bind_service=+ep /path/to/your/binary
```
