# Setup

1. Start a new machine.
2. update it - sudo apt update
3. Install nginx - sudo apt install nginx
4. Config app reverse proxies - frontend, backend -
5. Install node.js, npm using n (sometimes permission issue comes) - <https://www.npmjs.com/package/n#installation>
6. npm install -g pm2, npm install -g serve
7. Copy build folder from local to server .
8. pm2 serve build/ 3000 --spa --name synthetic
9. Install Jenkins for auto deployment
10. Create 2 Jenkins applications - frontend, backend & link repos.
11. Setup env variables on production.
12. Provision Database on Mongodb Cloud.
13. Setup DNS mapping to the newly created instance.
14. Install certbot for https certificate.


---

# Agent Instructions: 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:

```
GET https://docs.aiensured.com/devops/setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
