# 📋 AI-Impress Complete Server Administration Report

> **Generated:** 2025-11-04 06:00:01  
> **Server:** ai-impress-prod  
> **IP:** 51.89.231.46  
> **Purpose:** Full system overview for administrators

---

## 📑 TABLE OF CONTENTS

1. [Quick Summary](#quick-summary) - System overview at a glance
2. [System Health](#system-health) - Critical services & websites status
3. [All Services](#all-services) - Docker containers inventory
4. [Websites & Access](#websites--access) - URLs and authentication
5. [Databases](#databases) - Database management & backups
6. [Storage & Backups](#storage--backups) - Disk usage and backup status
7. [Networks](#networks) - Docker networking configuration
8. [Secrets & Passwords](#secrets--passwords) - Vault access & structure
9. [How To Guides](#how-to-guides) - Common administrative tasks
10. [Troubleshooting](#troubleshooting) - Fix common problems
11. [System Architecture](#system-architecture) - System design & dependencies

---

## 1️⃣ QUICK SUMMARY

### System Overview

| **Metric** | **Value** |
|------------|-----------|
| **Hostname** | ai-impress-prod |
| **Uptime** | up 18 hours, 16 minutes |
| **OS** | Ubuntu 24.04.3 LTS |
| **Kernel** | 6.8.0-87-generic |
| **Memory** | 10Gi / 57Gi |
| **Disk (/)** | 42G / 387G (11%) |
| **Docker Containers** | 48 running / 48 total |
| **Unhealthy Containers** | 0 |
| **Databases Size** | 71M |
| **Backups Size** | 6.7G |
| **Docker Networks** | 12 |

---

## 2️⃣ SYSTEM HEALTH

### Critical Services Status

| Service | Status | Health | Notes |
|---------|--------|--------|-------|
## 1️⃣ QUICK SUMMARY

### System Overview

| **Metric** | **Value** |
|------------|-----------|
| **Hostname** | ai-impress-prod |
| **Uptime** | up 18 hours, 16 minutes |
| **OS** | Ubuntu 24.04.3 LTS |
| **Kernel** | 6.8.0-87-generic |
| **Memory** | 10Gi / 57Gi |
| **Disk (/)** | 42G / 387G (11%) |
| **Docker Containers** | 48 running / 48 total |
| **Unhealthy Containers** | 0 |
| **Databases Size** | 71M |
| **Backups Size** | 6.7G |
| **Docker Networks** | 12 |

---

## 2️⃣ SYSTEM HEALTH

### Critical Services Status

| Service | Status | Health | Notes |
|---------|--------|--------|-------|
| **traefik** | 🟡 Running | no healthcheck | Running normally |
| **traefik** | 🟡 Running | no healthcheck | Running normally |
| **postgres-main** | 🟢 Healthy | healthy | OK |
| **postgres-main** | 🟢 Healthy | healthy | OK |
| **redis-main** | 🟢 Healthy | healthy | OK |
| **redis-main** | 🟢 Healthy | healthy | OK |
| **vault** | 🟢 Healthy | healthy | OK |

---

## 3️⃣ ALL SERVICES

### Docker Containers Overview

| **vault** | 🟢 Healthy | healthy | OK |

---

## 3️⃣ ALL SERVICES

### Docker Containers Overview

- **Running:** 48 containers
- **Stopped:** 0 containers
- **Paused:** 0 containers

### Running Containers

- **Running:** 48 containers
- **Stopped:** 0 containers
- **Paused:** 0 containers

### Running Containers


#### 🟡 **alertmanager**

- **Status:** Up 15 hours
- **Image:** `prom/alertmanager:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 alertmanager`
- **Restart:** `docker restart alertmanager`
- **Stop:** `docker stop alertmanager`


#### 🟡 **alertmanager**

- **Status:** Up 15 hours
- **Image:** `prom/alertmanager:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 alertmanager`
- **Restart:** `docker restart alertmanager`
- **Stop:** `docker stop alertmanager`


#### 🟢 **authentik-postgres**

- **Status:** Up 18 hours (healthy)
- **Image:** `postgres:16-alpine`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-postgres`
- **Restart:** `docker restart authentik-postgres`
- **Stop:** `docker stop authentik-postgres`


#### 🟢 **authentik-proxy**

- **Status:** Up 16 hours (healthy)
- **Image:** `ghcr.io/goauthentik/proxy:2025.10`
- **Restarts:** 6
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-proxy`
- **Restart:** `docker restart authentik-proxy`
- **Stop:** `docker stop authentik-proxy`


#### 🟢 **authentik-postgres**

- **Status:** Up 18 hours (healthy)
- **Image:** `postgres:16-alpine`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-postgres`
- **Restart:** `docker restart authentik-postgres`
- **Stop:** `docker stop authentik-postgres`


#### 🟢 **authentik-redis**

- **Status:** Up 18 hours (healthy)
- **Image:** `redis:alpine`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-redis`
- **Restart:** `docker restart authentik-redis`
- **Stop:** `docker stop authentik-redis`


#### 🟢 **authentik-proxy**

- **Status:** Up 16 hours (healthy)
- **Image:** `ghcr.io/goauthentik/proxy:2025.10`
- **Restarts:** 6
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-proxy`
- **Restart:** `docker restart authentik-proxy`
- **Stop:** `docker stop authentik-proxy`


#### 🟢 **authentik-server**

- **Status:** Up 16 hours (healthy)
- **Image:** `ghcr.io/goauthentik/server:2025.10`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-server`
- **Restart:** `docker restart authentik-server`
- **Stop:** `docker stop authentik-server`


#### 🟢 **authentik-redis**

- **Status:** Up 18 hours (healthy)
- **Image:** `redis:alpine`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-redis`
- **Restart:** `docker restart authentik-redis`
- **Stop:** `docker stop authentik-redis`


#### 🟢 **authentik-server**

- **Status:** Up 16 hours (healthy)
- **Image:** `ghcr.io/goauthentik/server:2025.10`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-server`
- **Restart:** `docker restart authentik-server`
- **Stop:** `docker stop authentik-server`


#### 🟢 **authentik-worker**

- **Status:** Up 16 hours (healthy)
- **Image:** `ghcr.io/goauthentik/server:2025.10`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-worker`
- **Restart:** `docker restart authentik-worker`
- **Stop:** `docker stop authentik-worker`


#### 🟢 **authentik-worker**

- **Status:** Up 16 hours (healthy)
- **Image:** `ghcr.io/goauthentik/server:2025.10`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 authentik-worker`
- **Restart:** `docker restart authentik-worker`
- **Stop:** `docker stop authentik-worker`


#### 🟡 **blackbox-exporter**

- **Status:** Up 18 hours
- **Image:** `prom/blackbox-exporter:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 blackbox-exporter`
- **Restart:** `docker restart blackbox-exporter`
- **Stop:** `docker stop blackbox-exporter`


#### 🟡 **blackbox-exporter**

- **Status:** Up 18 hours
- **Image:** `prom/blackbox-exporter:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 blackbox-exporter`
- **Restart:** `docker restart blackbox-exporter`
- **Stop:** `docker stop blackbox-exporter`


#### 🟢 **cadvisor**

- **Status:** Up 15 hours (healthy)
- **Image:** `gcr.io/cadvisor/cadvisor:v0.47.0`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 cadvisor`
- **Restart:** `docker restart cadvisor`
- **Stop:** `docker stop cadvisor`


#### 🟢 **cadvisor**

- **Status:** Up 15 hours (healthy)
- **Image:** `gcr.io/cadvisor/cadvisor:v0.47.0`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 cadvisor`
- **Restart:** `docker restart cadvisor`
- **Stop:** `docker stop cadvisor`


#### 🟡 **documenso**

- **Status:** Up 18 hours
- **Image:** `documenso-custom:latest`
- **Restarts:** 0
- **Created:** 2025-10-31
- **View logs:** `docker logs -f --tail 100 documenso`
- **Restart:** `docker restart documenso`
- **Stop:** `docker stop documenso`


#### 🟡 **documenso**

- **Status:** Up 18 hours
- **Image:** `documenso-custom:latest`
- **Restarts:** 0
- **Created:** 2025-10-31
- **View logs:** `docker logs -f --tail 100 documenso`
- **Restart:** `docker restart documenso`
- **Stop:** `docker stop documenso`


#### 🟡 **evolution-api**

- **Status:** Up 18 hours
- **Image:** `atendai/evolution-api:latest`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 evolution-api`
- **Restart:** `docker restart evolution-api`
- **Stop:** `docker stop evolution-api`


#### 🟡 **grafana**

- **Status:** Up 15 hours
- **Image:** `grafana/grafana:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 grafana`
- **Restart:** `docker restart grafana`
- **Stop:** `docker stop grafana`


#### 🟡 **evolution-api**

- **Status:** Up 18 hours
- **Image:** `atendai/evolution-api:latest`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 evolution-api`
- **Restart:** `docker restart evolution-api`
- **Stop:** `docker stop evolution-api`


#### 🟡 **loki**

- **Status:** Up 18 hours
- **Image:** `grafana/loki:3.5.7`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 loki`
- **Restart:** `docker restart loki`
- **Stop:** `docker stop loki`


#### 🟡 **grafana**

- **Status:** Up 15 hours
- **Image:** `grafana/grafana:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 grafana`
- **Restart:** `docker restart grafana`
- **Stop:** `docker stop grafana`


#### 🟡 **n8n-shared**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-shared`
- **Restart:** `docker restart n8n-shared`
- **Stop:** `docker stop n8n-shared`


#### 🟡 **loki**

- **Status:** Up 18 hours
- **Image:** `grafana/loki:3.5.7`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 loki`
- **Restart:** `docker restart loki`
- **Stop:** `docker stop loki`


#### 🟡 **n8n-shared**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-shared`
- **Restart:** `docker restart n8n-shared`
- **Stop:** `docker stop n8n-shared`


#### 🟡 **n8n-worker-1**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-worker-1`
- **Restart:** `docker restart n8n-worker-1`
- **Stop:** `docker stop n8n-worker-1`


#### 🟡 **n8n-worker-2**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-worker-2`
- **Restart:** `docker restart n8n-worker-2`
- **Stop:** `docker stop n8n-worker-2`


#### 🟡 **n8n-worker-1**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-worker-1`
- **Restart:** `docker restart n8n-worker-1`
- **Stop:** `docker stop n8n-worker-1`


#### 🟡 **n8n-worker-3**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-worker-3`
- **Restart:** `docker restart n8n-worker-3`
- **Stop:** `docker stop n8n-worker-3`


#### 🟡 **n8n-worker-2**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-worker-2`
- **Restart:** `docker restart n8n-worker-2`
- **Stop:** `docker stop n8n-worker-2`


#### 🟡 **n8n-worker-4**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-worker-4`
- **Restart:** `docker restart n8n-worker-4`
- **Stop:** `docker stop n8n-worker-4`


#### 🟡 **n8n-worker-3**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-worker-3`
- **Restart:** `docker restart n8n-worker-3`
- **Stop:** `docker stop n8n-worker-3`


#### 🟡 **n8n-worker-4**

- **Status:** Up 18 hours
- **Image:** `n8nio/n8n:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 n8n-worker-4`
- **Restart:** `docker restart n8n-worker-4`
- **Stop:** `docker stop n8n-worker-4`


#### 🟡 **node-exporter**

- **Status:** Up 15 hours
- **Image:** `prom/node-exporter:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 node-exporter`
- **Restart:** `docker restart node-exporter`
- **Stop:** `docker stop node-exporter`


#### 🟡 **odoo**

- **Status:** Up 18 hours
- **Image:** `odoo:17`
- **Restarts:** 0
- **Created:** 2025-10-27
- **View logs:** `docker logs -f --tail 100 odoo`
- **Restart:** `docker restart odoo`
- **Stop:** `docker stop odoo`


#### 🟡 **node-exporter**

- **Status:** Up 15 hours
- **Image:** `prom/node-exporter:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 node-exporter`
- **Restart:** `docker restart node-exporter`
- **Stop:** `docker stop node-exporter`


#### 🟢 **outline**

- **Status:** Up 18 hours (healthy)
- **Image:** `outlinewiki/outline:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 outline`
- **Restart:** `docker restart outline`
- **Stop:** `docker stop outline`


#### 🟡 **odoo**

- **Status:** Up 18 hours
- **Image:** `odoo:17`
- **Restarts:** 0
- **Created:** 2025-10-27
- **View logs:** `docker logs -f --tail 100 odoo`
- **Restart:** `docker restart odoo`
- **Stop:** `docker stop odoo`


#### 🟡 **pgadmin**

- **Status:** Up 18 hours
- **Image:** `dpage/pgadmin4:9.9`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 pgadmin`
- **Restart:** `docker restart pgadmin`
- **Stop:** `docker stop pgadmin`


#### 🟢 **outline**

- **Status:** Up 18 hours (healthy)
- **Image:** `outlinewiki/outline:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 outline`
- **Restart:** `docker restart outline`
- **Stop:** `docker stop outline`


#### 🟡 **pgadmin**

- **Status:** Up 18 hours
- **Image:** `dpage/pgadmin4:9.9`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 pgadmin`
- **Restart:** `docker restart pgadmin`
- **Stop:** `docker stop pgadmin`


#### 🟡 **portainer**

- **Status:** Up 18 hours
- **Image:** `portainer/portainer-ce:latest`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 portainer`
- **Restart:** `docker restart portainer`
- **Stop:** `docker stop portainer`


#### 🟡 **portainer**

- **Status:** Up 18 hours
- **Image:** `portainer/portainer-ce:latest`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 portainer`
- **Restart:** `docker restart portainer`
- **Stop:** `docker stop portainer`


#### 🟢 **postgres-main**

- **Status:** Up 18 hours (healthy)
- **Image:** `postgres:16-alpine`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 postgres-main`
- **Restart:** `docker restart postgres-main`
- **Stop:** `docker stop postgres-main`


#### 🟢 **postiz-postgres**

- **Status:** Up 18 hours (healthy)
- **Image:** `postgres:16-alpine`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 postiz-postgres`
- **Restart:** `docker restart postiz-postgres`
- **Stop:** `docker stop postiz-postgres`


#### 🟢 **postgres-main**

- **Status:** Up 18 hours (healthy)
- **Image:** `postgres:16-alpine`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 postgres-main`
- **Restart:** `docker restart postgres-main`
- **Stop:** `docker stop postgres-main`


#### 🟢 **postiz-redis**

- **Status:** Up 18 hours (healthy)
- **Image:** `redis:7-alpine`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 postiz-redis`
- **Restart:** `docker restart postiz-redis`
- **Stop:** `docker stop postiz-redis`


#### 🟢 **postiz-postgres**

- **Status:** Up 18 hours (healthy)
- **Image:** `postgres:16-alpine`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 postiz-postgres`
- **Restart:** `docker restart postiz-postgres`
- **Stop:** `docker stop postiz-postgres`


#### 🟡 **postiz**

- **Status:** Up 18 hours
- **Image:** `ghcr.io/gitroomhq/postiz-app:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 postiz`
- **Restart:** `docker restart postiz`
- **Stop:** `docker stop postiz`


#### 🟢 **postiz-redis**

- **Status:** Up 18 hours (healthy)
- **Image:** `redis:7-alpine`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 postiz-redis`
- **Restart:** `docker restart postiz-redis`
- **Stop:** `docker stop postiz-redis`


#### 🟡 **prometheus**

- **Status:** Up 15 hours
- **Image:** `prom/prometheus:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 prometheus`
- **Restart:** `docker restart prometheus`
- **Stop:** `docker stop prometheus`


#### 🟡 **postiz**

- **Status:** Up 18 hours
- **Image:** `ghcr.io/gitroomhq/postiz-app:latest`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 postiz`
- **Restart:** `docker restart postiz`
- **Stop:** `docker stop postiz`


#### 🟡 **prometheus**

- **Status:** Up 15 hours
- **Image:** `prom/prometheus:latest`
- **Restarts:** 0
- **Created:** 2025-11-03
- **View logs:** `docker logs -f --tail 100 prometheus`
- **Restart:** `docker restart prometheus`
- **Stop:** `docker stop prometheus`


#### 🟡 **promtail**

- **Status:** Up 18 hours
- **Image:** `grafana/promtail:3.5.7`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 promtail`
- **Restart:** `docker restart promtail`
- **Stop:** `docker stop promtail`


#### 🟢 **rabbitmq**

- **Status:** Up 18 hours (healthy)
- **Image:** `rabbitmq:3.13-management-alpine`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 rabbitmq`
- **Restart:** `docker restart rabbitmq`
- **Stop:** `docker stop rabbitmq`


#### 🟡 **promtail**

- **Status:** Up 18 hours
- **Image:** `grafana/promtail:3.5.7`
- **Restarts:** 0
- **Created:** 2025-10-29
- **View logs:** `docker logs -f --tail 100 promtail`
- **Restart:** `docker restart promtail`
- **Stop:** `docker stop promtail`


#### 🟢 **realtime-dev.supabase-realtime**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/realtime:v2.51.11`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 realtime-dev.supabase-realtime`
- **Restart:** `docker restart realtime-dev.supabase-realtime`
- **Stop:** `docker stop realtime-dev.supabase-realtime`


#### 🟢 **rabbitmq**

- **Status:** Up 18 hours (healthy)
- **Image:** `rabbitmq:3.13-management-alpine`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 rabbitmq`
- **Restart:** `docker restart rabbitmq`
- **Stop:** `docker stop rabbitmq`


#### 🟢 **redis-main**

- **Status:** Up 18 hours (healthy)
- **Image:** `redis:7-alpine`
- **Restarts:** 0
- **Created:** 2025-10-16
- **View logs:** `docker logs -f --tail 100 redis-main`
- **Restart:** `docker restart redis-main`
- **Stop:** `docker stop redis-main`


#### 🟢 **realtime-dev.supabase-realtime**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/realtime:v2.51.11`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 realtime-dev.supabase-realtime`
- **Restart:** `docker restart realtime-dev.supabase-realtime`
- **Stop:** `docker stop realtime-dev.supabase-realtime`


#### 🟢 **redis-main**

- **Status:** Up 18 hours (healthy)
- **Image:** `redis:7-alpine`
- **Restarts:** 0
- **Created:** 2025-10-16
- **View logs:** `docker logs -f --tail 100 redis-main`
- **Restart:** `docker restart redis-main`
- **Stop:** `docker stop redis-main`


#### 🟢 **supabase-analytics**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/logflare:1.22.6`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-analytics`
- **Restart:** `docker restart supabase-analytics`
- **Stop:** `docker stop supabase-analytics`


#### 🟢 **supabase-analytics**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/logflare:1.22.6`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-analytics`
- **Restart:** `docker restart supabase-analytics`
- **Stop:** `docker stop supabase-analytics`


#### 🟢 **supabase-auth**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/gotrue:v2.180.0`
- **Restarts:** 1
- **Created:** 2025-10-27
- **View logs:** `docker logs -f --tail 100 supabase-auth`
- **Restart:** `docker restart supabase-auth`
- **Stop:** `docker stop supabase-auth`


#### 🟢 **supabase-auth**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/gotrue:v2.180.0`
- **Restarts:** 1
- **Created:** 2025-10-27
- **View logs:** `docker logs -f --tail 100 supabase-auth`
- **Restart:** `docker restart supabase-auth`
- **Stop:** `docker stop supabase-auth`


#### 🟢 **supabase-db**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/postgres:15.8.1.085`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-db`
- **Restart:** `docker restart supabase-db`
- **Stop:** `docker stop supabase-db`


#### 🟢 **supabase-db**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/postgres:15.8.1.085`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-db`
- **Restart:** `docker restart supabase-db`
- **Stop:** `docker stop supabase-db`


#### 🟡 **supabase-edge-functions**

- **Status:** Up 18 hours
- **Image:** `supabase/edge-runtime:v1.69.6`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-edge-functions`
- **Restart:** `docker restart supabase-edge-functions`
- **Stop:** `docker stop supabase-edge-functions`


#### 🟡 **supabase-edge-functions**

- **Status:** Up 18 hours
- **Image:** `supabase/edge-runtime:v1.69.6`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-edge-functions`
- **Restart:** `docker restart supabase-edge-functions`
- **Stop:** `docker stop supabase-edge-functions`


#### 🟢 **supabase-imgproxy**

- **Status:** Up 18 hours (healthy)
- **Image:** `darthsim/imgproxy:latest`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 supabase-imgproxy`
- **Restart:** `docker restart supabase-imgproxy`
- **Stop:** `docker stop supabase-imgproxy`


#### 🟢 **supabase-imgproxy**

- **Status:** Up 18 hours (healthy)
- **Image:** `darthsim/imgproxy:latest`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 supabase-imgproxy`
- **Restart:** `docker restart supabase-imgproxy`
- **Stop:** `docker stop supabase-imgproxy`


#### 🟢 **supabase-kong**

- **Status:** Up 18 hours (healthy)
- **Image:** `kong:latest`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 supabase-kong`
- **Restart:** `docker restart supabase-kong`
- **Stop:** `docker stop supabase-kong`


#### 🟢 **supabase-kong**

- **Status:** Up 18 hours (healthy)
- **Image:** `kong:latest`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 supabase-kong`
- **Restart:** `docker restart supabase-kong`
- **Stop:** `docker stop supabase-kong`


#### 🟢 **supabase-meta**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/postgres-meta:v0.91.6`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-meta`
- **Restart:** `docker restart supabase-meta`
- **Stop:** `docker stop supabase-meta`


#### 🟢 **supabase-meta**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/postgres-meta:v0.91.6`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-meta`
- **Restart:** `docker restart supabase-meta`
- **Stop:** `docker stop supabase-meta`


#### 🟢 **supabase-pooler**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/supavisor:2.7.0`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-pooler`
- **Restart:** `docker restart supabase-pooler`
- **Stop:** `docker stop supabase-pooler`


#### 🟢 **supabase-pooler**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/supavisor:2.7.0`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-pooler`
- **Restart:** `docker restart supabase-pooler`
- **Stop:** `docker stop supabase-pooler`


#### 🟡 **supabase-rest**

- **Status:** Up 18 hours
- **Image:** `postgrest/postgrest:latest`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 supabase-rest`
- **Restart:** `docker restart supabase-rest`
- **Stop:** `docker stop supabase-rest`


#### 🟡 **supabase-rest**

- **Status:** Up 18 hours
- **Image:** `postgrest/postgrest:latest`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 supabase-rest`
- **Restart:** `docker restart supabase-rest`
- **Stop:** `docker stop supabase-rest`


#### 🟢 **supabase-storage**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/storage-api:v1.28.0`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-storage`
- **Restart:** `docker restart supabase-storage`
- **Stop:** `docker stop supabase-storage`


#### 🟢 **supabase-storage**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/storage-api:v1.28.0`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-storage`
- **Restart:** `docker restart supabase-storage`
- **Stop:** `docker stop supabase-storage`


#### 🟢 **supabase-studio**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/studio:2025.10.01-sha-8460121`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-studio`
- **Restart:** `docker restart supabase-studio`
- **Stop:** `docker stop supabase-studio`


#### 🟢 **supabase-vector**

- **Status:** Up 18 hours (healthy)
- **Image:** `timberio/vector:latest-alpine`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 supabase-vector`
- **Restart:** `docker restart supabase-vector`
- **Stop:** `docker stop supabase-vector`


#### 🟢 **supabase-studio**

- **Status:** Up 18 hours (healthy)
- **Image:** `supabase/studio:2025.10.01-sha-8460121`
- **Restarts:** 0
- **Created:** 2025-10-26
- **View logs:** `docker logs -f --tail 100 supabase-studio`
- **Restart:** `docker restart supabase-studio`
- **Stop:** `docker stop supabase-studio`


#### 🟡 **traefik**

- **Status:** Up 18 hours
- **Image:** `traefik:latest`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 traefik`
- **Restart:** `docker restart traefik`
- **Stop:** `docker stop traefik`


#### 🟢 **supabase-vector**

- **Status:** Up 18 hours (healthy)
- **Image:** `timberio/vector:latest-alpine`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 supabase-vector`
- **Restart:** `docker restart supabase-vector`
- **Stop:** `docker stop supabase-vector`


#### 🟢 **uptime-kuma**

- **Status:** Up 18 hours (healthy)
- **Image:** `louislam/uptime-kuma:latest`
- **Restarts:** 0
- **Created:** 2025-10-27
- **View logs:** `docker logs -f --tail 100 uptime-kuma`
- **Restart:** `docker restart uptime-kuma`
- **Stop:** `docker stop uptime-kuma`


#### 🟡 **traefik**

- **Status:** Up 18 hours
- **Image:** `traefik:latest`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 traefik`
- **Restart:** `docker restart traefik`
- **Stop:** `docker stop traefik`


#### 🟢 **vaultwarden**

- **Status:** Up 18 hours (healthy)
- **Image:** `vaultwarden/server:1.30.5-alpine`
- **Restarts:** 0
- **Created:** 2025-10-27
- **View logs:** `docker logs -f --tail 100 vaultwarden`
- **Restart:** `docker restart vaultwarden`
- **Stop:** `docker stop vaultwarden`


#### 🟢 **uptime-kuma**

- **Status:** Up 18 hours (healthy)
- **Image:** `louislam/uptime-kuma:latest`
- **Restarts:** 0
- **Created:** 2025-10-27
- **View logs:** `docker logs -f --tail 100 uptime-kuma`
- **Restart:** `docker restart uptime-kuma`
- **Stop:** `docker stop uptime-kuma`


#### 🟢 **vaultwarden**

- **Status:** Up 18 hours (healthy)
- **Image:** `vaultwarden/server:1.30.5-alpine`
- **Restarts:** 0
- **Created:** 2025-10-27
- **View logs:** `docker logs -f --tail 100 vaultwarden`
- **Restart:** `docker restart vaultwarden`
- **Stop:** `docker stop vaultwarden`


#### 🟢 **vault**

- **Status:** Up 18 hours (healthy)
- **Image:** `0b85ae483e53`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 vault`
- **Restart:** `docker restart vault`
- **Stop:** `docker stop vault`


#### 🟡 **wikijs**

- **Status:** Up 11 hours
- **Image:** `ghcr.io/requarks/wiki:2`
- **Restarts:** 0
- **Created:** 2025-11-02
- **View logs:** `docker logs -f --tail 100 wikijs`
- **Restart:** `docker restart wikijs`
- **Stop:** `docker stop wikijs`


#### 🟢 **vault**

- **Status:** Up 18 hours (healthy)
- **Image:** `0b85ae483e53`
- **Restarts:** 0
- **Created:** 2025-10-30
- **View logs:** `docker logs -f --tail 100 vault`
- **Restart:** `docker restart vault`
- **Stop:** `docker stop vault`

---

## 4️⃣ WEBSITES & ACCESS

### Public Services Status

| Service | URL | Status | Purpose | Auth |
|---------|-----|--------|---------|------|

#### 🟡 **wikijs**

- **Status:** Up 11 hours
- **Image:** `ghcr.io/requarks/wiki:2`
- **Restarts:** 0
- **Created:** 2025-11-02
- **View logs:** `docker logs -f --tail 100 wikijs`
- **Restart:** `docker restart wikijs`
- **Stop:** `docker stop wikijs`

---

## 4️⃣ WEBSITES & ACCESS

### Public Services Status

| Service | URL | Status | Purpose | Auth |
|---------|-----|--------|---------|------|
| **Odoo** | https://odoo.ai-impress.com | ✅ OK (0.208693s) | ERP & Business Management | Direct Login |
| **Odoo** | https://odoo.ai-impress.com | ✅ OK (0.227383s) | ERP & Business Management | Direct Login |
| **N8N** | https://n8n.ai-impress.com | ✅ OK (0.078686s) | Workflow Automation | Authentik SSO |
| **N8N** | https://n8n.ai-impress.com | ✅ OK (0.061734s) | Workflow Automation | Authentik SSO |
| **Wiki (Outline)** | https://wiki.ai-impress.com | ✅ OK (0.090763s) | Main Knowledge Base | Authentik SSO |
| **Wiki (Outline)** | https://wiki.ai-impress.com | ✅ OK (0.060941s) | Main Knowledge Base | Authentik SSO |
| **Info (WikiJS)** | https://info.ai-impress.com | ✅ OK (0.190193s) | Additional Docs | Authentik SSO |
| **Info (WikiJS)** | https://info.ai-impress.com | ✅ OK (0.173463s) | Additional Docs | Authentik SSO |
| **Documenso** | https://sign.ai-impress.com | ✅ OK (0.151414s) | E-Signature Platform | Direct Login |
| **Documenso** | https://sign.ai-impress.com | ✅ OK (0.155459s) | E-Signature Platform | Direct Login |
| **Postiz** | https://social.ai-impress.com | ✅ OK (0.301273s) | Social Media Manager | Direct Login |
| **Postiz** | https://social.ai-impress.com | ✅ OK (0.313598s) | Social Media Manager | Direct Login |
| **Postiz Uploads** | https://uploads.ai-impress.com | ✅ OK (0.153256s) | Media Storage | Auto |
| **Postiz Uploads** | https://uploads.ai-impress.com | ✅ OK (0.161028s) | Media Storage | Auto |
| **Evolution API** | https://wpp.ai-impress.com | ✅ OK (0.342851s) | WhatsApp API | API Key |
| **Evolution API** | https://wpp.ai-impress.com | ✅ OK (0.344451s) | WhatsApp API | API Key |
| **Supabase** | https://supabase.ai-impress.com | ✅ OK (0.333936s) | Backend as a Service | Direct Login |
| **Supabase** | https://supabase.ai-impress.com | ✅ OK (0.341083s) | Backend as a Service | Direct Login |
| **RabbitMQ** | https://rabbitmq.ai-impress.com | ✅ OK (0.346383s) | Message Queue | Guest Login |
| **RabbitMQ** | https://rabbitmq.ai-impress.com | ✅ OK (0.370071s) | Message Queue | Guest Login |
| **Authentik** | https://auth.ai-impress.com | ✅ OK (0.210369s) | Single Sign-On (SSO) | Direct Login |
| **Authentik** | https://auth.ai-impress.com | ✅ OK (0.223452s) | Single Sign-On (SSO) | Direct Login |
| **Vault Admin** | https://vault-admin.ai-impress.com | ✅ OK (0.119515s) | Secrets Management UI | Root Token |
| **Vault Admin** | https://vault-admin.ai-impress.com | ✅ OK (0.078406s) | Secrets Management UI | Root Token |
| **Vaultwarden** | https://vault.ai-impress.com | ✅ OK (0.052053s) | Password Manager | Direct Login |
| **Vaultwarden** | https://vault.ai-impress.com | ✅ OK (0.079110s) | Password Manager | Direct Login |
| **Grafana** | https://grafana.ai-impress.com | ✅ OK (0.132376s) | Monitoring Dashboard | Admin Only |
| **Grafana** | https://grafana.ai-impress.com | ✅ OK (0.111017s) | Monitoring Dashboard | Admin Only |
| **Prometheus** | https://prometheus.ai-impress.com | ⚠️ No Response | Metrics Database | Admin Only |
| **Prometheus** | https://prometheus.ai-impress.com | ⚠️ No Response | Metrics Database | Admin Only |
| **Uptime Kuma** | https://status.ai-impress.com | ✅ OK (0.378285s) | Uptime Monitoring | Direct Login |
| **Uptime Kuma** | https://status.ai-impress.com | ✅ OK (0.378461s) | Uptime Monitoring | Direct Login |
| **Portainer** | https://portainer.ai-impress.com | ✅ OK (0.286022s) | Docker Management UI | Admin Only |
| **Portainer** | https://portainer.ai-impress.com | ✅ OK (0.325042s) | Docker Management UI | Admin Only |
| **Traefik** | https://traefik.ai-impress.com | ✅ OK (0.297369s) | Reverse Proxy Dashboard | Admin Only |
| **Traefik** | https://traefik.ai-impress.com | ✅ OK (0.303517s) | Reverse Proxy Dashboard | Admin Only |
| **pgAdmin** | https://pgadmin.ai-impress.com | ✅ OK (0.313358s) | PostgreSQL Admin | Direct Login |

### Service Categories

**📊 Business Operations:**
- Odoo - Complete ERP system
- N8N - Workflow automation and integrations

**📚 Documentation:**
- Outline (wiki.ai-impress.com) - Primary knowledge base
- WikiJS (info.ai-impress.com) - Additional documentation

**📱 Communication:**
- Postiz - Social media management
- Evolution API - WhatsApp business integration

**🔐 Security & Authentication:**
- Authentik - Central SSO provider
- Vault Admin - Secrets management
- Vaultwarden - Password manager (Bitwarden)

**📈 Monitoring & DevOps:**
- Grafana - Visual dashboards
- Prometheus - Metrics collection
- Uptime Kuma - Service monitoring
- Portainer - Docker management
- Traefik - Reverse proxy & routing

### How to Get Passwords from Vault

```bash
# SSH to server
ssh ubuntu@51.89.231.46

# Set Vault variables
export VAULT_ADDR="http://127.0.0.1:8200"
export VAULT_TOKEN="hvs.jYguDdf2IzobXG8b9QWyATV8"

# List all available secrets
vault kv list aimpress/

# Examples: Get specific passwords
vault kv get aimpress/odoo
vault kv get aimpress/authentik
vault kv get aimpress/grafana
vault kv get aimpress/postgres/admin
vault kv get aimpress/n8n
vault kv get aimpress/postiz
vault kv get aimpress/evolution-api
vault kv get aimpress/vaultwarden

# Get in JSON format
vault kv get -format=json aimpress/odoo | jq '.data.data'

# Get single field
vault kv get -field=password aimpress/odoo
```

### Quick Website Health Check

```bash
# Check all websites at once
for site in wiki n8n odoo auth grafana status portainer social sign wpp supabase; do
    echo -n "$site.ai-impress.com: "
    curl -s -o /dev/null -w "%{http_code}" --max-time 5 "https://$site.ai-impress.com"
    echo ""
done

# Check specific site in detail
curl -I https://wiki.ai-impress.com
```

### Service Ports (Internal)

| **pgAdmin** | https://pgadmin.ai-impress.com | ✅ OK (0.275701s) | PostgreSQL Admin | Direct Login |

### Service Categories

**📊 Business Operations:**
- Odoo - Complete ERP system
- N8N - Workflow automation and integrations

**📚 Documentation:**
- Outline (wiki.ai-impress.com) - Primary knowledge base
- WikiJS (info.ai-impress.com) - Additional documentation

**📱 Communication:**
- Postiz - Social media management
- Evolution API - WhatsApp business integration

**🔐 Security & Authentication:**
- Authentik - Central SSO provider
- Vault Admin - Secrets management
- Vaultwarden - Password manager (Bitwarden)

**📈 Monitoring & DevOps:**
- Grafana - Visual dashboards
- Prometheus - Metrics collection
- Uptime Kuma - Service monitoring
- Portainer - Docker management
- Traefik - Reverse proxy & routing

### How to Get Passwords from Vault

```bash
# SSH to server
ssh ubuntu@51.89.231.46

# Set Vault variables
export VAULT_ADDR="http://127.0.0.1:8200"
export VAULT_TOKEN="hvs.jYguDdf2IzobXG8b9QWyATV8"

# List all available secrets
vault kv list aimpress/

# Examples: Get specific passwords
vault kv get aimpress/odoo
vault kv get aimpress/authentik
vault kv get aimpress/grafana
vault kv get aimpress/postgres/admin
vault kv get aimpress/n8n
vault kv get aimpress/postiz
vault kv get aimpress/evolution-api
vault kv get aimpress/vaultwarden

# Get in JSON format
vault kv get -format=json aimpress/odoo | jq '.data.data'

# Get single field
vault kv get -field=password aimpress/odoo
```

### Quick Website Health Check

```bash
# Check all websites at once
for site in wiki n8n odoo auth grafana status portainer social sign wpp supabase; do
    echo -n "$site.ai-impress.com: "
    curl -s -o /dev/null -w "%{http_code}" --max-time 5 "https://$site.ai-impress.com"
    echo ""
done

# Check specific site in detail
curl -I https://wiki.ai-impress.com
```

### Service Ports (Internal)

- **grafana**: 3000/tcp
- **alertmanager**: 9093/tcp
- **cadvisor**: 8080/tcp
- **prometheus**: 9090/tcp
- **node-exporter**: 9100/tcp
- **pgadmin**: 80/tcp, 443/tcp
- **postgres-main**: 127.0.0.1:5432->5432/tcp
- **outline**: 3000/tcp
- **wikijs**: 3000/tcp, 3443/tcp
- **supabase-kong**: 127.0.0.1:8000->8000/tcp, 8001/tcp, 127.0.0.1:8443->8443/tcp, 8444/tcp
- **vault**: 127.0.0.1:8200->8200/tcp
- **supabase-imgproxy**: 8080/tcp
- **supabase-rest**: 3000/tcp
- **traefik**: 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 127.0.0.1:8080->8080/tcp
- **authentik-server**: 0.0.0.0:9000->9000/tcp, 0.0.0.0:9443->9443/tcp
- **authentik-proxy**: 9000/tcp, 9300/tcp, 9443/tcp
- **authentik-redis**: 6379/tcp
- **authentik-postgres**: 5432/tcp
- **n8n-shared**: 5678/tcp
- **n8n-worker-4**: 5678/tcp
- **n8n-worker-2**: 5678/tcp
- **n8n-worker-1**: 5678/tcp
- **n8n-worker-3**: 5678/tcp
- **blackbox-exporter**: 0.0.0.0:9115->9115/tcp
- **loki**: 0.0.0.0:3100->3100/tcp
- **postiz-postgres**: 5432/tcp
- **postiz-redis**: 6379/tcp
- **odoo**: 8069/tcp, 8071-8072/tcp
- **vaultwarden**: 80/tcp, 3012/tcp
- **uptime-kuma**: 3001/tcp
- **supabase-storage**: 5000/tcp
- **supabase-pooler**: 127.0.0.1:6543->6543/tcp, 127.0.0.1:54322->5432/tcp
- **supabase-meta**: 8080/tcp
- **supabase-studio**: 3000/tcp
- **supabase-analytics**: 127.0.0.1:4000->4000/tcp
- **supabase-db**: 5432/tcp
- **portainer**: 8000/tcp, 9000/tcp, 9443/tcp
- **evolution-api**: 8080/tcp
- **rabbitmq**: 4369/tcp, 5671/tcp, 15671-15672/tcp, 15691-15692/tcp, 25672/tcp, 127.0.0.1:5672->5672/tcp
- **redis-main**: 127.0.0.1:6379->6379/tcp
- **grafana**: 3000/tcp
- **alertmanager**: 9093/tcp
- **cadvisor**: 8080/tcp
- **prometheus**: 9090/tcp
- **node-exporter**: 9100/tcp
- **pgadmin**: 80/tcp, 443/tcp
- **postgres-main**: 127.0.0.1:5432->5432/tcp
- **outline**: 3000/tcp
- **wikijs**: 3000/tcp, 3443/tcp
- **supabase-kong**: 127.0.0.1:8000->8000/tcp, 8001/tcp, 127.0.0.1:8443->8443/tcp, 8444/tcp
- **vault**: 127.0.0.1:8200->8200/tcp
- **supabase-imgproxy**: 8080/tcp
- **supabase-rest**: 3000/tcp
- **traefik**: 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 127.0.0.1:8080->8080/tcp
- **authentik-server**: 0.0.0.0:9000->9000/tcp, 0.0.0.0:9443->9443/tcp
- **authentik-proxy**: 9000/tcp, 9300/tcp, 9443/tcp
- **authentik-redis**: 6379/tcp
- **authentik-postgres**: 5432/tcp
- **n8n-shared**: 5678/tcp
- **n8n-worker-4**: 5678/tcp
- **n8n-worker-2**: 5678/tcp
- **n8n-worker-1**: 5678/tcp
- **n8n-worker-3**: 5678/tcp
- **blackbox-exporter**: 0.0.0.0:9115->9115/tcp
- **loki**: 0.0.0.0:3100->3100/tcp
- **postiz-postgres**: 5432/tcp
- **postiz-redis**: 6379/tcp
- **odoo**: 8069/tcp, 8071-8072/tcp

### Common Admin Tasks

```bash
# Restart a service
cd /opt/<service-name>
docker-compose restart

# View service logs
docker logs -f --tail 100 <container-name>

# Check SSL certificates
echo | openssl s_client -servername wiki.ai-impress.com -connect wiki.ai-impress.com:443 2>/dev/null | openssl x509 -noout -dates

# Renew all Let's Encrypt certificates (automatic via Traefik)
docker restart traefik

# Check Traefik routing
docker logs traefik --tail 100 | grep -i error
```

### Adding New Service

To add a new service to the system:

1. **Create docker-compose.yml** in `/opt/<service-name>/`
2. **Add Traefik labels** for routing:
   ```yaml
   labels:
     - "traefik.enable=true"
     - "traefik.http.routers.<name>.rule=Host(`subdomain.ai-impress.com`)"
     - "traefik.http.routers.<name>.entrypoints=websecure"
     - "traefik.http.routers.<name>.tls.certresolver=letsencrypt"
   ```
3. **Add to monitoring** in health-check-alerting.sh
4. **Save credentials** to Vault:
   ```bash
   vault kv put aimpress/<service> \
     username="admin" \
     password="<generated-password>" \
     url="https://subdomain.ai-impress.com"
   ```
5. **Start service**: `docker-compose up -d`
- **vaultwarden**: 80/tcp, 3012/tcp
- **uptime-kuma**: 3001/tcp
- **supabase-storage**: 5000/tcp
- **supabase-pooler**: 127.0.0.1:6543->6543/tcp, 127.0.0.1:54322->5432/tcp
- **supabase-meta**: 8080/tcp
- **supabase-studio**: 3000/tcp
- **supabase-analytics**: 127.0.0.1:4000->4000/tcp
- **supabase-db**: 5432/tcp
- **portainer**: 8000/tcp, 9000/tcp, 9443/tcp
- **evolution-api**: 8080/tcp
- **rabbitmq**: 4369/tcp, 5671/tcp, 15671-15672/tcp, 15691-15692/tcp, 25672/tcp, 127.0.0.1:5672->5672/tcp
- **redis-main**: 127.0.0.1:6379->6379/tcp

### Common Admin Tasks

```bash
# Restart a service
cd /opt/<service-name>
docker-compose restart

# View service logs
docker logs -f --tail 100 <container-name>

# Check SSL certificates
echo | openssl s_client -servername wiki.ai-impress.com -connect wiki.ai-impress.com:443 2>/dev/null | openssl x509 -noout -dates

# Renew all Let's Encrypt certificates (automatic via Traefik)
docker restart traefik

# Check Traefik routing
docker logs traefik --tail 100 | grep -i error
```

### Adding New Service

To add a new service to the system:

1. **Create docker-compose.yml** in `/opt/<service-name>/`
2. **Add Traefik labels** for routing:
   ```yaml
   labels:
     - "traefik.enable=true"
     - "traefik.http.routers.<name>.rule=Host(`subdomain.ai-impress.com`)"
     - "traefik.http.routers.<name>.entrypoints=websecure"
     - "traefik.http.routers.<name>.tls.certresolver=letsencrypt"
   ```
3. **Add to monitoring** in health-check-alerting.sh
4. **Save credentials** to Vault:
   ```bash
   vault kv put aimpress/<service> \
     username="admin" \
     password="<generated-password>" \
     url="https://subdomain.ai-impress.com"
   ```
5. **Start service**: `docker-compose up -d`
---

## 5️⃣ DATABASES

### Database Storage

**Primary Location:** `/mnt/psql-data/`

All PostgreSQL databases are stored on a dedicated disk for performance and data isolation.

### Database Directories

---

## 5️⃣ DATABASES

### Database Storage

**Primary Location:** `/mnt/psql-data/`

All PostgreSQL databases are stored on a dedicated disk for performance and data isolation.

### Database Directories


#### 📁 **pgadmin-data**

- **Path:** `/mnt/psql-data/pgadmin-data`
- **Size:** 724K
- **Files:** 2
- **Last Modified:** 2025-10-26
- **Backup Command:**
  ```bash
  docker exec postgres-main pg_dump -U aimpress_admin -d <database_name> |     gzip > /mnt/backups/pgadmin-data-$(date +%Y%m%d).sql.gz
  ```


#### 📁 **pgadmin-data**

- **Path:** `/mnt/psql-data/pgadmin-data`
- **Size:** 724K
- **Files:** 2
- **Last Modified:** 2025-10-26
- **Backup Command:**
  ```bash
  docker exec postgres-main pg_dump -U aimpress_admin -d <database_name> |     gzip > /mnt/backups/pgadmin-data-$(date +%Y%m%d).sql.gz
  ```


#### 📁 **pgdata**

- **Path:** `/mnt/psql-data/pgdata`
- **Size:** 4.0K
- **Files:** 0
- **Last Modified:** 2025-11-03
- **Backup Command:**
  ```bash
  docker exec postgres-main pg_dump -U aimpress_admin -d <database_name> |     gzip > /mnt/backups/pgdata-$(date +%Y%m%d).sql.gz
  ```


#### 📁 **pgdata**

- **Path:** `/mnt/psql-data/pgdata`
- **Size:** 4.0K
- **Files:** 0
- **Last Modified:** 2025-11-03
- **Backup Command:**
  ```bash
  docker exec postgres-main pg_dump -U aimpress_admin -d <database_name> |     gzip > /mnt/backups/pgdata-$(date +%Y%m%d).sql.gz
  ```


#### 📁 **supabase-db**

- **Path:** `/mnt/psql-data/supabase-db`
- **Size:** 71M
- **Files:** 1766
- **Last Modified:** 2025-11-03
- **Backup Command:**
  ```bash
  docker exec postgres-main pg_dump -U aimpress_admin -d <database_name> |     gzip > /mnt/backups/supabase-db-$(date +%Y%m%d).sql.gz
  ```


#### 📁 **supabase-db**

- **Path:** `/mnt/psql-data/supabase-db`
- **Size:** 71M
- **Files:** 1766
- **Last Modified:** 2025-11-03
- **Backup Command:**
  ```bash
  docker exec postgres-main pg_dump -U aimpress_admin -d <database_name> |     gzip > /mnt/backups/supabase-db-$(date +%Y%m%d).sql.gz
  ```


### PostgreSQL Management Commands

```bash
# Connect to PostgreSQL
docker exec -it postgres-main psql -U aimpress_admin

# Inside psql:
\l                    # List all databases
\du                   # List all users
\dt                   # List tables in current database
\c database_name      # Connect to database
\q                    # Exit

# Backup single database
docker exec postgres-main pg_dump -U aimpress_admin <database> | \
  gzip > /mnt/backups/db-$(date +%Y%m%d).sql.gz

# Backup ALL databases
docker exec postgres-main pg_dumpall -U aimpress_admin | \
  gzip > /mnt/backups/postgres-all-$(date +%Y%m%d).sql.gz

# Restore database
gunzip < /mnt/backups/backup.sql.gz | \
  docker exec -i postgres-main psql -U aimpress_admin -d <database>

# Check database sizes
docker exec postgres-main psql -U aimpress_admin -c \
  "SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) \
   FROM pg_database ORDER BY pg_database_size(pg_database.datname) DESC;"
```

### Database Users

| Role | Attributes |
|------|------------|

### PostgreSQL Management Commands

```bash
# Connect to PostgreSQL
docker exec -it postgres-main psql -U aimpress_admin

# Inside psql:
\l                    # List all databases
\du                   # List all users
\dt                   # List tables in current database
\c database_name      # Connect to database
\q                    # Exit

# Backup single database
docker exec postgres-main pg_dump -U aimpress_admin <database> | \
  gzip > /mnt/backups/db-$(date +%Y%m%d).sql.gz

# Backup ALL databases
docker exec postgres-main pg_dumpall -U aimpress_admin | \
  gzip > /mnt/backups/postgres-all-$(date +%Y%m%d).sql.gz

# Restore database
gunzip < /mnt/backups/backup.sql.gz | \
  docker exec -i postgres-main psql -U aimpress_admin -d <database>

# Check database sizes
docker exec postgres-main psql -U aimpress_admin -c \
  "SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) \
   FROM pg_database ORDER BY pg_database_size(pg_database.datname) DESC;"
```

### Database Users

| Role | Attributes |
|------|------------|
| **aimpress_admin** | Superuser, Create role, Create DB, Replication, Bypass RLS |
| **aimpress_admin** | Superuser, Create role, Create DB, Replication, Bypass RLS |
| **authelia_user** | - |
| **authelia_user** | - |
| **authentik_user** | - |
| **authentik_user** | - |
| **documenso_user** | Create DB |
| **documenso_user** | Create DB |
| **evolution_user** | - |
| **evolution_user** | - |
| **n8n_user** | - |
| **n8n_user** | - |
| **odoo_user** | - |
| **odoo_user** | - |
| **outline_user** | Superuser |
| **outline_user** | Superuser |
| **supabase_user** | - |
| **supabase_user** | - |
| **vaultwarden_user** | - |
| **vaultwarden_user** | - |
| **wikijs_user** | - |
| **wikijs_user** | - |

### Change Database Password

```bash
# 1. Generate strong password
NEW_PASS=$(openssl rand -base64 32)
echo "New password: $NEW_PASS"

# 2. Change in PostgreSQL
docker exec postgres-main psql -U aimpress_admin -c \
  "ALTER USER <username> WITH PASSWORD '$NEW_PASS';"

# 3. Save to Vault
export VAULT_ADDR="http://127.0.0.1:8200"
export VAULT_TOKEN="hvs.jYguDdf2IzobXG8b9QWyATV8"
vault kv put aimpress/postgres/<service> password="$NEW_PASS"

# 4. Update application config
cd /opt/<service-path>
nano docker-compose.yml  # Update DB_PASSWORD or DATABASE_PASSWORD

# 5. Restart application
docker-compose restart
```

### Change Database Password

```bash
# 1. Generate strong password
NEW_PASS=$(openssl rand -base64 32)
echo "New password: $NEW_PASS"

# 2. Change in PostgreSQL
docker exec postgres-main psql -U aimpress_admin -c \
  "ALTER USER <username> WITH PASSWORD '$NEW_PASS';"

# 3. Save to Vault
export VAULT_ADDR="http://127.0.0.1:8200"
export VAULT_TOKEN="hvs.jYguDdf2IzobXG8b9QWyATV8"
vault kv put aimpress/postgres/<service> password="$NEW_PASS"

# 4. Update application config
cd /opt/<service-path>
nano docker-compose.yml  # Update DB_PASSWORD or DATABASE_PASSWORD

# 5. Restart application
docker-compose restart
```
---

## 6️⃣ STORAGE & BACKUPS

### Disk Usage Summary

```
---

## 6️⃣ STORAGE & BACKUPS

### Disk Usage Summary

```
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       387G   42G  345G  11% /
/dev/sda16      881M  170M  650M  21% /boot
/dev/sda15      105M  6.2M   99M   6% /boot/efi
/dev/sdc        393G  6.7G  367G   2% /mnt/backups
/dev/sdb        295G  546M  279G   1% /mnt/psql-data
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       387G   42G  345G  11% /
/dev/sda16      881M  170M  650M  21% /boot
/dev/sda15      105M  6.2M   99M   6% /boot/efi
/dev/sdc        393G  6.7G  367G   2% /mnt/backups
/dev/sdb        295G  546M  279G   1% /mnt/psql-data
```

### Storage Breakdown by Directory

```
```

### Storage Breakdown by Directory

```
4.0K	/opt/containerd
4.0K	/opt/fix_odoo_pass.py
16K	/opt/06-webflow
20K	/opt/postiz-config
100K	/opt/01-security
188K	/opt/03-business
2.0M	/opt/infrastructure-docs
42M	/opt/04-tools
71M	/mnt/psql-data
234M	/opt/00-infrastructure
1.1G	/opt/05-backups
1.2G	/opt/02-core
6.7G	/mnt/backups
4.0K	/opt/containerd
4.0K	/opt/fix_odoo_pass.py
16K	/opt/06-webflow
20K	/opt/postiz-config
100K	/opt/01-security
188K	/opt/03-business
2.0M	/opt/infrastructure-docs
42M	/opt/04-tools
71M	/mnt/psql-data
234M	/opt/00-infrastructure
1.1G	/opt/05-backups
1.2G	/opt/02-core
6.7G	/mnt/backups
```

### Critical Directories

```

### Critical Directories

- **/opt**: 2.5G (13899 files, 2925 directories)
- **/opt**: 2.5G (13899 files, 2925 directories)
- **/mnt/psql-data**: 71M (1768 files, 36 directories)
- **/mnt/psql-data**: 71M (1768 files, 36 directories)
- **/mnt/backups**: 6.7G (13407 files, 6536 directories)
- **/mnt/backups**: 6.7G (13407 files, 6536 directories)
- **/var/lib/docker**: 4.0K (0 files, 1 directories)
- **/var/lib/docker**: 4.0K (0 files, 1 directories)

### Backup Status


### Backup Status

**Total Backup Size:** 6.7G  
**Total Files:** 13407  

### Latest 10 Backups

```
**Total Backup Size:** 6.7G  
**Total Files:** 13407  

### Latest 10 Backups

```
2025-11-04+03:00:13.6485108670 109052795 0.00 MB 
2025-11-03+15:37:05.9803848350 108506629 0.00 MB 
2025-11-03+10:21:47.5014724610 127 0.00 MB 
2025-11-03+10:21:47.4184713090 108076245 0.00 MB 
2025-11-03+03:00:57.2955833000 19710014 0.00 MB 
2025-11-03+03:00:55.5635602070 5439 0.00 MB 
2025-11-03+03:00:55.2655562330 960769 0.00 MB 
2025-11-03+03:00:54.6385478740 11952 0.00 MB 
2025-11-03+03:00:54.2825431270 23910 0.00 MB 
2025-11-03+03:00:53.9605388340 175693 0.00 MB 
```

2025-11-04+03:00:13.6485108670 109052795 0.00 MB 
2025-11-03+15:37:05.9803848350 108506629 0.00 MB 
2025-11-03+10:21:47.5014724610 127 0.00 MB 
2025-11-03+10:21:47.4184713090 108076245 0.00 MB 
2025-11-03+03:00:57.2955833000 19710014 0.00 MB 
2025-11-03+03:00:55.5635602070 5439 0.00 MB 
2025-11-03+03:00:55.2655562330 960769 0.00 MB 
2025-11-03+03:00:54.6385478740 11952 0.00 MB 
2025-11-03+03:00:54.2825431270 23910 0.00 MB 
2025-11-03+03:00:53.9605388340 175693 0.00 MB 
```

⚠️ **Latest backup:** 1 days old
⚠️ **Latest backup:** 1 days old

### Manual Backup Commands

```bash
# Full system backup
/opt/05-backups/scripts/backup-full-enhanced.sh

# Quick database backup
docker exec postgres-main pg_dumpall -U aimpress_admin | \
  gzip > /mnt/backups/postgres-$(date +%Y%m%d).sql.gz

# Backup specific service config
tar -czf /mnt/backups/config-$(date +%Y%m%d).tar.gz /opt/

# Vault secrets export
/opt/05-backups/scripts/vault-bitwarden-sync.sh export
```

### Disk Cleanup Commands

```bash
# Clean Docker (removes unused images, containers, volumes)
docker system prune -af

# Clean old logs (older than 7 days)
find /opt -name "*.log" -mtime +7 -delete
find /var/log -name "*.log" -mtime +7 -exec truncate -s 0 {} \;

# Clean old backups (older than 60 days)
find /mnt/backups -name "*.gz" -mtime +60 -delete

# Find large files
find /opt /mnt -type f -size +100M -exec ls -lh {} \; 2>/dev/null

# Interactive disk usage analyzer
ncdu /opt
```

### Vault Secrets Backup Status


### Manual Backup Commands

```bash
# Full system backup
/opt/05-backups/scripts/backup-full-enhanced.sh

# Quick database backup
docker exec postgres-main pg_dumpall -U aimpress_admin | \
  gzip > /mnt/backups/postgres-$(date +%Y%m%d).sql.gz

# Backup specific service config
tar -czf /mnt/backups/config-$(date +%Y%m%d).tar.gz /opt/

# Vault secrets export
/opt/05-backups/scripts/vault-bitwarden-sync.sh export
```

### Disk Cleanup Commands

```bash
# Clean Docker (removes unused images, containers, volumes)
docker system prune -af

# Clean old logs (older than 7 days)
find /opt -name "*.log" -mtime +7 -delete
find /var/log -name "*.log" -mtime +7 -exec truncate -s 0 {} \;

# Clean old backups (older than 60 days)
find /mnt/backups -name "*.gz" -mtime +60 -delete

# Find large files
find /opt /mnt -type f -size +100M -exec ls -lh {} \; 2>/dev/null

# Interactive disk usage analyzer
ncdu /opt
```

### Vault Secrets Backup Status

- **Latest Export:** vault-export-20251104-040001.json
- **Date:** 2025-11-04 04:00:05 (2 hours ago)
- **Size:** 8.0K
- **Secrets Backed Up:** 75
- **Schedule:** Every 4 hours

✅ Vault backups are up to date
- **Latest Export:** vault-export-20251104-040001.json
- **Date:** 2025-11-04 04:00:05 (2 hours ago)
- **Size:** 8.0K
- **Secrets Backed Up:** 75
- **Schedule:** Every 4 hours

✅ Vault backups are up to date

**Bitwarden Sync:** Not configured (CLI not installed)

### Cloudflare R2 Remote Backup


**Bitwarden Sync:** Not configured (CLI not installed)

### Cloudflare R2 Remote Backup

- **Used:** 17.481 GiB / 10 GB limit
- **Snapshots:** 4
- **Retention:** Keep 3 daily + 1 weekly
- **Schedule:** Daily at 03:00 AM

🔴 R2 storage exceeds free tier!

### Storage Monitoring

✅ **GOOD:** Disk usage is at 11%
---

## 7️⃣ NETWORKS

### Docker Networks Overview

**Total Networks:** 12

### Network Details


#### 🌐 **authentik_authentik-internal**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.8.0/24
- **Gateway:** 172.16.8.1
- **Connected Containers:** 5
- **Container List:** authentik-server, authentik-proxy, authentik-redis, authentik-worker, authentik-postgres

- **Used:** 17.481 GiB / 10 GB limit
- **Snapshots:** 4
- **Retention:** Keep 3 daily + 1 weekly
- **Schedule:** Daily at 03:00 AM

🔴 R2 storage exceeds free tier!

### Storage Monitoring

✅ **GOOD:** Disk usage is at 11%
---

## 7️⃣ NETWORKS

### Docker Networks Overview

**Total Networks:** 12

### Network Details


#### 🌐 **bridge**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.0.0/24
- **Gateway:** 172.16.0.1
- **Connected Containers:** 0
- **Container List:** (no containers attached)


#### 🌐 **database-internal**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.19.0.0/16
- **Gateway:** 172.19.0.1
- **Connected Containers:** 15
- **Container List:** n8n-worker-1, n8n-worker-4, odoo, vaultwarden, pgadmin, n8n-worker-2, postgres-main, n8n-worker-3, n8n-shared, wikijs, documenso, rabbitmq, redis-main, evolution-api, outline


#### 🌐 **authentik_authentik-internal**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.8.0/24
- **Gateway:** 172.16.8.1
- **Connected Containers:** 5
- **Container List:** authentik-server, authentik-proxy, authentik-redis, authentik-worker, authentik-postgres


#### 🌐 **host**

- **Driver:** host
- **Scope:** local
- **Subnet:** N/A
- **Gateway:** N/A
- **Connected Containers:** 0
- **Container List:** (no containers attached)


#### 🌐 **bridge**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.0.0/24
- **Gateway:** 172.16.0.1
- **Connected Containers:** 0
- **Container List:** (no containers attached)


#### 🌐 **database-internal**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.19.0.0/16
- **Gateway:** 172.19.0.1
- **Connected Containers:** 15
- **Container List:** n8n-worker-1, n8n-worker-4, odoo, vaultwarden, pgadmin, n8n-worker-2, postgres-main, n8n-worker-3, n8n-shared, wikijs, documenso, rabbitmq, redis-main, evolution-api, outline


#### 🌐 **monitoring_monitoring**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.9.0/24
- **Gateway:** 172.16.9.1
- **Connected Containers:** 8
- **Container List:** prometheus, promtail, blackbox-exporter, node-exporter, cadvisor, alertmanager, loki, grafana


#### 🌐 **host**

- **Driver:** host
- **Scope:** local
- **Subnet:** N/A
- **Gateway:** N/A
- **Connected Containers:** 0
- **Container List:** (no containers attached)


#### 🌐 **n8n-shared**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.22.0.0/16
- **Gateway:** 172.22.0.1
- **Connected Containers:** 5
- **Container List:** n8n-worker-1, n8n-worker-4, n8n-worker-2, n8n-worker-3, n8n-shared


#### 🌐 **monitoring_monitoring**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.9.0/24
- **Gateway:** 172.16.9.1
- **Connected Containers:** 8
- **Container List:** prometheus, promtail, blackbox-exporter, node-exporter, cadvisor, alertmanager, loki, grafana


#### 🌐 **none**

- **Driver:** null
- **Scope:** local
- **Subnet:** N/A
- **Gateway:** N/A
- **Connected Containers:** 0
- **Container List:** (no containers attached)


#### 🌐 **n8n-shared**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.22.0.0/16
- **Gateway:** 172.22.0.1
- **Connected Containers:** 5
- **Container List:** n8n-worker-1, n8n-worker-4, n8n-worker-2, n8n-worker-3, n8n-shared


#### 🌐 **odoo-internal**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.7.0/24
- **Gateway:** 172.16.7.1
- **Connected Containers:** 0
- **Container List:** (no containers attached)


#### 🌐 **none**

- **Driver:** null
- **Scope:** local
- **Subnet:** N/A
- **Gateway:** N/A
- **Connected Containers:** 0
- **Container List:** (no containers attached)


#### 🌐 **postiz-config_postiz-internal**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.5.0/24
- **Gateway:** 172.16.5.1
- **Connected Containers:** 3
- **Container List:** postiz, postiz-redis, postiz-postgres


#### 🌐 **supabase_default**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.2.0/24
- **Gateway:** 172.16.2.1
- **Connected Containers:** 13
- **Container List:** supabase-db, supabase-auth, supabase-meta, supabase-studio, supabase-kong, supabase-pooler, supabase-vector, supabase-analytics, supabase-edge-functions, supabase-imgproxy, realtime-dev.supabase-realtime, supabase-storage, supabase-rest


#### 🌐 **odoo-internal**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.7.0/24
- **Gateway:** 172.16.7.1
- **Connected Containers:** 0
- **Container List:** (no containers attached)


#### 🌐 **postiz-config_postiz-internal**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.5.0/24
- **Gateway:** 172.16.5.1
- **Connected Containers:** 3
- **Container List:** postiz, postiz-redis, postiz-postgres


#### 🌐 **traefik-public**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.18.0.0/16
- **Gateway:** 172.18.0.1
- **Connected Containers:** 19
- **Container List:** portainer, authentik-server, prometheus, odoo, authentik-proxy, vaultwarden, pgadmin, postiz, uptime-kuma, supabase-kong, n8n-shared, wikijs, documenso, rabbitmq, traefik, evolution-api, grafana, vault, outline


#### 🌐 **supabase_default**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.16.2.0/24
- **Gateway:** 172.16.2.1
- **Connected Containers:** 13
- **Container List:** supabase-db, supabase-auth, supabase-meta, supabase-studio, supabase-kong, supabase-pooler, supabase-vector, supabase-analytics, supabase-edge-functions, supabase-imgproxy, realtime-dev.supabase-realtime, supabase-storage, supabase-rest


#### 🌐 **vault-internal**

- **Driver:** bridge
- **Scope:** local
- **Subnet:** 172.21.0.0/16
- **Gateway:** 172.21.0.1
- **Connected Containers:** 1
- **Container List:** vault


### Network Management Commands

```bash
# List all networks
docker network ls

# Inspect network
docker network inspect <network-name>

# Create new network
docker network create --driver bridge my-network

# Connect container to network
docker network connect <network-name> <container-name>

# Disconnect container from network
docker network disconnect <network-name> <container-name>

# Remove unused networks
docker network prune -f
```

### Common Network Issues

#### Container can't reach another container

```bash
# Check if both are on same network
docker network inspect <network-name>

# Check container IP
docker inspect <container-name> | grep IPAddress

# Test connectivity
docker exec <container1> ping <container2>
```

#### DNS resolution not working

```bash
# Check Docker DNS
docker exec <container> cat /etc/resolv.conf

# Test DNS
docker exec <container> nslookup google.com

# Restart Docker daemon if needed
sudo systemctl restart docker
```
---

## 8️⃣ SECRETS & PASSWORDS

### Vault Access

All secrets are stored in HashiCorp Vault for security.

```bash
# Set Vault environment variables
export VAULT_ADDR="http://127.0.0.1:8200"
export VAULT_TOKEN="hvs.jYguDdf2IzobXG8b9QWyATV8"

# List all available secret paths
vault kv list aimpress/

# Get a specific secret
vault kv get aimpress/<service-name>

# Get secret in JSON format
vault kv get -format=json aimpress/<service> | jq '.data.data'

# Add new secret
vault kv put aimpress/<service> \
  username="admin" \
  password="secret123" \
  api_key="xyz"

# Update existing secret
vault kv patch aimpress/<service> password="new_password"

# Delete secret
vault kv delete aimpress/<service>

# View secret history
vault kv metadata get aimpress/<service>
```

### Vault Secret Structure

```
secret/
├── monitoring/
│   ├── slack_webhook
│   └── alert_email
└── outline/
    └── scripts/
        ├── api_token
        ├── api_url
        ├── reports_collection_id
        └── technical_kb_collection_id

aimpress/
├── postgres/
│   ├── admin           # Main PostgreSQL admin
│   ├── outline         # Outline database user
│   └── odoo            # Odoo database user
├── odoo                # Odoo admin credentials
├── authentik           # Authentik admin credentials
├── grafana             # Grafana admin credentials
└── portainer           # Portainer admin credentials
```

### Vault Unseal (if sealed)

```bash
# Check Vault status
docker exec vault vault status

# Unseal Vault
/opt/00-infrastructure/vault/unseal.sh

# Or manually with keys
docker exec vault vault operator unseal <key1>
docker exec vault vault operator unseal <key2>
docker exec vault vault operator unseal <key3>
```

---

## 9️⃣ HOW TO GUIDES

### Restart a Service

```bash
# Quick restart
docker restart <container-name>

# Graceful restart with docker-compose
cd /opt/<service-directory>
docker-compose restart <service-name>

# Full restart (if config changed)
cd /opt/<service-directory>
docker-compose down
docker-compose up -d

# Restart all services in compose file
cd /opt/<service-directory>
docker-compose restart
```

### View Logs

```bash
# Real-time logs (follow)
docker logs -f --tail 100 <container-name>

# Last 500 lines
docker logs --tail 500 <container-name>

# Logs with timestamps
docker logs -t <container-name>

# Logs from last hour
docker logs --since 1h <container-name>

# Logs from specific time
docker logs --since "2025-11-03T10:00:00" <container-name>

# Save logs to file
docker logs <container-name> > /tmp/container.log

# Search in logs
docker logs <container-name> 2>&1 | grep "error"
```

### Update a Container

```bash
# 1. BACKUP FIRST!
/opt/05-backups/scripts/backup-full-enhanced.sh

# 2. Pull new image
cd /opt/<service-directory>
docker-compose pull <service-name>

# 3. Recreate container
docker-compose up -d <service-name>

# 4. Check logs
docker logs -f <container-name>

# 5. Verify service is working
curl -I https://<service-url>
```

### Delete a Container/Service

```bash
# ⚠️ WARNING: This will delete data! Backup first!

# 1. Create backup
/opt/05-backups/scripts/backup-full-enhanced.sh

# 2. Stop and remove container
docker stop <container-name>
docker rm <container-name>

# 3. Remove volumes (if not needed)
docker volume ls | grep <service>
docker volume rm <volume-name>

# 4. Remove from docker-compose.yml
cd /opt/<service-directory>
nano docker-compose.yml  # Delete service section

# 5. Restart remaining services
docker-compose up -d
```

### Change Password

#### For Web Applications

```bash
# 1. Login to web interface
# 2. Go to Settings → Users → Change Password
# 3. Save new password to Vault

export VAULT_ADDR="http://127.0.0.1:8200"
export VAULT_TOKEN="hvs.jYguDdf2IzobXG8b9QWyATV8"
vault kv put aimpress/<service> password="<new-password>"
```

#### For PostgreSQL

```bash
# 1. Generate strong password
NEW_PASS=$(openssl rand -base64 32)
echo "New password: $NEW_PASS"

# 2. Change in database
docker exec postgres-main psql -U aimpress_admin -c \
  "ALTER USER <username> WITH PASSWORD '$NEW_PASS';"

# 3. Save to Vault
vault kv put aimpress/postgres/<service> password="$NEW_PASS"

# 4. Update application config
cd /opt/<service-path>
nano docker-compose.yml  # Update DB_PASSWORD

# 5. Restart application
docker-compose restart
```

### Clean Up Disk Space

```bash
# Clean Docker (removes unused images, containers, volumes)
docker system prune -af --volumes

# Clean old logs
find /opt -name "*.log" -mtime +7 -delete
find /var/log -name "*.log" -mtime +7 -exec truncate -s 0 {} \;

# Clean old backups (keep last 60 days)
find /mnt/backups -name "*.gz" -mtime +60 -delete

# Find and remove large files
find /opt /mnt -type f -size +1G -exec ls -lh {} \;

# Check what's using space
du -sh /opt/* /mnt/* | sort -h
```

### Add New Service

```bash
# 1. Create directory structure
mkdir -p /opt/03-business/<service-name>
cd /opt/03-business/<service-name>

# 2. Create docker-compose.yml
nano docker-compose.yml

# 3. Add to Traefik network
docker network connect traefik-public <container-name>

# 4. Start service
docker-compose up -d

# 5. Check logs
docker logs -f <container-name>

# 6. Add credentials to Vault
vault kv put aimpress/<service> \
  username="admin" \
  password="$(openssl rand -base64 32)"
```

---

## 🔟 TROUBLESHOOTING

### Website Not Responding (502/503 Error)

```bash
# 1. Check Traefik (reverse proxy)
docker logs traefik --tail 100 | grep -i error

# 2. Check if target container is running
docker ps | grep <service-name>

# 3. Check target container logs
docker logs <service-name> --tail 100

# 4. Test direct connection (bypass Traefik)
docker exec <service-name> curl -I localhost:<port>

# 5. Check if service is in correct network
docker network inspect traefik-public | grep <service-name>

# 6. Restart Traefik
docker restart traefik

# 7. Restart service
docker restart <service-name>
```

### Database Connection Errors

```bash
# 1. Check PostgreSQL is running
docker ps | grep postgres-main
docker logs postgres-main --tail 100

# 2. Test database connection
docker exec postgres-main psql -U aimpress_admin -c "SELECT version();"

# 3. Check disk space (common issue)
df -h /mnt/psql-data

# 4. Check database credentials
vault kv get aimpress/postgres/<service>

# 5. Verify application database config
cd /opt/<service-path>
cat docker-compose.yml | grep -i database

# 6. Restart PostgreSQL (careful!)
docker restart postgres-main

# 7. Check PostgreSQL connections
docker exec postgres-main psql -U aimpress_admin -c \
  "SELECT * FROM pg_stat_activity;"
```

### Container Keeps Restarting

```bash
# 1. Check logs for error
docker logs <container-name> --tail 200

# 2. Check restart count
docker inspect --format='{{.RestartCount}}' <container-name>

# 3. Check resource usage
docker stats <container-name> --no-stream
free -h
df -h

# 4. Stop auto-restart temporarily
docker update --restart=no <container-name>

# 5. Start manually to see full error
docker start <container-name> && docker logs -f <container-name>

# 6. Check for port conflicts
netstat -tulpn | grep <port>

# 7. Check healthcheck
docker inspect <container-name> | grep -A 20 Health
```

### Out of Disk Space

```bash
# 1. Find what's using space
du -sh /opt/* /mnt/* /var/* | sort -h | tail -20

# 2. Check Docker disk usage
docker system df

# 3. Clean Docker
docker system prune -af --volumes

# 4. Clean logs
journalctl --vacuum-time=7d
find /var/log -name "*.log" -mtime +7 -exec rm {} \;

# 5. Clean old backups
find /mnt/backups -mtime +30 -delete

# 6. Remove stopped containers
docker container prune -f

# 7. Remove unused volumes
docker volume prune -f
```

### SSL Certificate Issues

```bash
# 1. Check Traefik logs for certificate errors
docker logs traefik 2>&1 | grep -i "certificate\|acme\|letsencrypt"

# 2. Check certificate status
docker exec traefik cat /letsencrypt/acme.json | jq '.Certificates'

# 3. Force certificate renewal
docker exec traefik rm -rf /letsencrypt/acme.json
docker restart traefik

# Wait 2-3 minutes for new certificates

# 4. Check domain DNS
dig <domain.com>
nslookup <domain.com>

# 5. Test certificate
openssl s_client -connect <domain>:443 -servername <domain>
```

### High Memory Usage

```bash
# 1. Check which containers use most memory
docker stats --no-stream | sort -k4 -h

# 2. Check system memory
free -h
top -bn1 | head -20

# 3. Find memory-heavy processes
ps aux --sort=-%mem | head -10

# 4. Restart heavy containers
docker restart <container-name>

# 5. Check for memory leaks
docker logs <container-name> | grep -i "memory\|oom"

# 6. Add memory limits to docker-compose.yml
# deploy:
#   resources:
#     limits:
#       memory: 1G
```

### Vault Sealed/Inaccessible

```bash
# 1. Check Vault status
docker logs vault --tail 50

# 2. Check if sealed
docker exec vault vault status

# 3. Unseal Vault
/opt/00-infrastructure/vault/unseal.sh

# 4. If unseal script doesn't work
docker exec vault vault operator unseal <key1>
docker exec vault vault operator unseal <key2>
docker exec vault vault operator unseal <key3>

# 5. Get new token if expired
docker exec vault vault login
# Enter root token
```

---

## 1️⃣1️⃣ SYSTEM ARCHITECTURE

### High-Level Overview

```
                        INTERNET
                           ↓
                    Cloudflare (DNS + CDN)
                           ↓
              OVH Server (51.89.231.46)
                           ↓
            Traefik (Reverse Proxy + SSL)
                    ↓           ↓
            ┌───────┴───────────┴──────┬────────┐
            ↓                          ↓        ↓
        Services                   Monitoring   Tools
    ┌─────┴──────┐             ┌────┴────┐  ┌──┴───┐
    ↓            ↓             ↓         ↓  ↓      ↓
  Wiki         N8N         Grafana   Loki  Portainer
  Odoo      Supabase      Prometheus       Vault
  Authentik   ...
    ↓            ↓
    └────────────┴────────┐
                          ↓
                   Infrastructure
              ┌──────┬──────┬──────┐
              ↓      ↓      ↓      ↓
          PostgreSQL Redis Vault  Storage
        (/mnt/psql-data)        (/mnt/backups)
```

### Request Flow

1. **User** visits `https://wiki.ai-impress.com`
2. **Cloudflare** resolves DNS → 51.89.231.46
3. **Traefik** receives HTTPS request (port 443)
4. **Traefik** terminates SSL (Let's Encrypt certificate)
5. **Traefik** routes to Outline container via internal network
6. **Outline** authenticates user (via Authentik if needed)
7. **Outline** queries PostgreSQL for content
8. **Response** flows back: Outline → Traefik → User

**Critical points:** If Traefik or PostgreSQL fail, all services go down.

### Directory Structure

```
/opt/                           # All applications
├── 00-infrastructure/          # Core infrastructure
│   ├── traefik/               # Reverse proxy + SSL
│   ├── postgres/              # PostgreSQL main
│   ├── vault/                 # Secrets storage
│   │   ├── .vault-token       # Root token (keep safe!)
│   │   └── unseal.sh          # Unseal script
│   └── redis/                 # Cache & queues
│
├── 01-network/                # Network services
│   └── authentik/             # SSO authentication
│
├── 02-core/                   # Core business apps
│   ├── outline/               # Wiki
│   ├── n8n/                   # Automation
│   └── supabase/              # Backend platform
│
├── 03-business/               # Business applications
│   ├── odoo/                  # ERP
│   └── documenso/             # Document signing
│
├── 04-tools/                  # Management tools
│   ├── monitoring/            # Grafana, Prometheus, Loki
│   │   └── docker-compose.yml
│   ├── portainer/             # Docker UI
│   └── uptime-kuma/           # Uptime monitoring
│
└── 05-backups/                # Backup system
    ├── scripts/               # 👈 ALL ADMIN SCRIPTS
    │   ├── admin.sh           # Main admin interface
    │   ├── health-check-alerting.sh  # Health monitoring
    │   ├── backup-full-enhanced.sh   # Full backups
    │   ├── upload-to-outline.sh      # Report uploads
    │   └── ...
    ├── logs/                  # Script logs
    ├── reports/               # JSON reports
    └── config-versions/       # Config backups

/opt/infrastructure-docs/       # Documentation
├── scripts/
│   ├── server-full-report.sh  # Generate this report
│   └── modules/               # Report modules
├── reports/                   # Generated MD reports
├── ADMIN_GUIDE.md             # Administrator guide
└── SUMMARY.md                 # Setup summary

/mnt/                          # Mounted storage
├── backups/                   # 💾 ALL BACKUPS HERE
│   ├── *.tar.gz              # System backups
│   ├── *.sql.gz              # Database backups
│   └── vault-export-*.json   # Vault backups
│
└── psql-data/                 # 🗄️ ALL DATABASES HERE
    ├── pgdata/                # postgres-main
    ├── supabase-db/           # Supabase
    └── pgadmin-data/          # pgAdmin
```

### Service Dependencies

**Level 1: Infrastructure (Cannot delete)**
- Traefik → All websites depend on it
- PostgreSQL → All applications need database
- Redis → N8N, Authentik, others need cache
- Vault → All passwords stored here

**Level 2: Network**
- Authentik → Provides SSO for many services

**Level 3: Applications**
- Outline, N8N, Odoo, etc → Can delete if backed up

**Level 4: Tools**
- Grafana, Portainer, etc → Can recreate

### Network Architecture

**Docker Networks:**
- `traefik-public` - Public-facing services
- `postgres-network` - Database connections
- `redis-network` - Redis connections
- `authentik-network` - Auth services
- Individual service networks

**Port Mapping:**
- `80` → Traefik HTTP (redirects to HTTPS)
- `443` → Traefik HTTPS
- `22` → SSH
- Internal services: No direct external access

### Backup Strategy

**Automated backups:**
- **Daily 02:00** - Configuration backup
- **Daily 03:00** - Full system backup
- **Every 4 hours** - Vault secrets export
- **Weekly Saturday** - Database maintenance

**Backup locations:**
- `/mnt/backups/` - Primary backup location
- Vault exports in same location

**What's backed up:**
- All databases (PostgreSQL)
- All Docker configurations
- All Vault secrets
- Application data volumes

### Monitoring Setup

**Grafana** → Visualizations
**Prometheus** → Metrics collection  
**Loki** → Log aggregation  
**cAdvisor** → Container metrics  
**Node Exporter** → System metrics  
**Alertmanager** → Alert routing  
**Blackbox Exporter** → Website monitoring

**Alert flow:**
Health check → Detects problem → Sends to Slack + Email

---

## 📞 QUICK REFERENCE GUIDE

### Main Scripts

```bash
# System status
/opt/05-backups/scripts/admin.sh status

# Health check + alerts
/opt/05-backups/scripts/health-check-alerting.sh

# Generate full report
/opt/infrastructure-docs/scripts/server-full-report.sh

# Upload to Outline
/opt/05-backups/scripts/upload-to-outline.sh latest-report

# Full backup
/opt/05-backups/scripts/backup-full-enhanced.sh
```

### Emergency Commands

```bash
# Restart all containers
docker restart $(docker ps -q)

# Stop all containers
docker stop $(docker ps -q)

# Clean up everything
docker system prune -af --volumes

# Check logs for errors
docker ps -a | grep -v Up | awk '{print $NF}' | xargs -I {} docker logs --tail 50 {}
```

### Useful Aliases (Add to .bashrc)

```bash
alias dps='docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"'
alias dlogs='docker logs -f --tail 100'
alias dstats='docker stats --no-stream'
alias dclean='docker system prune -af'
alias vaultlogin='export VAULT_ADDR=http://127.0.0.1:8200 && export VAULT_TOKEN=hvs.jYguDdf2IzobXG8b9QWyATV8'
```

### Important URLs

- **Wiki:** https://wiki.ai-impress.com
- **N8N:** https://n8n.ai-impress.com
- **Monitoring:** https://grafana.ai-impress.com
- **Uptime:** https://uptime.ai-impress.com
- **Docker UI:** https://portainer.ai-impress.com

### Support Resources

- **Documentation:** https://wiki.ai-impress.com/collection/technical-knowledge-base-vCle1zKdMA
- **Reports:** https://wiki.ai-impress.com/collection/reports-yRgWpcsnJ7  
- **Slack:** #alerts channel
- **Email:** admin@ai-impress.com

---

**Report End**  
**Generated:** 2025-11-04 06:00:21  
**Version:** 5.0.0 (Modular)  
**Modules:** 7 sections
---

## 8️⃣ SECRETS & PASSWORDS

### Vault Access

All secrets are stored in HashiCorp Vault for security.

```bash
# Set Vault environment variables
export VAULT_ADDR="http://127.0.0.1:8200"
export VAULT_TOKEN="hvs.jYguDdf2IzobXG8b9QWyATV8"

# List all available secret paths
vault kv list aimpress/

# Get a specific secret
vault kv get aimpress/<service-name>

# Get secret in JSON format
vault kv get -format=json aimpress/<service> | jq '.data.data'

# Add new secret
vault kv put aimpress/<service> \
  username="admin" \
  password="secret123" \
  api_key="xyz"

# Update existing secret
vault kv patch aimpress/<service> password="new_password"

# Delete secret
vault kv delete aimpress/<service>

# View secret history
vault kv metadata get aimpress/<service>
```

### Vault Secret Structure

```
secret/
├── monitoring/
│   ├── slack_webhook
│   └── alert_email
└── outline/
    └── scripts/
        ├── api_token
        ├── api_url
        ├── reports_collection_id
        └── technical_kb_collection_id

aimpress/
├── postgres/
│   ├── admin           # Main PostgreSQL admin
│   ├── outline         # Outline database user
│   └── odoo            # Odoo database user
├── odoo                # Odoo admin credentials
├── authentik           # Authentik admin credentials
├── grafana             # Grafana admin credentials
└── portainer           # Portainer admin credentials
```

### Vault Unseal (if sealed)

```bash
# Check Vault status
docker exec vault vault status

# Unseal Vault
/opt/00-infrastructure/vault/unseal.sh

# Or manually with keys
docker exec vault vault operator unseal <key1>
docker exec vault vault operator unseal <key2>
docker exec vault vault operator unseal <key3>
```

---

## 9️⃣ HOW TO GUIDES

### Restart a Service

```bash
# Quick restart
docker restart <container-name>

# Graceful restart with docker-compose
cd /opt/<service-directory>
docker-compose restart <service-name>

# Full restart (if config changed)
cd /opt/<service-directory>
docker-compose down
docker-compose up -d

# Restart all services in compose file
cd /opt/<service-directory>
docker-compose restart
```

### View Logs

```bash
# Real-time logs (follow)
docker logs -f --tail 100 <container-name>

# Last 500 lines
docker logs --tail 500 <container-name>

# Logs with timestamps
docker logs -t <container-name>

# Logs from last hour
docker logs --since 1h <container-name>

# Logs from specific time
docker logs --since "2025-11-03T10:00:00" <container-name>

# Save logs to file
docker logs <container-name> > /tmp/container.log

# Search in logs
docker logs <container-name> 2>&1 | grep "error"
```

### Update a Container

```bash
# 1. BACKUP FIRST!
/opt/05-backups/scripts/backup-full-enhanced.sh

# 2. Pull new image
cd /opt/<service-directory>
docker-compose pull <service-name>

# 3. Recreate container
docker-compose up -d <service-name>

# 4. Check logs
docker logs -f <container-name>

# 5. Verify service is working
curl -I https://<service-url>
```

### Delete a Container/Service

```bash
# ⚠️ WARNING: This will delete data! Backup first!

# 1. Create backup
/opt/05-backups/scripts/backup-full-enhanced.sh

# 2. Stop and remove container
docker stop <container-name>
docker rm <container-name>

# 3. Remove volumes (if not needed)
docker volume ls | grep <service>
docker volume rm <volume-name>

# 4. Remove from docker-compose.yml
cd /opt/<service-directory>
nano docker-compose.yml  # Delete service section

# 5. Restart remaining services
docker-compose up -d
```

### Change Password

#### For Web Applications

```bash
# 1. Login to web interface
# 2. Go to Settings → Users → Change Password
# 3. Save new password to Vault

export VAULT_ADDR="http://127.0.0.1:8200"
export VAULT_TOKEN="hvs.jYguDdf2IzobXG8b9QWyATV8"
vault kv put aimpress/<service> password="<new-password>"
```

#### For PostgreSQL

```bash
# 1. Generate strong password
NEW_PASS=$(openssl rand -base64 32)
echo "New password: $NEW_PASS"

# 2. Change in database
docker exec postgres-main psql -U aimpress_admin -c \
  "ALTER USER <username> WITH PASSWORD '$NEW_PASS';"

# 3. Save to Vault
vault kv put aimpress/postgres/<service> password="$NEW_PASS"

# 4. Update application config
cd /opt/<service-path>
nano docker-compose.yml  # Update DB_PASSWORD

# 5. Restart application
docker-compose restart
```

### Clean Up Disk Space

```bash
# Clean Docker (removes unused images, containers, volumes)
docker system prune -af --volumes

# Clean old logs
find /opt -name "*.log" -mtime +7 -delete
find /var/log -name "*.log" -mtime +7 -exec truncate -s 0 {} \;

# Clean old backups (keep last 60 days)
find /mnt/backups -name "*.gz" -mtime +60 -delete

# Find and remove large files
find /opt /mnt -type f -size +1G -exec ls -lh {} \;

# Check what's using space
du -sh /opt/* /mnt/* | sort -h
```

### Add New Service

```bash
# 1. Create directory structure
mkdir -p /opt/03-business/<service-name>
cd /opt/03-business/<service-name>

# 2. Create docker-compose.yml
nano docker-compose.yml

# 3. Add to Traefik network
docker network connect traefik-public <container-name>

# 4. Start service
docker-compose up -d

# 5. Check logs
docker logs -f <container-name>

# 6. Add credentials to Vault
vault kv put aimpress/<service> \
  username="admin" \
  password="$(openssl rand -base64 32)"
```

---

## 🔟 TROUBLESHOOTING

### Website Not Responding (502/503 Error)

```bash
# 1. Check Traefik (reverse proxy)
docker logs traefik --tail 100 | grep -i error

# 2. Check if target container is running
docker ps | grep <service-name>

# 3. Check target container logs
docker logs <service-name> --tail 100

# 4. Test direct connection (bypass Traefik)
docker exec <service-name> curl -I localhost:<port>

# 5. Check if service is in correct network
docker network inspect traefik-public | grep <service-name>

# 6. Restart Traefik
docker restart traefik

# 7. Restart service
docker restart <service-name>
```

### Database Connection Errors

```bash
# 1. Check PostgreSQL is running
docker ps | grep postgres-main
docker logs postgres-main --tail 100

# 2. Test database connection
docker exec postgres-main psql -U aimpress_admin -c "SELECT version();"

# 3. Check disk space (common issue)
df -h /mnt/psql-data

# 4. Check database credentials
vault kv get aimpress/postgres/<service>

# 5. Verify application database config
cd /opt/<service-path>
cat docker-compose.yml | grep -i database

# 6. Restart PostgreSQL (careful!)
docker restart postgres-main

# 7. Check PostgreSQL connections
docker exec postgres-main psql -U aimpress_admin -c \
  "SELECT * FROM pg_stat_activity;"
```

### Container Keeps Restarting

```bash
# 1. Check logs for error
docker logs <container-name> --tail 200

# 2. Check restart count
docker inspect --format='{{.RestartCount}}' <container-name>

# 3. Check resource usage
docker stats <container-name> --no-stream
free -h
df -h

# 4. Stop auto-restart temporarily
docker update --restart=no <container-name>

# 5. Start manually to see full error
docker start <container-name> && docker logs -f <container-name>

# 6. Check for port conflicts
netstat -tulpn | grep <port>

# 7. Check healthcheck
docker inspect <container-name> | grep -A 20 Health
```

### Out of Disk Space

```bash
# 1. Find what's using space
du -sh /opt/* /mnt/* /var/* | sort -h | tail -20

# 2. Check Docker disk usage
docker system df

# 3. Clean Docker
docker system prune -af --volumes

# 4. Clean logs
journalctl --vacuum-time=7d
find /var/log -name "*.log" -mtime +7 -exec rm {} \;

# 5. Clean old backups
find /mnt/backups -mtime +30 -delete

# 6. Remove stopped containers
docker container prune -f

# 7. Remove unused volumes
docker volume prune -f
```

### SSL Certificate Issues

```bash
# 1. Check Traefik logs for certificate errors
docker logs traefik 2>&1 | grep -i "certificate\|acme\|letsencrypt"

# 2. Check certificate status
docker exec traefik cat /letsencrypt/acme.json | jq '.Certificates'

# 3. Force certificate renewal
docker exec traefik rm -rf /letsencrypt/acme.json
docker restart traefik

# Wait 2-3 minutes for new certificates

# 4. Check domain DNS
dig <domain.com>
nslookup <domain.com>

# 5. Test certificate
openssl s_client -connect <domain>:443 -servername <domain>
```

### High Memory Usage

```bash
# 1. Check which containers use most memory
docker stats --no-stream | sort -k4 -h

# 2. Check system memory
free -h
top -bn1 | head -20

# 3. Find memory-heavy processes
ps aux --sort=-%mem | head -10

# 4. Restart heavy containers
docker restart <container-name>

# 5. Check for memory leaks
docker logs <container-name> | grep -i "memory\|oom"

# 6. Add memory limits to docker-compose.yml
# deploy:
#   resources:
#     limits:
#       memory: 1G
```

### Vault Sealed/Inaccessible

```bash
# 1. Check Vault status
docker logs vault --tail 50

# 2. Check if sealed
docker exec vault vault status

# 3. Unseal Vault
/opt/00-infrastructure/vault/unseal.sh

# 4. If unseal script doesn't work
docker exec vault vault operator unseal <key1>
docker exec vault vault operator unseal <key2>
docker exec vault vault operator unseal <key3>

# 5. Get new token if expired
docker exec vault vault login
# Enter root token
```

---

## 1️⃣1️⃣ SYSTEM ARCHITECTURE

### High-Level Overview

```
                        INTERNET
                           ↓
                    Cloudflare (DNS + CDN)
                           ↓
              OVH Server (51.89.231.46)
                           ↓
            Traefik (Reverse Proxy + SSL)
                    ↓           ↓
            ┌───────┴───────────┴──────┬────────┐
            ↓                          ↓        ↓
        Services                   Monitoring   Tools
    ┌─────┴──────┐             ┌────┴────┐  ┌──┴───┐
    ↓            ↓             ↓         ↓  ↓      ↓
  Wiki         N8N         Grafana   Loki  Portainer
  Odoo      Supabase      Prometheus       Vault
  Authentik   ...
    ↓            ↓
    └────────────┴────────┐
                          ↓
                   Infrastructure
              ┌──────┬──────┬──────┐
              ↓      ↓      ↓      ↓
          PostgreSQL Redis Vault  Storage
        (/mnt/psql-data)        (/mnt/backups)
```

### Request Flow

1. **User** visits `https://wiki.ai-impress.com`
2. **Cloudflare** resolves DNS → 51.89.231.46
3. **Traefik** receives HTTPS request (port 443)
4. **Traefik** terminates SSL (Let's Encrypt certificate)
5. **Traefik** routes to Outline container via internal network
6. **Outline** authenticates user (via Authentik if needed)
7. **Outline** queries PostgreSQL for content
8. **Response** flows back: Outline → Traefik → User

**Critical points:** If Traefik or PostgreSQL fail, all services go down.

### Directory Structure

```
/opt/                           # All applications
├── 00-infrastructure/          # Core infrastructure
│   ├── traefik/               # Reverse proxy + SSL
│   ├── postgres/              # PostgreSQL main
│   ├── vault/                 # Secrets storage
│   │   ├── .vault-token       # Root token (keep safe!)
│   │   └── unseal.sh          # Unseal script
│   └── redis/                 # Cache & queues
│
├── 01-network/                # Network services
│   └── authentik/             # SSO authentication
│
├── 02-core/                   # Core business apps
│   ├── outline/               # Wiki
│   ├── n8n/                   # Automation
│   └── supabase/              # Backend platform
│
├── 03-business/               # Business applications
│   ├── odoo/                  # ERP
│   └── documenso/             # Document signing
│
├── 04-tools/                  # Management tools
│   ├── monitoring/            # Grafana, Prometheus, Loki
│   │   └── docker-compose.yml
│   ├── portainer/             # Docker UI
│   └── uptime-kuma/           # Uptime monitoring
│
└── 05-backups/                # Backup system
    ├── scripts/               # 👈 ALL ADMIN SCRIPTS
    │   ├── admin.sh           # Main admin interface
    │   ├── health-check-alerting.sh  # Health monitoring
    │   ├── backup-full-enhanced.sh   # Full backups
    │   ├── upload-to-outline.sh      # Report uploads
    │   └── ...
    ├── logs/                  # Script logs
    ├── reports/               # JSON reports
    └── config-versions/       # Config backups

/opt/infrastructure-docs/       # Documentation
├── scripts/
│   ├── server-full-report.sh  # Generate this report
│   └── modules/               # Report modules
├── reports/                   # Generated MD reports
├── ADMIN_GUIDE.md             # Administrator guide
└── SUMMARY.md                 # Setup summary

/mnt/                          # Mounted storage
├── backups/                   # 💾 ALL BACKUPS HERE
│   ├── *.tar.gz              # System backups
│   ├── *.sql.gz              # Database backups
│   └── vault-export-*.json   # Vault backups
│
└── psql-data/                 # 🗄️ ALL DATABASES HERE
    ├── pgdata/                # postgres-main
    ├── supabase-db/           # Supabase
    └── pgadmin-data/          # pgAdmin
```

### Service Dependencies

**Level 1: Infrastructure (Cannot delete)**
- Traefik → All websites depend on it
- PostgreSQL → All applications need database
- Redis → N8N, Authentik, others need cache
- Vault → All passwords stored here

**Level 2: Network**
- Authentik → Provides SSO for many services

**Level 3: Applications**
- Outline, N8N, Odoo, etc → Can delete if backed up

**Level 4: Tools**
- Grafana, Portainer, etc → Can recreate

### Network Architecture

**Docker Networks:**
- `traefik-public` - Public-facing services
- `postgres-network` - Database connections
- `redis-network` - Redis connections
- `authentik-network` - Auth services
- Individual service networks

**Port Mapping:**
- `80` → Traefik HTTP (redirects to HTTPS)
- `443` → Traefik HTTPS
- `22` → SSH
- Internal services: No direct external access

### Backup Strategy

**Automated backups:**
- **Daily 02:00** - Configuration backup
- **Daily 03:00** - Full system backup
- **Every 4 hours** - Vault secrets export
- **Weekly Saturday** - Database maintenance

**Backup locations:**
- `/mnt/backups/` - Primary backup location
- Vault exports in same location

**What's backed up:**
- All databases (PostgreSQL)
- All Docker configurations
- All Vault secrets
- Application data volumes

### Monitoring Setup

**Grafana** → Visualizations
**Prometheus** → Metrics collection  
**Loki** → Log aggregation  
**cAdvisor** → Container metrics  
**Node Exporter** → System metrics  
**Alertmanager** → Alert routing  
**Blackbox Exporter** → Website monitoring

**Alert flow:**
Health check → Detects problem → Sends to Slack + Email

---

## 📞 QUICK REFERENCE GUIDE

### Main Scripts

```bash
# System status
/opt/05-backups/scripts/admin.sh status

# Health check + alerts
/opt/05-backups/scripts/health-check-alerting.sh

# Generate full report
/opt/infrastructure-docs/scripts/server-full-report.sh

# Upload to Outline
/opt/05-backups/scripts/upload-to-outline.sh latest-report

# Full backup
/opt/05-backups/scripts/backup-full-enhanced.sh
```

### Emergency Commands

```bash
# Restart all containers
docker restart $(docker ps -q)

# Stop all containers
docker stop $(docker ps -q)

# Clean up everything
docker system prune -af --volumes

# Check logs for errors
docker ps -a | grep -v Up | awk '{print $NF}' | xargs -I {} docker logs --tail 50 {}
```

### Useful Aliases (Add to .bashrc)

```bash
alias dps='docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"'
alias dlogs='docker logs -f --tail 100'
alias dstats='docker stats --no-stream'
alias dclean='docker system prune -af'
alias vaultlogin='export VAULT_ADDR=http://127.0.0.1:8200 && export VAULT_TOKEN=hvs.jYguDdf2IzobXG8b9QWyATV8'
```

### Important URLs

- **Wiki:** https://wiki.ai-impress.com
- **N8N:** https://n8n.ai-impress.com
- **Monitoring:** https://grafana.ai-impress.com
- **Uptime:** https://uptime.ai-impress.com
- **Docker UI:** https://portainer.ai-impress.com

### Support Resources

- **Documentation:** https://wiki.ai-impress.com/collection/technical-knowledge-base-vCle1zKdMA
- **Reports:** https://wiki.ai-impress.com/collection/reports-yRgWpcsnJ7  
- **Slack:** #alerts channel
- **Email:** admin@ai-impress.com

---

**Report End**  
**Generated:** 2025-11-04 06:00:21  
**Version:** 5.0.0 (Modular)  
**Modules:** 7 sections
