Spaces:
Paused
Download README.md from Leon4gr45/n8n: direct link, hf CLI and curl.
- Browser
- Download file 5.07 kB
-
https://huggingface.co/spaces/Leon4gr45/n8n/resolve/main/README.md
- Command line
-
hf download hf://spaces/Leon4gr45/n8n/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Leon4gr45/n8n/resolve/main/README.md
title: n8n Self-Hosted AI Starter Kit
emoji: 🚀
colorFrom: green
colorTo: blue
sdk: docker
app_port: 5678
pinned: true
persistent_storage:
data:
type: disk
size: 10
mount_path: /data
n8n Self-Hosted AI Starter Kit on Hugging Face Spaces
This Space deploys the n8n Self-Hosted AI Starter Kit in a single container environment. It includes:
- n8n: Low-code automation platform.
- Ollama: Run local LLMs.
- Qdrant: Vector database.
- PostgreSQL: Database for n8n.
Setup
Secrets: Before this Space can run correctly, you MUST configure the following secrets in your Space settings:
N8N_ENCRYPTION_KEY: A long, random string for encrypting sensitive n8n data.- Generate one with:
openssl rand -hex 32
- Generate one with:
DB_POSTGRESDB_PASSWORD: Password for the PostgreSQLn8nuser and database.- Choose a strong password.
Wait for Build: The first time, the Docker image will build, and services will start. This can take a few minutes. The
start.shscript will also pull a default Ollama model (llama3.1:8bor similar small model), which can take time.Access n8n: Once the Space is running, click the "Open app" button or use the direct URL to access n8n on port 5678.
How to Use
n8n First-Time Setup: When you first access n8n, you'll be prompted to create an owner account.
Local Services:
- Ollama: Running on
http://localhost:11434(internally within the Space). The default model (llama3.1:8bor similar) should be available. You can use the "Ollama" node in n8n and set its "Base URL" tohttp://localhost:11434. - Qdrant: Running on
http://localhost:6333(internally). Use the "Qdrant" node in n8n and set its "URL" tohttp://localhost:6333. - PostgreSQL: n8n is already configured to use the internal PostgreSQL instance.
- Ollama: Running on
Persistent Storage:
- n8n workflows and credentials are stored in
/data/.n8n. - PostgreSQL data is stored in
/data/postgres. - Qdrant vector data is stored in
/data/qdrant_storage. - Ollama models are stored in
/data/.ollama. This data will persist across Space restarts if you've configured persistent storage for/data.
- n8n workflows and credentials are stored in
Accessing Local Files in n8n: The original starter kit mentions a
/data/shareddirectory for n8n to access local files. This directory is available in this Space. When using n8n nodes like "Read/Write Files from Disk", use paths like/data/shared/yourfile.txt.
Important Notes & Limitations
- Single Container: All services (n8n, Postgres, Qdrant, Ollama) run in a single Docker container. This is less robust than a multi-container
docker-composesetup but necessary for this Hugging Face Space deployment model. - Resource Usage: Running all these services, especially Ollama with LLMs, can be resource-intensive. Ensure your Space has adequate CPU, RAM, and storage. Consider upgrading hardware if performance is slow.
- Ollama Model Management:
- A default model is pulled on startup.
- To pull other models, you would typically exec into the container (possible via
hf clior other tools, but not directly via the Space UI) and runollama pull <modelname>. Alternatively, some n8n Ollama nodes might trigger a download if the model isn't present (behavior may vary).
- Initial Startup Time: The first startup might be slow due to database initialization and model download. Check the logs for progress.
- WEBHOOK_URL / N8N_EDITOR_BASE_URL: These are automatically configured by the
start.shscript to use the Hugging Face Space URL.
OAuth Configuration (ClickUp and Other OAuth Providers)
This n8n instance is configured to use n8n-clickup-oauth-proxy.vercel.app as the base URL for OAuth callbacks and webhooks.
For ClickUp OAuth setup in n8n:
- Redirect URL:
https://n8n-clickup-oauth-proxy.vercel.app/rest/oauth2-credential/callback - Ensure your proxy at
n8n-clickup-oauth-proxy.vercel.appforwards requests to the Space's actual n8n endpoint:https://leon4gr45-n8n.hf.space/rest/oauth2-credential/callback
Alternative webhook URL (if needed):
https://n8n-clickup-oauth-proxy.vercel.app/rest/workflow-callback-url
Troubleshooting
- Check the Space logs for any errors during startup or operation.
- Ensure secrets are correctly set.
- If n8n is inaccessible, one of the backend services might have failed to start.