Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Add database and uninstall docs for manual setup (#1181)
Leendert de Borsta14066c43f8d
diff --git a/docs/installation/index.md b/docs/installation/index.mdindex a311978d5..0af6c28ba 100644--- a/docs/installation/index.md+++ b/docs/installation/index.md@@ -15,15 +15,15 @@ AliasVault can be self-hosted on your own servers using two different installati[Install AliasVault via installer script (multi-container)](./installer){: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 }> **Best for:**-> - VM or LXC (Proxmox, DigitalOcean Droplet, VPS, AWS/Azure VM)-> - Any other host that is directly accessible from the internet and/or has ports 80/443 forwarded to it-> - When you don't have any SSL termination proxy of your own (yet)+> - VM or LXC (e.g. Proxmox, DigitalOcean Droplet, VPS, AWS/Azure VM)+> - When the host is directly accessible from the internet and/or has ports 80/443 forwarded to it+> - When you don't have any TLS termination proxy of your own (yet)This option installs the full AliasVault stack **consisting of multiple Docker containers** (client, api, ppostgres, task runner, smtp, admin, reverse proxy) in the background.The `install.sh` script provides:- **Automatic configuration of docker-compose.yml with multiple containers**-- **Built-in reverse proxy with Let's Encrypt SSL**+- **Built-in reverse proxy with Let's Encrypt TLS certificates**- **Easy updates and migrations** via a custom CLI- **Start/stop/uninstall commands** for convenience- Allows to build Docker containers from source (optional)@@ -37,8 +37,8 @@ The `install.sh` script provides:> **Best for:**-> - Single home servers / NAS (Synology, Unraid, Raspberry Pi, local Docker)-> - Advanced users with existing shared SSL infrastructure (Traefik, Nginx, HAProxy, Caddy, etc.)+> - Multi-purpose home servers / NAS (Synology, Unraid, Raspberry Pi, local Docker)+> - Users with existing shared TLS/SSL infrastructure (Traefik, Nginx, HAProxy, Caddy, etc.)This option runs AliasVault as a **single bundled Docker container** (client, API, Postgres, task runner, SMTP, etc. included).@@ -46,7 +46,7 @@ Everything is managed via **standard Docker commands**:- Updates are done manually with `docker pull`- In some cases, future updates may require **manual migration steps** (these will be documented)- Certain admin actions (e.g. resetting a password) require **manual container access via SSH**-- SSL termination not included (you must handle HTTPS yourself separately)+- TLS/SSL termination not included (you must handle HTTPS yourself separately)-👉 Use this option if you **already manage SSL**, have an existing host where you are running other Docker apps already, and/or prefer to run AliasVault behind your own reverse proxy setup.+👉 Use this option if you **already manage TLS/SSL**, have an existing host where you are running other Docker apps already, and/or prefer to manage the AliasVault Docker container with existing management tools like Portainer.diff --git a/docs/installation/installer/advanced/uninstall.md b/docs/installation/installer/advanced/uninstall.mdindex 665361129..825593e6e 100644--- a/docs/installation/installer/advanced/uninstall.md+++ b/docs/installation/installer/advanced/uninstall.md@@ -8,7 +8,7 @@ nav_order: 4# Uninstall-To uninstall AliasVault, run the install script with the `uninstall` option. This will stop and remove the AliasVault containers, remove the Docker images, and delete the .env file.+To uninstall AliasVault, run the install script with the `uninstall` option. This will stop and remove the AliasVault containers and remove any local AliasVault Docker images.{: .note }This will not delete any data stored in the database. If you wish to delete all data, you should manually delete the `database` directory and the other directories created by AliasVault.diff --git a/docs/installation/installer/index.md b/docs/installation/installer/index.mdindex 8449663ef..0342b66d3 100644--- a/docs/installation/installer/index.md+++ b/docs/installation/installer/index.md@@ -19,7 +19,7 @@ The following guide will walk you through the steps to install AliasVault on you---## 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.+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.### Installation steps1. Download the install script to a directory of your choice. All AliasVault files and directories will be created in this directory.@@ -47,10 +47,10 @@ chmod +x install.sh----## 2. SSL configuration-The default installation will create a self-signed SSL certificate and configure Nginx to use it. This is sufficient for local deployments using only the web-app, however the mobile apps (iOS and Android) require a valid (external) SSL certificate to be able to connect.+## 2. TLS/SSL configuration+The default installation will create a self-signed TLS/SSL certificate and configure Nginx to use it. This is sufficient for local deployments using only the web-app, however the mobile apps (iOS and Android) require a valid (external) SSL certificate to be able to connect.-To generate a valid external SSL certificate for AliasVault, you can use Let's Encrypt via a built-in helper tool. In order to make this work you will need the following:+To generate a valid external TLS/SSL certificate for AliasVault, you can use Let's Encrypt via a built-in helper tool. 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@@ -64,8 +64,8 @@ To generate a valid external SSL certificate for AliasVault, you can use Let's E```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+### Reverting to self-signed TLS/SSL+If at any point you would like to revert to the self-signed TLS/SSL certificate, run the install script again with the `configure-ssl` optionand then in the prompt choose option 2.---diff --git a/docs/installation/installer/troubleshooting.md b/docs/installation/installer/troubleshooting.mdindex 91699af0d..b8ee1bf78 100644--- a/docs/installation/installer/troubleshooting.md+++ b/docs/installation/installer/troubleshooting.md@@ -70,13 +70,13 @@ docker compose psdocker compose logs postgres```-### 2. SSL Certificate Issues+### 2. TLS/SSL Certificate Issues**Symptoms:**-- Browser shows SSL errors+- Browser shows TLS/SSL errors**Steps:**-1. Check the certbot container logs if SSL certificates are being correctly renewed:+1. Check the certbot container logs if TLS/SSL certificates are being correctly renewed:```bashdocker compose logs certbot```@@ -86,7 +86,7 @@ docker compose logs certbotdocker compose logs reverse-proxy```-3. In case the SSL certificates are being correctly renewed, but the browser still shows SSL errors, try to restart AliasVault manually in order to force the NGINX container to reload the SSL certificates:+3. In case the SSL certificates are being correctly renewed, but the browser still shows TLS/SSL errors, try to restart AliasVault manually in order to force the NGINX container to reload the TLS/SSL certificates:```bash./install.sh restart```diff --git a/docs/installation/manual/advanced/database.md b/docs/installation/manual/advanced/database.mdindex d4f0dd357..0ad71df8b 100644--- a/docs/installation/manual/advanced/database.md+++ b/docs/installation/manual/advanced/database.md@@ -7,19 +7,26 @@ nav_order: 4---# Database Operations-This page explains how to import/export on the AliasVault server database via the `./install.sh` script.+This page explains how to import/export on the AliasVault server database via Docker commands.## Database Export-In order to backup the AliasVault server database (which includes all encrypted user vaults as well), you can use the `install.sh` script. This script will stop all services, export the database to a file, and then restart the services.+In order to backup the AliasVault server database (which includes all encrypted user vaults as well), you can use the following command. Run this command from the directory where your AliasVault `docker-compose.yml` is located.```bash-./install.sh db-backup > backup.sql.gz+docker compose exec aliasvault pg_dump -U aliasvault aliasvault > backup.sql```## Database Import-To restore a previously exported database, you can use the `install.sh` script. This script will stop all services, drop the database, import the database from a file, and then restart the services.+To restore a previously exported database, you can use the following snippet. Run these commands from the directory where your AliasVault `docker-compose.yml` is located.```bash-./install.sh db-restore < backup.sql.gz+# Drop database first (warning: this can't be undone!)+docker compose exec -T aliasvault psql -U postgres -d postgres -c "DROP DATABASE IF EXISTS aliasvault WITH (FORCE);"++# Create new empty database+docker compose exec -T aliasvault psql -U postgres -d postgres -c "CREATE DATABASE aliasvault;"++# Import backup+docker compose exec -T aliasvault psql -U postgres aliasvault < backup.sql```diff --git a/docs/installation/manual/advanced/uninstall.md b/docs/installation/manual/advanced/uninstall.mdindex 4487425ff..c01d69578 100644--- a/docs/installation/manual/advanced/uninstall.md+++ b/docs/installation/manual/advanced/uninstall.md@@ -8,13 +8,13 @@ nav_order: 4# Uninstall-To uninstall AliasVault, run the install script with the `uninstall` option. This will stop and remove the AliasVault containers, remove the Docker images, and delete the .env file.+To uninstall AliasVault, run the following command. This will stop and remove the AliasVault containers and remove the Docker images.{: .note }This will not delete any data stored in the database. If you wish to delete all data, you should manually delete the `database` directory and the other directories created by AliasVault.### Steps-1. Run the install script with the `uninstall` option+1. Run docker compose down and remove any local Docker images related to AliasVault.```bash-./install.sh uninstall+docker compose down --rmi all```diff --git a/docs/installation/manual/index.md b/docs/installation/manual/index.mdindex 8b137775c..680e7f66b 100644--- a/docs/installation/manual/index.md+++ b/docs/installation/manual/index.md@@ -6,13 +6,13 @@ nav_order: 2---# Self-host using manual setup (single container)-The following guide will walk you through the steps to install AliasVault via the All-In-One Docker container. This container uses `s6-overlay` to combine all AliasVault's services into one image for convenience. The only downside compared to the `install.sh` installer is that this version does NOT come with SSL support, so you'll have to make the container available through your own SSL proxy.+The following guide will walk you through the steps to install AliasVault via the All-In-One Docker container. This container uses `s6-overlay` to combine all AliasVault's services into one image for convenience. The only downside compared to the `install.sh` installer is that this version does NOT come with SSL/TLS support, so you'll have to make the container available through your own SSL/TLS proxy.{: .important-title }> Requirements:> - Docker (20.10+) and Docker Compose (2.0+) installed on your system> - See instructions: [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)-> - You have existing SSL proxy infrastructure (Traefik, Nginx, HAProxy, Cloudflare Tunnel)+> - You have existing SSL/TLS proxy infrastructure (Traefik, Nginx, HAProxy, Cloudflare Tunnel)> - Knowledge of working with direct Docker commands> - Knowledge of .yml and .env files@@ -63,12 +63,12 @@ services:----## 2. SSL configuration+## 2. SSL/TLS configurationHTTPS is required to use AliasVault for using:- Web app via non-localhost URLs (because of browser crypto restrictions)-- Mobile apps require the API URL to have a valid SSL certificate, otherwise the app refuses to connect via HTTPS+- Mobile apps require the API URL to have a valid TLS certificate, otherwise the app refuses to connect via HTTPS-Configure your existing SSL infrastructure (Traefik, Nginx, HAProxy, CloudFlare Tunnel) to make the AliasVault container available through HTTPS with a valid SSL certificate. E.g. `https://aliasvault.yourdomain.com`.+Configure your existing TLS infrastructure (Traefik, Nginx, HAProxy, CloudFlare Tunnel) to make the AliasVault container available through HTTPS with a valid SSL/TLS certificate. E.g. `https://aliasvault.yourdomain.com`.---diff --git a/docs/misc/dev/database-operations.md b/docs/misc/dev/database-operations.mdindex 2384e61ef..3cb2fb288 100644--- a/docs/misc/dev/database-operations.md+++ b/docs/misc/dev/database-operations.md@@ -58,8 +58,7 @@ gunzip < aliasvault.sql.gz | docker compose exec -iT postgres psql -U aliasvault```### Change master password-By default during initial installation the PostgreSQL master password is set to a random string that is-stored in the `.env` file with the `POSTGRES_PASSWORD` variable.+By default during initial installation the PostgreSQL master password is set to a random string that is stored in the `./secrets/postgres_password` secret file.If you wish to change the master password, you can do so by running the following command:@@ -74,7 +73,7 @@ If you wish to change the master password, you can do so by running the followin```4. Press Enter to confirm the changes.5. Exit the PostgreSQL shell by running `\q`.-6. Manually update the `.env` file variable `POSTGRES_PASSWORD` with the new password.+6. Manually update the `./secrets/postgres_password` secret file contents with the new password.7. Restart the AliasVault containers by running the following command:```bashdocker compose restart