> For the complete documentation index, see [llms.txt](https://documentation.opencrvs.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.opencrvs.org/technical/guides/installation/deploy-set-up-a-server-hosted-environment/3.3.4-set-up-an-smtp-server-for-opencrvs-monitoring-alerts.md).

# Pre-Deployment Checklist

This pre-deployment checklist can help ensure that each server environment is ready for you to go live:

<table><thead><tr><th>Step</th><th>Explanation</th></tr></thead><tbody><tr><td>Provisioning &#x26; Deployment pipelines for Backup, QA, staging &#x26; production working</td><td>Your Github Actions should all be running without any errors in logs. No red crosses!</td></tr><tr><td>SMTP service tested for emails and alerts</td><td>Not only should you confirm that emails are sending for staff, but you should receive emailed alerts too. If you have enabled Slack as the ALERT_EMAIL you would see an SSH login alert in Slack like this: <img src="/files/aSCghFA1sgCtnSAEmkNN" alt=""></td></tr><tr><td>Setup DNS &#x26; TLS (HTTPS)</td><td>Your SSL certificate should be valid. <img src="/files/LtJcdGOIM0cpkVfz7KXa" alt=""></td></tr><tr><td>Verify production backups restore on staging (pre-prod/mirror)</td><td>Ensure that a <a href="https://github.com/opencrvs/documentation/tree/master/v1.9.0/setup/3.-installation/3.3-set-up-a-server-hosted-environment/4.3.7-backup-and-restore">backup &#x26; restore</a> test is completed as documented.</td></tr><tr><td>Alert sent of SSH login</td><td>Ensure the SSH login alert is firing as mentioned above in the "SMTP service tested" description.</td></tr><tr><td>Verify a warning is received when disk space is at 50%, alert at 70%</td><td><p>To test this you need to create a temporary large file on your server. Kibana will broadcast an alert. <img src="/files/AUA3sUnfbESpicRpQJm3" alt=""> This example terminal command creates a file of 200G:</p><pre class="language-bash"><code class="lang-bash">sudo dd if=/dev/zero of=/large-file-to-trigger-alerts bs=200G count=100.
</code></pre></td></tr><tr><td>Optional: Confirm Sentry errors to Slack from QA, Staging and Prod</td><td>A test Sentry error in Slack looks something like this: <img src="/files/420hUU8H1aSjnJMnH3VZ" alt=""></td></tr><tr><td>Are National System Admin passwords updated, minimum 12 chars long and stored in a Password Manager.</td><td>The National System Admin must immediately change their password from the password that exists in <a href="https://github.com/opencrvs/opencrvs-countryconfig/blob/develop/src/data-seeding/employees/source/prod-employees.csv">prod-employees.csv</a> . As they are a super user, they must confirm that the new password is saved in a password manager tool.</td></tr><tr><td>Github account is owned by country and only approved users are admins</td><td>If users have "Admin" rights in your countryconfig repository they can potentially access citizen data.</td></tr><tr><td>Verify firewall hides all ports from the public internet</td><td><strong>OpenCRVS should not be accessible on the public internet.</strong> But if you decide to do this <strong>at your own risk</strong> then this command can help you discover open ports: <code>nmap --open opencrvs.domain.com</code></td></tr><tr><td>Clear all data from production instances created during testing</td><td><a href="/pages/PtH1fSjYssg8EtPQzVYv">Reset the production environment</a> so that it is clear of any test registrations.</td></tr><tr><td>Delete all test backups on backup server</td><td>SSH into the backup server and delete any test backups. Especially if you have configured the backup server to store more than the default 7 days of backups.</td></tr><tr><td>Delete all terminal history on all <strong>production</strong>, <strong>staging</strong> and <strong>backup</strong> servers</td><td><p>You might have exported secrets in Terminal to use when resetting environments or debugging. Clear the terminal history like this:</p><pre class="language-bash"><code class="lang-bash">history -c
</code></pre></td></tr><tr><td>Only approved users should have SSH access to production, staging &#x26; backup servers</td><td>SSH access must be removed for unnecessary users, otherwise they can still access citizen data. Follow the steps as <a href="/pages/G1NlQNmglQPpDD1MPdaw">documented</a>.</td></tr></tbody></table>


---

# 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://documentation.opencrvs.org/technical/guides/installation/deploy-set-up-a-server-hosted-environment/3.3.4-set-up-an-smtp-server-for-opencrvs-monitoring-alerts.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.
