Skip to content

Check if an email address exists without sending any email, written in Rust. Comes with a ⚙️ HTTP backend.

docs: Bring docs to main repo

Amaury2b73452ca711
diff --git a/.gitbook.yaml b/.gitbook.yaml
new file mode 100644
index 00000000..e454be0e
--- /dev/null
+++ b/.gitbook.yaml
@@ -0,0 +1 @@
+root: ./docs/
diff --git a/docs/.gitbook/assets/docs_cover.jpg b/docs/.gitbook/assets/docs_cover.jpg
new file mode 100644
index 00000000..73112440
Binary files /dev/null and b/docs/.gitbook/assets/docs_cover.jpg differ
diff --git a/docs/.gitbook/assets/undraw_Mail_sent_re_0ofv.png b/docs/.gitbook/assets/undraw_Mail_sent_re_0ofv.png
new file mode 100644
index 00000000..2eac1956
Binary files /dev/null and b/docs/.gitbook/assets/undraw_Mail_sent_re_0ofv.png differ
diff --git a/docs/.gitbook/assets/undraw_Server_re_twwj.png b/docs/.gitbook/assets/undraw_Server_re_twwj.png
new file mode 100644
index 00000000..463655af
Binary files /dev/null and b/docs/.gitbook/assets/undraw_Server_re_twwj.png differ
diff --git a/docs/.gitbook/assets/undraw_online_transactions_02ka.png b/docs/.gitbook/assets/undraw_online_transactions_02ka.png
new file mode 100644
index 00000000..b392e9dc
Binary files /dev/null and b/docs/.gitbook/assets/undraw_online_transactions_02ka.png differ
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 00000000..70bb73e1
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,28 @@
+---
+cover: .gitbook/assets/docs_cover.jpg
+coverY: 0
+layout:
+ cover:
+ visible: true
+ size: full
+ title:
+ visible: true
+ description:
+ visible: false
+ tableOfContents:
+ visible: true
+ outline:
+ visible: true
+ pagination:
+ visible: true
+---
+
+# Welcome to Reacher
+
+Reacher is an open-source email verification API.
+
+You can use Reacher to ensure the deliverability of your emails, clean your email lists, and prevent bounces. The API supports both individual email checks and bulk verification processes.
+
+### Jump right in
+
+<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Getting Started</strong></td><td>Verify your 1st email</td><td><a href=".gitbook/assets/undraw_Mail_sent_re_0ofv.png">undraw_Mail_sent_re_0ofv.png</a></td><td></td><td><a href="getting-started/quickstart.md">quickstart.md</a></td></tr><tr><td><strong>Self-Hosting</strong></td><td>Install Reacher in 20 min</td><td><a href=".gitbook/assets/undraw_Server_re_twwj.png">undraw_Server_re_twwj.png</a></td><td></td><td><a href="self-hosting/install.md">install.md</a></td></tr><tr><td><strong>Proxies</strong></td><td>Verify emails using a proxy</td><td><a href=".gitbook/assets/undraw_online_transactions_02ka.png">undraw_online_transactions_02ka.png</a></td><td></td><td><a href="self-hosting/proxies.md">proxies.md</a></td></tr></tbody></table>
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
new file mode 100644
index 00000000..5ded0799
--- /dev/null
+++ b/docs/SUMMARY.md
@@ -0,0 +1,23 @@
+# Table of contents
+
+* [Welcome to Reacher](README.md)
+
+## Getting Started
+
+* [Verify your 1st email](getting-started/quickstart.md)
+* [Understanding "is\_reachable"](getting-started/publish-your-docs.md)
+
+## Self-Hosting
+
+* [SaaS vs Self-Host](self-hosting/saas-vs-self-host.md)
+* [Install Reacher in 20min](self-hosting/install.md)
+* [Licensing](self-hosting/licensing.md)
+* [IP Health Maintenance](self-hosting/interactive-blocks.md)
+* [Proxies](self-hosting/proxies.md)
+* [Bulk Verification](self-hosting/bulk.md)
+* [Debugging Reacher](self-hosting/debugging-reacher.md)
+* [Docker Environment Variables](self-hosting/docker-environment-variables.md)
+
+## Advanced
+
+* [OpenAPI](advanced/openapi.md)
diff --git a/docs/advanced/openapi.md b/docs/advanced/openapi.md
new file mode 100644
index 00000000..6b2ccaf7
--- /dev/null
+++ b/docs/advanced/openapi.md
@@ -0,0 +1,7 @@
+# OpenAPI
+
+Below is the OpenAPI specification of Reacher's API endpoints.
+
+{% swagger src="https://raw.githubusercontent.com/reacherhq/check-if-email-exists/master/backend/openapi.json" path="/check_email" method="post" %}
+[https://raw.githubusercontent.com/reacherhq/check-if-email-exists/master/backend/openapi.json](https://raw.githubusercontent.com/reacherhq/check-if-email-exists/master/backend/openapi.json)
+{% endswagger %}
diff --git a/docs/getting-started/publish-your-docs.md b/docs/getting-started/publish-your-docs.md
new file mode 100644
index 00000000..bc224530
--- /dev/null
+++ b/docs/getting-started/publish-your-docs.md
@@ -0,0 +1,130 @@
+# Understanding "is\_reachable"
+
+## `is_reachable`?
+
+Reacher provides a confidence score for how likely an email is to be delivered. This score is shown in the `is_reachable` field and can have four values:
+
+* **`safe`**: This email is very likely to be delivered (bounce rate below 2%). Some bounces may still rarely occur due to IP blacklisting.
+* **`invalid`**: This email will almost certainly not be delivered.
+* **`risky`**: The email exists but may have problems that could cause issues like bounces or low engagement. These could be:
+ * A temporary (disposable) email
+ * A shared account (e.g., support@ or admin@)
+ * A catch-all address (accepts all emails for a domain)
+ * A full inbox
+* **`unknown`**: Sometimes, the email provider blocks our real-time verification, so we can’t determine deliverability. If you encounter this, let me know by email at [email protected]. I'm constantly working on ways to fix these issues case-by-case.
+
+## Full Response
+
+The full response contains more details about the email verification. It is provided in the following JSON format, with each field offering relevant information about the email deliverability.
+
+```json
+{
+ // The input email address that was checked
+ "input": "[email protected]",
+
+ // The deliverability status of the email (safe, risky, invalid or unknown)
+ "is_reachable": "invalid",
+
+ "misc": {
+ // Indicates if the email is a disposable (temporary) email
+ "is_disposable": false,
+
+ // Indicates if the email is a role-based account (e.g., admin@, support@)
+ "is_role_account": false,
+
+ // The URL to the Gravatar associated with this email, if available
+ "gravatar_url": null,
+
+ // Information from the "Have I Been Pwned" breach database, if applicable
+ "haveibeenpwned": null
+ },
+
+ "mx": {
+ // Whether the domain's MX (Mail Exchange) server accepts email
+ "accepts_mail": true,
+
+ // A list of MX records for the domain (email servers that handle mail)
+ "records": [
+ "gmail-smtp-in.l.google.com.",
+ "alt3.gmail-smtp-in.l.google.com.",
+ "alt2.gmail-smtp-in.l.google.com.",
+ "alt4.gmail-smtp-in.l.google.com.",
+ "alt1.gmail-smtp-in.l.google.com."
+ ]
+ },
+
+ "smtp": {
+ // Indicates if the SMTP server can be connected to
+ "can_connect_smtp": true,
+
+ // Whether the inbox for this email address is full
+ "has_full_inbox": false,
+
+ // Indicates if the domain uses a catch-all email address (accepts mail for any address)
+ "is_catch_all": false,
+
+ // Whether the email is deliverable based on SMTP verification
+ "is_deliverable": false,
+
+ // Whether the email address is disabled or inactive
+ "is_disabled": true
+ },
+
+ "syntax": {
+ // The original email address being checked
+ "address": "[email protected]",
+
+ // The domain part of the email (e.g., gmail.com)
+ "domain": "gmail.com",
+
+ // Whether the email has valid syntax (e.g., correct format)
+ "is_valid_syntax": true,
+
+ // The username part of the email (before the @ symbol)
+ "username": "someone",
+
+ // The normalized version of the email (no extra spaces, proper formatting)
+ "normalized_email": "[email protected]",
+
+ // A suggested correction if the email syntax was incorrect (null if no suggestion)
+ "suggestion": null
+ },
+
+ "smtp": {
+ // Details of the SMTP verification method used
+ "verif_method": {
+ // The type of verification (SMTP in this case)
+ "type": "Smtp",
+
+ // The SMTP server that was contacted for verification
+ "host": "alt1.gmail-smtp-in.l.google.com.",
+
+ // The port used to connect to the SMTP server
+ "port": 25,
+
+ // Indicates if a proxy was used during the verification
+ "used_proxy": false
+ }
+ },
+
+ "debug": {
+ // The server used to process the email verification
+ "server_name": "backend1-ovh",
+
+ // The time the verification process started
+ "start_time": "2024-09-18T21:53:16.012753011Z",
+
+ // The time the verification process ended
+ "end_time": "2024-09-18T21:53:16.350005307Z",
+
+ "duration": {
+ // The total time taken for the verification in seconds and nanoseconds
+ "secs": 0,
+ "nanos": 337252296
+ },
+ }
+}
+
+```
+
+You can also check the [openapi.md](../advanced/openapi.md "mention")specification.
diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md
new file mode 100644
index 00000000..e89810f7
--- /dev/null
+++ b/docs/getting-started/quickstart.md
@@ -0,0 +1,43 @@
+# Verify your 1st email
+
+There are two ways to verify an email with Reacher:
+
+1. Using the Reacher Dashboard (quick & easy).
+2. Using the Reacher API (more advanced and powerful).
+
+## 1. Using the Reacher Dashboard
+
+The easiest way to verify an email verification is to create a free account on [https://app.reacher.email](https://app.reacher.email).&#x20;
+
+Then simply input the email address you want to verify, and click on the "Verify" button:
+
+<figure><img src="../.gitbook/assets/Screenshot 2024-09-18 at 23.36.27.png" alt=""><figcaption><p>A screenshot of the Reacher Dashboard</p></figcaption></figure>
+
+You will get a response with an "`is_reachable`" field, which can take on of the four values: `safe`, `invalid`, `risky` or `unknown`. You can learn more about these 4 values in [publish-your-docs.md](publish-your-docs.md "mention").
+
+## 2. Using the Reacher API
+
+{% hint style="info" %}
+If you do not know what an API is, you can skip to the next page about [publish-your-docs.md](publish-your-docs.md "mention").
+{% endhint %}
+
+While the Reacher Dashboard offers a simple way to start verifying emails, the true potential of Reacher lies in its API. Through the API, you can integrate Reacher with your own applications, link it to platforms like Mailchimp or HubSpot, or even sync it with a CRM system.
+
+After creating an account on [https://app.reacher.email](https://app.reacher.email), you will receive an unique API token. You can then run the following `curl` command in your terminal:
+
+```bash
+curl -X POST \
+ https://api.reacher.email/v0/check_email \
+ -H 'content-type: application/json' \
+ -H 'authorization: <YOUR_API_TOKEN>' \
+ -d '{"to_email": "[email protected]"}'
+```
+
+```json
+// Output:
+{
+ "input":"[email protected]",
+ "is_reachable":"safe",
+ // --snip--
+}
+```
diff --git a/docs/self-hosting/bulk.md b/docs/self-hosting/bulk.md
new file mode 100644
index 00000000..def6eca9
--- /dev/null
+++ b/docs/self-hosting/bulk.md
@@ -0,0 +1,130 @@
+# Bulk Verification
+
+The default Reacher API only exposes one endpoint, `/v0/check_email`, which allows verifying one email at a time. The optional Bulk Verification API allows you to queue up a list of emails in one go.
+
+## Prerequisites
+
+* A self-hosted setup, see [install.md](install.md "mention").
+* A PostgreSQL database, you can start for free with [Supabase](https://supabase.com/) (no affiliation).
+
+## Get Started
+
+When running the Reacher backend, set two new environment variables:
+
+* &#x20;`RCH_ENABLE_BULK=1`
+* &#x20;`DATABASE_URL=<your_postgres_db>`
+
+For example, if running with docker, run
+
+```bash
+docker run \
+ -e RCH_ENABLE_BULK=1 \
+ -e DATABASE_URL=<your_postgres_db> \
+ # Other flags
+ reacherhq/backend:v0.7.0
+```
+
+The `DATABASE_URL` value should look like `postgres://<user>:<password>@<hostname>/<db_name>`.You should see the backend running with the following logs:
+
+```bash
+[2022-08-15T19:54:23Z INFO reacher] Running Reacher v0.7.0
+[2022-08-15T19:54:23Z INFO reacher] Bulk endpoints enabled.
+Server is listening on 0.0.0.0:8080.
+```
+
+## How does Bulk email verification work?
+
+&#x20;
+
+<figure><img src="https://www.notion.so/image/https%3A%2F%2Ffile.notion.so%2Ff%2Ff%2F8fc90893-c1e2-426b-8b22-6e4e323244db%2F3fff2c3e-e65f-4306-abbd-b4037760b517%2Fbulk.svg%3Ftable%3Dblock%26id%3D2090bf73-99bb-462b-90f2-57b0af6733ab%26spaceId%3D8fc90893-c1e2-426b-8b22-6e4e323244db%26expirationTimestamp%3D1726833600000%26signature%3DCMRYdgntz2SsZnL8Krlve4pJS6mUB666K64SV9CiTHM?table=block&#x26;id=2090bf73-99bb-462b-90f2-57b0af6733ab&#x26;cache=v2" alt="Flow chart describing the bulk verification process."><figcaption><p>Flow chart describing the bulk verification process.</p></figcaption></figure>
+
+Bulk email verification is done in 3 steps:
+
+#### **1. Submit a list of emails: `POST /v0/bulk`**
+
+The body of the request contains the list of emails, as well as a couple of configuration options.
+
+```json
+{
+ // Required fields:
+ "input_type": "array", // Must be "array". Future versions might allow CSV uploading.
+ "input": [ // Endpoint accepts a list of emails.
+ ],
+
+ // All fields below are optional:
+ "proxy": {
+ "host": "my.proxy.com",
+ "port": "9080",
+ "username": "user", // Optional authentication for proxy.
+ "password": "pass",
+ },
+ "hello_name": "my.domain.com", // The value to use in the EHLO handshake.
+ "from_email": "[email protected]", // The value to use in the MAIL FROM command.
+ "smtp_ports": [25, 587] // List of SMT ports to try for each email, in given order. Defaults to [25].
+}
+```
+
+If successful, this endpoint will return a unique job ID, used to track the progress of the bulk verification job and fetch its results.
+
+```json
+{
+ "job_id": 150970
+}
+```
+
+#### **2. Verify the status of the job: `GET /v0/bulk/{job_id}`**
+
+If the list of emails is long, then the bulk verification job can take some time. Ping regularly on the endpoint above to see the status of the job.When the job is still running, the `job_status` will be `Running`:
+
+```json
+{
+ "job_id": 150970, // From previous step.
+ "created_at": "2017-04-15T20:00:06:00.000Z", // Start time of the job.
+ "finished_at": null, // Stays `null` as long as job is still running.
+ "total_records": 24606,
+ "total_processed": 10, // Shows job progress.
+ "summary": { // Summary of the list's health.
+ "total_safe": 5,
+ "total_invalid": 2,
+ "total_risky": 2,
+ "total_unknown": 1
+ },
+ "job_status": "Running" // Wait for "Completed".
+}
+```
+
+And when the job is finished, we get `job_status = Completed`, and the `finished_at` field will be populated with the job’s end time.
+
+#### **3. Download the job results: `GET /v0/bulk/{job_id}/results`**
+
+Once the `job_status` field in from the previous step is `Completed`, this endpoint will show the results of all the emails in the list.
+
+```json
+{
+ "results": [
+ {
+ "input": "[email protected]",
+ "is_reachable": "risky",
+ // --snip: all fields--
+ },
+ // --snip: other results--
+ ]
+}
+```
+
+To avoid returning a huge JSON payload, the `results` array by default only returns the first 50 email results. We recommend using pagination on the client side, using the 2 following query parameters:
+
+* `?offset=<n>`: The offset from which we return the results, which is equivalent to the number of elements in the array to skip. Defaults to `0`.
+* `?limit=<n>`: The number of results to return. Defaults to `50`.
+
+For example, if your initial input has 100 emails to verify, and you want the results for emails #61-#70, you should add the query parameters: `GET /v0/bulk/{job_id}/results?offset=60&limit=10`.&#x20;
+
+{% hint style="success" %}
+Pro Tip: You can also download the results as CSV, by passing the `?format=csv` query paramter: `GET /v0/bulk/{job_id}/results?format=csv`.
+{% endhint %}
+
+## Questions?
+
+This Bulk email verification feature is still new, so feel free to send me an email [amaury](https://app.gitbook.com/u/F1LnsqPFtfUEGlcILLswbbp5cgk2 "mention").
diff --git a/docs/self-hosting/debugging-reacher.md b/docs/self-hosting/debugging-reacher.md
new file mode 100644
index 00000000..a3d131b2
--- /dev/null
+++ b/docs/self-hosting/debugging-reacher.md
@@ -0,0 +1,137 @@
+# Debugging Reacher
+
+## How to check if port 25 is open?
+
+When choosing a server to install Reacher on, you need to make sure that the server itself has port `25` open AND the chosen cloud provider allows outbound port `25` connections on its network.
+
+To test this, there are two methods:
+
+1. `curl` (try this first)
+2. `telnet` (more advanced)
+
+#### 1. Test port 25 with `curl`
+
+Paste the following command in the shell of your server.
+
+```bash
+curl -sSf --verbose -k smtp://alt1.gmail-smtp-in.l.google.com:25 --ssl-reqd --mail-from [email protected] --mail-rcpt [email protected]
+```
+
+<details>
+
+<summary>✅ Here's the expected output when port 25 works:</summary>
+
+```bash
+* About to connect() to alt1.gmail-smtp-in.l.google.com port 25 (#0)
+* Trying 142.250.153.26...
+* Connected to alt1.gmail-smtp-in.l.google.com (142.250.153.26) port 25 (#0)
+< 220 mx.google.com ESMTP he11-20020a1709073d8b00b006e862100d5bsi2937572ejc.396 - gsmtp
+> EHLO reacher
+< 250-mx.google.com at your service, [176.31.197.159]
+< 250-SIZE 157286400
+< 250-8BITMIME
+< 250-STARTTLS
+< 250-ENHANCEDSTATUSCODES
+< 250-PIPELINING
+< 250-CHUNKING
+< 250 SMTPUTF8
+> STARTTLS
+< 220 2.0.0 Ready to start TLS
+* Initializing NSS with certpath: sql:/etc/pki/nssdb
+* skipping SSL peer certificate verification
+* SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
+* Server certificate:
+* subject: CN=mx.google.com
+* start date: May 04 17:12:30 2022 GMT
+* expire date: Jul 27 17:12:29 2022 GMT
+* common name: mx.google.com
+* issuer: CN=GTS CA 1C3,O=Google Trust Services LLC,C=US
+> EHLO reacher
+< 250-mx.google.com at your service, [176.31.197.159]
+< 250-SIZE 157286400
+< 250-8BITMIME
+< 250-ENHANCEDSTATUSCODES
+< 250-PIPELINING
+< 250-CHUNKING
+< 250 SMTPUTF8
+> MAIL FROM:<[email protected]>
+< 250 2.1.0 OK he11-20020a1709073d8b00b006e862100d5bsi2937572ejc.396 - gsmtp
+> RCPT TO:<[email protected]>
+< 550-5.1.1 The email account that you tried to reach does not exist. Please try
+< 550-5.1.1 double-checking the recipient's email address for typos or
+< 550-5.1.1 unnecessary spaces. Learn more at
+< 550 5.1.1 https://support.google.com/mail/?p=NoSuchUser he11-20020a1709073d8b00b006e862100d5bsi2937572ejc.396 - gsmtp
+* RCPT failed: 550
+> QUIT
+< 221 2.0.0 closing connection he11-20020a1709073d8b00b006e862100d5bsi2937572ejc.396 - gsmtp
+* Closing connection 0
+curl: (55) RCPT failed: 55
+```
+
+</details>
+
+#### 2. Test port 25 with `telnet`
+
+Paste the following command in the shell of your server.
+
+```bash
+telnet alt1.gmail-smtp-in.l.google.com 25
+```
+
+<details>
+
+<summary>✅ Click to see expected output when port 25 is open:</summary>
+
+```bash
+# This means that connection to port 25 on Google's server is established.
+Trying 142.250.153.26...
+Connected to alt1.gmail-smtp-in.l.google.com.
+Escape character is '^]'.
+220 mx.google.com ESMTP t2-20020a056402524200b0041d70e3a2b0si10608932edd.55 - gsmtp
+# You can type 'QUIT' to quit this prompt
+```
+
+</details>
+
+<details>
+
+<summary>❌ Click to see unsuccessful output:</summary>
+
+```bash
+Trying 142.250.153.26...
+# This step can hang for a couple of seconds...
+telnet: Unable to connect to remote host: Connection refused
+```
+
+</details>
+
+## **Which cloud providers have port 25 open?**
+
+Here are details about some of the most well-known providers:
+
+* :warning: AWS: Needs an application to open port 25, link to [apply](https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/) (Dec 2020).
+* :warning: Digital Ocean: Your account needs to be 60d old, then you can [apply](https://www.digitalocean.com/community/questions/how-i-can-open-port-25-please?answer=67100) to open port 25 (Mar 2020).
+* ❌ GCP: Port 25 closed, [source](https://cloud.google.com/compute/docs/tutorials/sending-mail).
+* ❌ Heroku: Starting from July 2021, Heroku blocks port 25 intermittently according to [this document](https://help.heroku.com/IR3S6I5X/problem-in-sending-e-mails-through-smtp).
+* :warning: Hetzner: Port 25 open according to [unofficial source](https://www.reddit.com/r/hetzner/comments/lb2o13/does\_hetzner\_block\_port\_25/) (Feb 2021), but seems now that you need to request manually.
+* :warning: Linode: Port 25 closed for new accounts, but can be opened if reverse DNS is set up correctly, [source](https://www.linode.com/docs/guides/running-a-mail-server/#sending-email-on-linode=) (Apr 2022).
+* :white\_check\_mark: OVH: Port 25 open on new instances, but outbound port 25 traffic is monitored to prevent spam (May 2022).
+* :warning: Vultr: Create support ticket to open port 25, [source](https://www.vultr.com/docs/what-ports-are-blocked/), though [recent reports](https://github.com/LukeSmithxyz/emailwiz/issues/172) (May 2022) show that they won’t do it anymore.
+
+## **How can I debug `"is_reachable": "unknown"`?**
+
+In most cases, if you have a `TimeoutError`, it means that port 25 is closed. Refer to the questions above about opening port 25.
+
+In other cases, you can enable the `RUST_LOG=debug` environment variable on your server or on your Docker container. Then, by looking at the logs when performing an email verification, you can debug why `is_reachable` is unknown. Some example of logs you might find:
+
+* IP Blacklisted:
+
+ `5.7.1 Service unavailable; Client host [<YOUR_IP>] is blacklisted. Visit https://www.sophos.com/en-us/threat-center/ip-lookup.aspx?ip=<YOUR_IP> to request delisting`
+* Your `FROM` field does not match the reverse DNE\
+ `(mxgmx117) Nemesis ESMTP Service not available; No SMTP service;`
+
+For assistance in debugging these errors, please contact [amaury](https://app.gitbook.com/u/F1LnsqPFtfUEGlcILLswbbp5cgk2 "mention").
+
+## Contact me
+
+If you encounter any issue that you don't know how to solve, simply send me an email to [amaury](https://app.gitbook.com/u/F1LnsqPFtfUEGlcILLswbbp5cgk2 "mention").
diff --git a/docs/self-hosting/docker-environment-variables.md b/docs/self-hosting/docker-environment-variables.md
new file mode 100644
index 00000000..cc68f4f2
--- /dev/null
+++ b/docs/self-hosting/docker-environment-variables.md
@@ -0,0 +1,11 @@
+# Docker Environment Variables
+
+Reacher's software is available on [Docker Hub](https://hub.docker.com/r/reacherhq/backend/tags). You can get started using the default parameters:
+
+```bash
+docker run -p 8080:8080 reacherhq/backend:latest
+```
+
+Below are the environment variables used to configure the HTTP server. To pass them to the Docker container, use the `-e {ENV_VAR}={VALUE}` flag.
+
+<table><thead><tr><th width="220">Env Var</th><th width="107">Required?</th><th width="264">Description</th><th>Default</th></tr></thead><tbody><tr><td><code>RUST_LOG</code></td><td>No</td><td>One of <code>trace,debug,warn,error,info</code>. <code>RUST_LOG=debug</code> is very handful for debugging purposes.</td><td><code>info</code></td></tr><tr><td><code>RCH_HTTP_HOST</code></td><td>No</td><td>The host name to bind the HTTP server to.</td><td><code>0.0.0.0</code></td></tr><tr><td><code>PORT</code></td><td>No</td><td>The port to bind the HTTP server to, often populated by the cloud provider.</td><td><code>8080</code></td></tr><tr><td><code>RCH_SENTRY_DSN</code></td><td>No</td><td>If set, bug reports will be sent to this <a href="https://sentry.io">Sentry</a> DSN.</td><td>not defined</td></tr><tr><td><code>RCH_HEADER_SECRET</code></td><td>No</td><td>If set, then all HTTP requests must have the <code>x-reacher-secret</code> header set to this value. This is used to protect the backend against public unwanted HTTP requests.</td><td>undefined</td></tr><tr><td><code>RCH_FROM_EMAIL</code></td><td>No</td><td>Email to use in the <code>&#x3C;MAIL FROM:></code> SMTP step. Can be overwritten by each API request's <code>from_email</code> field.</td><td><a href="mailto:[email protected]">[email protected]</a></td></tr><tr><td><code>RCH_HELLO_NAME</code></td><td>No</td><td>Name to use in the <code>&#x3C;EHLO></code> SMTP step. Can be overwritten by each API request's <code>hello_name</code> field.</td><td>gmail.com</td></tr><tr><td><code>RCH_SMTP_TIMEOUT</code></td><td>No</td><td>Timeout for each SMTP connection.</td><td>45s</td></tr><tr><td><code>RCH_WEBDRIVER_ADDR</code></td><td>No</td><td>Set to a running WebDriver process endpoint (e.g. <code>http://localhost:9515</code>) to use a headless navigator to password recovery pages to check Yahoo and Hotmail/Outlook addresses. We recommend <code>chromedriver</code> as it allows parallel requests.</td><td><code>http://localhost:9515</code></td></tr><tr><td><strong>For Bulk Verification:</strong></td><td></td><td></td><td></td></tr><tr><td><code>RCH_ENABLE_BULK</code></td><td>No</td><td>If set to <code>1</code>, then bulk verification endpoints will be added to the backend.</td><td>0</td></tr><tr><td><code>DATABASE_URL</code></td><td>Yes if <code>RCH_ENABLE_BULK==1</code></td><td>[Bulk] Database connection string for storing results and task queue</td><td>not defined</td></tr><tr><td><code>RCH_DATABASE_MAX_CONNECTIONS</code></td><td>No</td><td>[Bulk] Connections created for the database pool</td><td>5</td></tr><tr><td><code>RCH_MINIMUM_TASK_CONCURRENCY</code></td><td>No</td><td>[Bulk] Minimum number of concurrent running tasks below which more tasks are fetched</td><td>10</td></tr><tr><td><code>RCH_MAXIMUM_CONCURRENT_TASK_FETCH</code></td><td>No</td><td>[Bulk] Maximum number of tasks fetched at once</td><td>20</td></tr></tbody></table>
diff --git a/docs/self-hosting/install.md b/docs/self-hosting/install.md
new file mode 100644
index 00000000..cd9fa87f
--- /dev/null
+++ b/docs/self-hosting/install.md
@@ -0,0 +1,71 @@
+# Install Reacher in 20min
+
+Reacher is built with self-hosting as a primary feature, giving you full control over how the service operates on your infrastructure. It can be deployed on a single server in under 20 minutes. This tutorial shows you how.
+
+{% hint style="info" %}
+You can run this tutorial without a Commercial License, as a Free Trial. Read more about the Free Trial in [licensing.md](licensing.md "mention").
+{% endhint %}
+
+## Choosing the right infrastructure
+
+The first choice to make is the cloud provider to run Reacher. Reacher is **stateless** by design, meaning you can deploy multiple containers, each running a separate instance of Reacher, to perform email verifications in parallel. This architecture enables easy horizontal scaling.
+
+{% hint style="info" %}
+If you enable [bulk.md](bulk.md "mention"), all Reacher instances will need to connect to the same Postgres database. They can still run independently, ensuring scalability and parallel processing.
+{% endhint %}
+
+However, for larger volume, it's important to manage the reputation of the IP addresses used for verifications, as poor IP will greatly decrease the quality of the results. Read more about [interactive-blocks.md](interactive-blocks.md "mention").
+
+To get started, using dedicated servers with fixed IPs is recommended, as this allows you to maintain control over the IPs' reputation. Alternatively, you can also outsource the IP health maintenance to a 3rd party, by using [proxies.md](proxies.md "mention").
+
+The tutorial below assumes a single dedicated server. Make sure that your cloud provider allows outgoing requests on port 25.
+
+## Step-by-Step Tutorial
+
+1. Install Docker on your server. You can follow [Docker's guide](https://docs.docker.com/engine/install/) for your OS.
+2. Run Reacher's [Docker image](https://hub.docker.com/r/reacherhq/backend):
+
+```bash
+docker run -p 8080:8080 reacherhq/backend:latest
+```
+
+You should see the following output:
+
+```bash
+2024-09-19T12:58:32.918254Z INFO reacher: Running Reacher version="0.7.0"
+Starting ChromeDriver 124.0.6367.78 (a087f2dd364ddd58b9c016ef1bf563d2bc138711-refs/branch-heads/6367@{#954}) on port 9515
+Only local connections are allowed.
+Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
+ChromeDriver was started successfully.
+2024-09-19T12:58:32.976589Z INFO reacher: Server is listening host=0.0.0.0 port=80
+```
+
+Advanced users can set additional [docker-environment-variables.md](docker-environment-variables.md "mention").
+
+3. Verify an email locally, from the shell of your server.
+
+```bash
+curl -X POST \
+ -H'Content-Type: application/json' \
+ -d'{"to_email":"[email protected]"}' \
+ http://localhost:8080/v0/check_email
+```
+
+{% hint style="warning" %}
+If this step hangs for a long time, or returns a JSON result with `is_reachable="unknown"`, it generally means that port 25 is restricted. See [debugging-reacher.md](debugging-reacher.md "mention")on how to fix this.
+{% endhint %}
+
+4. Make sure that you can verify an email remotely by running the following command from your local machine.
+
+```bash
+curl -X POST \
+ -H'Content-Type: application/json' \
+ -d'{"to_email":"[email protected]"}' \
+ http://<IP_OF_YOUR_SERVER>:8080/v0/check_email
+```
+
+5. If you see a JSON output with an `is_reachable` field, then you're set, congratulations! :tada:
+
+## Troubleshooting
+
+If you have any issue in one of the steps above, you can try [debugging-reacher.md](debugging-reacher.md "mention")yourself, or send me an email [amaury](https://app.gitbook.com/u/F1LnsqPFtfUEGlcILLswbbp5cgk2 "mention").
diff --git a/docs/self-hosting/interactive-blocks.md b/docs/self-hosting/interactive-blocks.md
new file mode 100644
index 00000000..80652c4b
--- /dev/null
+++ b/docs/self-hosting/interactive-blocks.md
@@ -0,0 +1,29 @@
+# IP Health Maintenance
+
+When running Reacher at scale, managing your **IP health** is crucial to maintaining high email verification accuracy and avoiding potential issues such as blacklisting. Since Reacher connects to email servers to verify addresses, the health of the IPs making these connections directly affects the success rate of your verification requests.
+
+Here are some best practices for maintaining IP health.
+
+## **Rotate IP Addresses**
+
+Constantly making requests from the same IP can lead to throttling or blacklisting, especially if you're performing high-volume verifications. Using an IP rotation service or proxy pools can help distribute the load and reduce the risk of any single IP being blocked.
+
+## Monitor IP Reputation
+
+Regularly check the reputation of the IP addresses you're using. Tools like Sender Score can help monitor your IP reputation. If one or more of your IPs gets flagged, it can impact the accuracy of email verifications, as some servers may block connections from poor IPs.
+
+## **Use Dedicated IPs**
+
+Consider using dedicated IPs for email verification. Shared IPs can sometimes have degraded reputations due to the behavior of other users sharing the same IP range. Dedicated IPs ensure that you maintain control over your reputation.
+
+## Warm Up IPs
+
+If you’re starting with a fresh set of IPs, begin with a lower verification volume and gradually increase the load. This process, known as **IP warming**, helps avoid immediate blacklisting and allows you to build a solid reputation with email servers over time.
+
+## Throttle Verification Requests
+
+Sending too many requests from a single IP in a short period can trigger rate limits or spam filters on email servers. Implement rate-limiting to space out requests and ensure smoother interactions with email servers.
+
+## Too Much Work? Use Proxies!
+
+Deploying Reacher generally requires a one-time setup with minimal ongoing maintenance. However, managing IP addresses can be more time-consuming over the long run. If you prefer to avoid the complexities of IP management, you can route all SMTP requests through a third-party service that handles IP health and reputation management for you. Read more about [proxies.md](proxies.md "mention").
diff --git a/docs/self-hosting/licensing.md b/docs/self-hosting/licensing.md
new file mode 100644
index 00000000..bbb37309
--- /dev/null
+++ b/docs/self-hosting/licensing.md
@@ -0,0 +1,27 @@
+---
+description: >-
+ Is Reacher open-source? Does it mean it's free? When should you pay for a
+ Commercial License?
+---
+
+# Licensing
+
+## Yes, Reacher is Open-Source
+
+Reacher is proudly open-source and distributed under the [**AGPL-3.0 license**](https://www.gnu.org/licenses/agpl-3.0.en.html) (GNU Affero General Public License). This license ensures that Reacher’s source code is freely available, and any modifications or improvements made to the code must also be shared under the same license.
+
+However, companies **cannot use** the open-source version if they plan to integrate Reacher into **proprietary software** or services without sharing their modifications. The AGPL-3.0 requires that if you offer the software as part of a web service, you must make your code (including any modifications) publicly available. For more details, check [GNU’s AGPL-3.0 guide](https://www.gnu.org/licenses/agpl-3.0.en.html).
+
+## Commercial License required for Proprietary applications
+
+The Commercial License allows companies to integrate Reacher into their proprietary software or services without being bound by the open-source license terms (such as making their own code publicly available). By obtaining a Commercial License, businesses can use Reacher with full control over how the software is implemented and distributed within their products.
+
+Check Reacher's [pricing page](https://reacher.email/pricing) to buy a Commercial License.
+
+{% hint style="info" %}
+Both the open-source and Commercial License give you access to the same Reacher software.
+{% endhint %}
+
+## Does Reacher offer a Free Trial?
+
+Yes, Reacher offers a **free trial** that allows you to use the self-hosted software for a limited time. During this period, you can test Reacher’s features for **internal testing** and **non-commercial purposes**. However, the trial is not intended for full-scale production use or commercial applications. To begin your trial, please contact [email protected], and you can then follow the guide to [install.md](install.md "mention").
diff --git a/docs/self-hosting/proxies.md b/docs/self-hosting/proxies.md
new file mode 100644
index 00000000..bf7cb105
--- /dev/null
+++ b/docs/self-hosting/proxies.md
@@ -0,0 +1,29 @@
+# Proxies
+
+## What is a SOCKS5 Proxy?
+
+A **SOCKS5 proxy** is a flexible proxy protocol that supports various types of traffic, including SMTP. When using it for email verifications, the reputation of the **proxy’s IP** is what matters, not your own IP. The proxy handles requests on your behalf, which helps protect your actual IP while ensuring verifications go through successfully. This is crucial for maintaining deliverability and avoiding issues like blacklisting.
+
+{% hint style="warning" %}
+SMTP email verifications are not possible via a traditional HTTP proxy.
+{% endhint %}
+
+## Verify an Email Using a Proxy
+
+Reacher's API allows making an email verification using a proxy. Send a request with the following fields:
+
+```json
+{
+ "to_email": "[email protected]",
+ "proxy": { // (optional) SOCK5 proxy to run the verification through, default is empty
+ "host": "my-proxy.io",
+ "port": 1080,
+ "username": "username", // (optional) Proxy username
+ "password": "password" // (optional) Proxy password
+ }
+}
+```
+
+## Which 3rd-party proxies does Reacher recommend?
+
+Please get in touch with [amaury](https://app.gitbook.com/u/F1LnsqPFtfUEGlcILLswbbp5cgk2 "mention")if you are interested in using a proxy.
diff --git a/docs/self-hosting/saas-vs-self-host.md b/docs/self-hosting/saas-vs-self-host.md
new file mode 100644
index 00000000..0486eef0
--- /dev/null
+++ b/docs/self-hosting/saas-vs-self-host.md
@@ -0,0 +1,26 @@
+# SaaS vs Self-Host
+
+When using Reacher, you have two options: using the **SaaS version** provided by Reacher or **self-hosting** the service on your own infrastructure. Each approach has unique advantages depending on your specific needs, technical resources, and how much control you want over the service.
+
+## What is Reacher SaaS?
+
+Reacher SaaS is the cloud-hosted version of the service, which is available at [https://app.reacher.email](https://app.reacher.email), where everything is managed for you. You can verify emails directly via the Reacher Dashboard without needing to worry about infrastructure, updates, or scaling.
+
+## What is Self-Hosting Reacher?
+
+Reacher is also designed for self-hosting, allowing you to run the service on your own servers. This option gives you full control over the environment and data while using the same powerful verification engine that Reacher SaaS provides.
+
+{% hint style="success" %}
+Reacher's goal is to make Self-Hosting easy. You can [install.md](install.md "mention").
+{% endhint %}
+
+## Key Differences
+
+| Feature | SaaS | Self-Hosting |
+| --------------------- | -------------------------------------- | -------------------------------------------------------------------------------- |
+| **Volume** | Limited to 10k verifications per month | Unlimited verifications |
+| **Cost** | Monthly subscription | Monthly subscription + your own server costs. Amortized costs for large volumes. |
+| **Setup Time** | Instant | Requires installation and setup |
+| **Maintenance** | Fully managed by Reacher | Managed by your IT team |
+| **Data Ownership** | Data stored on Reacher servers | Full ownership, no data is sent to Reacher |
+| **Bulk Verification** | No | Yes, see [bulk.md](bulk.md "mention") |