Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add email server docs (#422)

Leendert de Borsted5ea31ca825
diff --git a/docs/index.md b/docs/index.md
index 85eea72df..1552ad600 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -12,7 +12,7 @@ permalink: /
Open-source password and identity manager with email alias generation and zero-knowledge architecture.
{: .fs-6 .fw-300 }
-[Installation](./installation){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
+[Installation](./installation/install){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }
[View on GitHub](https://github.com/lanedirt/AliasVault){: .btn .fs-5 .mb-4 .mb-md-0 }
---
diff --git a/docs/installation/build-from-source.md b/docs/installation/advanced/build-from-source.md
similarity index 97%
rename from docs/installation/build-from-source.md
rename to docs/installation/advanced/build-from-source.md
index ac25ea288..f55e49442 100644
--- a/docs/installation/build-from-source.md
+++ b/docs/installation/advanced/build-from-source.md
@@ -1,7 +1,7 @@
---
layout: default
title: Build from Source
-parent: Installation Guide
+parent: Advanced
nav_order: 1
---
diff --git a/docs/installation/advanced/index.md b/docs/installation/advanced/index.md
new file mode 100644
index 000000000..6d27ac19d
--- /dev/null
+++ b/docs/installation/advanced/index.md
@@ -0,0 +1,9 @@
+---
+layout: default
+title: Advanced
+parent: Installation Guide
+nav_order: 2
+---
+
+# Advanced Installation
+The following guides provide more advanced installation options for AliasVault. These options are not required for the basic installation, but may be useful for advanced users.
diff --git a/docs/installation/manually-setup.md b/docs/installation/advanced/manual-setup.md
similarity index 99%
rename from docs/installation/manually-setup.md
rename to docs/installation/advanced/manual-setup.md
index 67147e528..a29168ab1 100644
--- a/docs/installation/manually-setup.md
+++ b/docs/installation/advanced/manual-setup.md
@@ -1,7 +1,7 @@
---
layout: default
title: Manual Setup
-parent: Installation Guide
+parent: Advanced
nav_order: 2
---
diff --git a/docs/installation/index.md b/docs/installation/index.md
index 30c6f9850..470b015ee 100644
--- a/docs/installation/index.md
+++ b/docs/installation/index.md
@@ -4,80 +4,5 @@ title: Installation Guide
nav_order: 2
---
-# Installation
-Follow the steps below to install AliasVault on your own server. Minimum experience with Docker and Linux is required.
-
-{: .toc }
-* TOC
-{:toc}
-
----
-
-## 1. Basic Installation
-To get AliasVault up and running quickly, run the install script to pull pre-built Docker images. The install script will also configure the .env file and start the AliasVault containers. You can get up and running in less than 5 minutes.
-
-### Hardware requirements
-- Linux VM with root access (Ubuntu or RHEL based distros recommended)
-- 1 vCPU
-- 512MB RAM
-- 16GB disk space
-- Docker installed
-
-### Installation steps
-1. Download the install script to a directory of your choice. All AliasVault files and directories will be created in this directory.
-```bash
-curl -o install.sh https://raw.githubusercontent.com/lanedirt/AliasVault/main/install.sh
-```
-2. Make the install script executable.
-```bash
-chmod +x install.sh
-```
-3. Run the install script. This will create the .env file, pull the Docker images, and start the AliasVault containers. Follow the on-screen prompts to configure AliasVault.
-```bash
-./install.sh install
-```
-> **Note**: AliasVault binds to ports 80 and 443 by default. If you want to change the default AliasVault ports you can do so in the `docker-compose.yml` file for the `reverse-proxy` (nginx) container. Afterwards re-run the `./install.sh install` command to restart the containers with the new port settings.
-
-3. After the script completes, you can access AliasVault at:
- - Client: `https://localhost`
- - Admin: `https://localhost/admin`
-
----
-
-## 2. SSL configuration
-The default installation will create a self-signed SSL certificate and configure Nginx to use it.
-
-You can however also use Let's Encrypt to generate valid SSL certificates and configure Nginx to use it. In order to make this work you will need the following:
-
-- A public IPv4 address assigned to your server
-- Port 80 and 443 on your server must be open and accessible from the internet
-- A registered domain name with an A record pointing to your server's public IP address (e.g. mydomain.com)
-
-
-### Steps
-
-1. Run the install script with the `configure-ssl` option
-```bash
-./install.sh configure-ssl
-```
-2. Follow the prompts to configure Let's Encrypt.
-
-### Reverting to self-signed SSL
-If at any point you would like to revert to the self-signed SSL certificate, run the install script again with the `configure-ssl` option
-and then in the prompt choose option 2.
-
----
-
-## 3. Troubleshooting
-
-### Resetting the admin password
-If you have lost your admin password, you can reset it by running the install script with the `reset-password` option. This will generate a new random password and update the .env file with it. After that it will restart the AliasVault containers to apply the changes.
-```bash
-./install.sh reset-password
-```
-
-### Verbose output
-If you need more detailed output from the install script, you can run it with the `--verbose` option. This will print more information to the console.
-```bash
-./install.sh install --verbose
-```
+# Installation Guide
+The following guide will walk you through the steps to install AliasVault on your own server. Minimum experience with Docker and Linux is required.
diff --git a/docs/installation/install.md b/docs/installation/install.md
new file mode 100644
index 000000000..59138ff1b
--- /dev/null
+++ b/docs/installation/install.md
@@ -0,0 +1,149 @@
+---
+layout: default
+title: Basic Install
+parent: Installation Guide
+nav_order: 1
+---
+
+# Basic Install
+The following guide will walk you through the steps to install AliasVault on your own server. Minimum experience with Docker and Linux is required.
+
+{: .toc }
+* TOC
+{:toc}
+
+---
+
+## 1. Basic Installation
+To get AliasVault up and running quickly, run the install script to pull pre-built Docker images. The install script will also configure the .env file and start the AliasVault containers. You can get up and running in less than 5 minutes.
+
+### Hardware requirements
+- Linux VM with root access (Ubuntu or RHEL based distros recommended)
+- 1 vCPU
+- 512MB RAM
+- 16GB disk space
+- Docker installed
+
+### Installation steps
+1. Download the install script to a directory of your choice. All AliasVault files and directories will be created in this directory.
+```bash
+curl -o install.sh https://raw.githubusercontent.com/lanedirt/AliasVault/main/install.sh
+```
+2. Make the install script executable.
+```bash
+chmod +x install.sh
+```
+3. Run the install script. This will create the .env file, pull the Docker images, and start the AliasVault containers. Follow the on-screen prompts to configure AliasVault.
+```bash
+./install.sh install
+```
+> **Note**: AliasVault binds to ports 80 and 443 by default. If you want to change the default AliasVault ports you can do so in the `docker-compose.yml` file for the `reverse-proxy` (nginx) container. Afterwards re-run the `./install.sh install` command to restart the containers with the new port settings.
+
+3. After the script completes, you can access AliasVault at:
+ - Client: `https://localhost`
+ - Admin: `https://localhost/admin`
+
+---
+
+## 2. SSL configuration
+The default installation will create a self-signed SSL certificate and configure Nginx to use it.
+
+You can however also use Let's Encrypt to generate valid SSL certificates and configure Nginx to use it. In order to make this work you will need the following:
+
+- A public IPv4 address assigned to your server
+- Port 80 and 443 on your server must be open and accessible from the internet
+- A registered domain name with an A record pointing to your server's public IP address (e.g. mydomain.com)
+
+### Steps
+
+1. Run the install script with the `configure-ssl` option
+```bash
+./install.sh configure-ssl
+```
+2. Follow the prompts to configure Let's Encrypt.
+
+### Reverting to self-signed SSL
+If at any point you would like to revert to the self-signed SSL certificate, run the install script again with the `configure-ssl` option
+and then in the prompt choose option 2.
+
+---
+
+## 3. Email Server Setup
+
+AliasVault includes a built-in email server that can handle multiple custom domains for your aliases.
+
+To set up the email server, you need the following:
+- Public IPv4 address
+- Access to DNS record management for your domain
+- Open ports (25 and 587) in server firewall for SMTP traffic
+
+### a) DNS Configuration
+Configure the following DNS records for your domain:
+
+| Name | Type | Content | TTL |
+|------|------|---------------------------|-----|
+| mail | A | `<your-server-public-ip>` | 3600 |
+| @ | MX | `mail.<your-domain>` | 3600 |
+
+> Note: Replace `<your-server-public-ip>` and `<your-domain>` with your actual values.
+
+### b) Port Configuration
+The email server requires the following ports to be open:
+- Port 25: Standard SMTP (unencrypted)
+- Port 587: SMTP with STARTTLS (encrypted)
+
+#### Verifying Port Access
+You can test if the SMTP ports are correctly configured using telnet:
+
+```bash
+# Test standard SMTP port
+telnet <your-server-public-ip> 25
+
+# Test secure SMTP port
+telnet <your-server-public-ip> 587
+```
+
+If successful, you'll see a connection establishment message. Press Ctrl+C to exit the telnet session.
+
+### c) Setting Up Email Domains
+
+1. Run the email configuration script:
+ ```bash
+ ./install.sh configure-email
+ ````
+2. Follow the interactive prompts to:
+ - Configure your domain(s)
+ - Restart required services
+
+3. Once configured, you can:
+ - Create new aliases in the AliasVault client
+ - Use your custom domain(s) for email addresses
+ - Start receiving emails on your aliases
+
+{: .note }
+Important: DNS propagation can take up to 24-48 hours. During this time, email delivery might be inconsistent.
+
+If you encounter any issues, feel free to open an issue on the [GitHub repository](https://github.com/lanedirt/AliasVault/issues).
+
+---
+
+## 4. Troubleshooting
+
+### Resetting the admin password
+If you have lost your admin password, you can reset it by running the install script with the `reset-password` option. This will generate a new random password and update the .env file with it. After that it will restart the AliasVault containers to apply the changes.
+```bash
+./install.sh reset-password
+```
+
+### Verbose output
+If you need more detailed output from the install script, you can run it with the `--verbose` option. This will print more information to the console.
+```bash
+./install.sh install --verbose
+```
+
+### No emails being received
+If you are not receiving emails on your aliases, check the following:
+- Verify DNS records are correctly configured
+- Ensure ports 25 and 587 are accessible
+- Check your server's firewall settings
+- Verify that your ISP/hosting provider allows SMTP traffic
diff --git a/docs/installation/start-stop.md b/docs/installation/start-stop.md
index 459eee4d5..ea7631200 100644
--- a/docs/installation/start-stop.md
+++ b/docs/installation/start-stop.md
@@ -2,7 +2,7 @@
layout: default
title: Start/stop
parent: Installation Guide
-nav_order: 3
+nav_order: 2
---
# Starting and stopping AliasVault
diff --git a/docs/installation/uninstall.md b/docs/installation/uninstall.md
index 2dcd6032e..7cb178a00 100644
--- a/docs/installation/uninstall.md
+++ b/docs/installation/uninstall.md
@@ -2,7 +2,7 @@
layout: default
title: Uninstall
parent: Installation Guide
-nav_order: 5
+nav_order: 4
---
# Uninstall
@@ -16,4 +16,4 @@ This will not delete any data stored in the database. If you wish to delete all
1. Run the install script with the `uninstall` option
```bash
./install.sh uninstall
-```
\ No newline at end of file
+```
diff --git a/docs/installation/update.md b/docs/installation/update.md
index 47b05fba5..c19a7242c 100644
--- a/docs/installation/update.md
+++ b/docs/installation/update.md
@@ -2,7 +2,7 @@
layout: default
title: Update
parent: Installation Guide
-nav_order: 4
+nav_order: 3
---
# Updating AliasVault