> For the complete documentation index, see [llms.txt](https://lilbobbytables.gitbook.io/mycrt-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lilbobbytables.gitbook.io/mycrt-user-guide/installation/configure-mycrt.md).

# Configure and Launch MyCRT

The next step in the deployment process is to configure MyCRT to run.

## 1: Environment Variables

Add the following lines to `/etc/environment`

```bash
MYCRT_ENV="demo"
MYCRT_PORT=80
MYCRT_HOST="localhost"
```

Quit the SSH session and reopen it to apply the environment variables.

## 1.5: Run Automated Tests (Optional)

Now, the automated tests can finally be run. This is a good way to make sure everything has gone well so far.&#x20;

```bash
cd mycrt/scripts
npm run test
```

If all tests pass, you're in good shape!

## 2: Configure the Service

Modify `mycrt/service/mycrt.config.json` to match the following:

```javascript
{
   "name": "MyCRT Server1",
   "ssl": false,
   "captures": {
      "mock": false,
      "interval": 360000,
      "intervalOverlap": 60000,
      "metricsDelay": 120000,
      "filePrepDelay": 120000
   },
   "replays": {
      "mock": false,
      "interval": 360000,
      "intervalOverlap": 60000,
      "metricsDelay": 120000,
      "filePrepDelay": 120000
   }
}
```

For a detailed explanation of all of the configuration options, [check here](https://lilbobbytables.gitbook.io/mycrt-user-guide/mycrt-configuration).

Create `/etc/systemd/system/mycrt.service`

```bash
[Service]
WorkingDirectory=/PATH_TO_MYCRT_REPO/service
ExecStart=/usr/bin/npm run mycrt
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=mycrt-demo
User=root
Group=root
Environment=NODE_ENV=production MYCRT_ENV=demo MYCRT_PORT=80 MYCRT_HOST=localhost
```

Now, run `systemctl status mycrt`

You should see the following output:

```
● mycrt.service
   Loaded: loaded (/etc/systemd/system/mycrt.service; static; vendor preset: enabled)
   Active: inactive (dead)
```

## 3: Launch MyCRT

Run `sudo systemctl start mycrt` to start the service. Run `curl localhost:80/api/ping` to make sure the service has started.

Now, you should be able to access your EC2 instance in the browser with its hostname.&#x20;

Congratulations! MyCRT is now up and running.

**Next (optional) Step**

{% content-ref url="/pages/-LARA1im22eErKkWLW17" %}
[Configure HTTPS/SSL](/mycrt-user-guide/installation/configure-https-ssl.md)
{% endcontent-ref %}


---

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

```
GET https://lilbobbytables.gitbook.io/mycrt-user-guide/installation/configure-mycrt.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.
