> For the complete documentation index, see [llms.txt](https://docs.rairprotocol.org/rairprotocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rairprotocol.org/rairprotocol/installation-and-testing/getting-started/rairlite-single-vm/https-configuration.md).

# https configuration

### Adding A record

Purchase a domain name from Domain Provider.After verifying Static Public IP assigned to VM from Cloud provider on which RAIR is installed, go to your domain provider and navigate to DNS Settings.Add *A record* pointing to your Public IP Address. For example:

* An A record with mydomainname.com pointing to your server’s public IP address.
* An A record with [www.mydomainname.com](http://www.mydomainname.com) pointing to your server’s public IP address.

### Generate dummy certificates

copy init-letsencrypt.sh script from rair-infra directory to your rair base directory (rair-dapp) and  edit the script to add in your domain(s).

Then run `chmod +x init-letsencrypt.sh` and `sudo ./init-letsencrypt.sh`.

### Start RAIR app with dummy certificates

* Edit the rair-front/nginx/nginx.conf.ssl script to add in your domain(s).
* Copy rair-front/nginx/nginx.conf.ssl   to rair-front/nginx/nginx.conf
* Run the script `sudo docker-compose -f docker-compose.local-ssl-without_certbot.yml up -d`

At this point, you can navigate to the Domain in Browser and check if the Application is working but with dummy certificate

* Run the script `sudo docker-compose -f docker-compose.local-ssl-without_certbot.yml down`

### Generate real certificates using letsencrypt

* Edit script  docker-compose.local-ssl-with\_certbot.yml   to add in your domain(s) and email address.&#x20;
* Delete dummy certificates  `rm -rf data/certbot/conf/live/<domain>`
* Run the script `sudo docker-compose -f docker-compose.local-ssl-with_certbot.yml up -d certbot`
* Verify that real certificates are generated by checking logs of certbot container  (Please note that certbot container will stop automatically after generating certificates)
* Modify rair-front/nginx/nginx.conf  with actual path of ssl certificates (modify ssl\_certificate and ssl\_certificate\_key variables in nginx.conf )
* Stop the  app by running script `sudo docker-compose -f docker-compose.local-ssl-with_certbot.yml down`

### Start RAIR app

Run the script

`sudo docker-compose -f docker-compose.local-ssl-without_certbot.yml up -d`

NOTE : Please ensure Ports for http & https (80 & 443) are open on Virtual Machine


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.rairprotocol.org/rairprotocol/installation-and-testing/getting-started/rairlite-single-vm/https-configuration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
