From bb8fdc64bacaf38ee05a1ad3a51bf356c1a2a9c3 Mon Sep 17 00:00:00 2001 From: git-hermes Date: Thu, 3 Sep 2026 10:03:59 +0200 Subject: [PATCH] docs(n8n-sandbox): clarify post-install setup --- __tests__/apps.test.ts | 13 +++++ apps/n8n-sandbox/config.json | 2 +- apps/n8n-sandbox/metadata/description.md | 72 +++++++++++++++++++----- 3 files changed, 73 insertions(+), 14 deletions(-) diff --git a/__tests__/apps.test.ts b/__tests__/apps.test.ts index 56b657b..304ba65 100644 --- a/__tests__/apps.test.ts +++ b/__tests__/apps.test.ts @@ -78,6 +78,19 @@ describe("n8n-sandbox installation secrets", () => { }) }) +describe("n8n-sandbox post-install documentation", () => { + test("documents the actual n8n override and optional SearXNG JSON setup", async () => { + const description = await getFile('n8n-sandbox', 'metadata/description.md') + + expect(description).toContain('services:\n n8n-2:\n environment:') + expect(description).toContain('N8N_SANDBOX_SERVICE_URL=http://sandbox-api:8080') + expect(description).not.toContain('sandbox-api:') + expect(description).toContain('/opt/runtipi/app-data/migrated/searxng/data/settings.yml') + expect(description).toContain('- json') + }) +}) + describe("modern compose files preserve runtime semantics", () => { test("n8n-sandbox keeps its one-shot certificate service", async () => { const fileContent = await getFile('n8n-sandbox', 'docker-compose.yml') diff --git a/apps/n8n-sandbox/config.json b/apps/n8n-sandbox/config.json index 199d22d..4899a59 100644 --- a/apps/n8n-sandbox/config.json +++ b/apps/n8n-sandbox/config.json @@ -6,7 +6,7 @@ "no_gui": true, "dynamic_config": true, "port": 8080, - "tipi_version": 2, + "tipi_version": 3, "min_tipi_version": "4.7.0", "version": "1.3.0", "author": "n8n", diff --git a/apps/n8n-sandbox/metadata/description.md b/apps/n8n-sandbox/metadata/description.md index f38275f..bc77bd2 100644 --- a/apps/n8n-sandbox/metadata/description.md +++ b/apps/n8n-sandbox/metadata/description.md @@ -1,33 +1,79 @@ # n8n Sandbox Service -Sandbox auto-hébergé pour l'**AI Assistant** de n8n (setup « Self-host the sandbox manually » de la doc n8n). L'app déploie les trois services de la stack officielle : +Sandbox auto-hébergé pour l'**AI Assistant** de n8n (configuration « Self-host the sandbox manually » de la documentation n8n). L'app déploie les trois services de la stack officielle : | Service | Rôle | |---|---| | `sandbox-certs` | Job one-shot : génère la CA privée et les certificats mTLS, puis s'arrête. | -| `sandbox-api` | Point d'entrée HTTP (`:8080`) que n8n appelle pour exécuter du code. | +| `sandbox-api` | Point d'entrée HTTP interne (`:8080`) que n8n appelle pour exécuter du code. | | `sandbox-runner-1` | Docker-in-Docker **privileged** : crée et exécute les conteneurs sandbox. | ## Après l'installation -Lors de l'installation, choisir une clé forte dans le champ **Clé API partagée avec n8n**. Dans l'app officielle **n8n** (paramètres ou `app.env`), ajouter le bloc suivant en recopiant cette même clé : +Pendant l'installation, choisir une clé forte dans le champ **Clé API partagée avec n8n** et la conserver dans un gestionnaire de mots de passe. -``` -N8N_ENABLED_MODULES=instance-ai -N8N_INSTANCE_AI_SANDBOX_ENABLED=true -N8N_INSTANCE_AI_SANDBOX_PROVIDER=n8n-sandbox -N8N_INSTANCE_AI_SANDBOX_IMAGE=n8nio/n8n-sandbox-service-sandbox:1.3.0 -N8N_SANDBOX_SERVICE_URL=http://sandbox-api:8080 -N8N_SANDBOX_SERVICE_API_KEY= -N8N_PROXY_HOPS=1 +Dans l'application officielle **n8n**, activer la **configuration utilisateur Docker Compose**, puis ajouter : + +```yaml +# Add your docker-compose overrides here. +# The overrides will be merged with the generated docker-compose.yml file. + +# Heure de Paris +services: + n8n-2: + environment: + - GENERIC_TIMEZONE=Europe/Paris + + # AI Assistant et Sandbox externe + - N8N_ENABLED_MODULES=instance-ai + - N8N_INSTANCE_AI_SANDBOX_ENABLED=true + - N8N_INSTANCE_AI_SANDBOX_PROVIDER=n8n-sandbox + - N8N_INSTANCE_AI_SANDBOX_IMAGE=n8nio/n8n-sandbox-service-sandbox:1.3.0 + - N8N_SANDBOX_SERVICE_URL=http://sandbox-api:8080 + - N8N_SANDBOX_SERVICE_API_KEY= ``` -Puis redémarrer n8n et vérifier depuis son conteneur : +Remplacer entièrement `` par la vraie clé, sans conserver les caractères `<` et `>`. Ne jamais publier cette valeur. +Le port de `N8N_SANDBOX_SERVICE_URL` reste `8080` : il s'agit du port interne du service Docker, pas du port éventuellement choisi dans l'interface Runtipi. + +Enregistrer la configuration, puis redémarrer l'application **n8n**. Pour vérifier la communication depuis son conteneur : + +```sh +wget -qO- http://sandbox-api:8080/healthz ``` -wget -qO- http://sandbox-api:8080/healthz # {"status":"ok"} + +La réponse attendue est `{"status":"ok"}`. + +## Recherche web avec SearXNG (facultatif) + +SearXNG est une application séparée et n'est pas nécessaire au fonctionnement du sandbox. L'installer seulement si les workflows ou outils IA de n8n doivent effectuer des recherches web. + +Pour autoriser les réponses JSON de SearXNG, modifier : + +```sh +sudo nano /opt/runtipi/app-data/migrated/searxng/data/settings.yml ``` +Conserver les autres réglages existants et vérifier que le fichier contient : + +```yaml +use_default_settings: true + +search: + formats: + - html + - json +``` + +Contrôle facultatif du contenu et des fins de ligne : + +```sh +sudo cat -A /opt/runtipi/app-data/migrated/searxng/data/settings.yml +``` + +Redémarrer ensuite l'application **SearXNG**, puis redémarrer **n8n** si sa configuration a également été modifiée. + ## Données persistantes Tout est sous `app-data//n8n-sandbox/data/` : -- 2.54.0