EnzGamers commited on
Commit
d96c7d8
·
verified ·
1 Parent(s): e59aebe

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +64 -1
README.md CHANGED
@@ -9,4 +9,67 @@ license: mit
9
  short_description: n8n free hosted with supebase
10
  ---
11
  Created by EnzGamers https://huggingface.co/EnzGamers
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  short_description: n8n free hosted with supebase
10
  ---
11
  Created by EnzGamers https://huggingface.co/EnzGamers
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
13
+ --
14
+
15
+ # n8n - Extended Workflow Automation on Hugging Face Spaces
16
+
17
+ This Hugging Face Space runs a powerful, extended instance of [n8n](https://n8n.io/), an open-source, fair-code, and self-hostable workflow automation tool.
18
+
19
+ This isn't just the standard n8n. This custom Docker image comes pre-loaded with a wide range of system dependencies, designed to support a vast array of community nodes and complex workflows right out of the box, without any extra configuration.
20
+
21
+ ## ✨ Key Features of This Custom Image
22
+
23
+ - **Based on Node.js 20**: Built on a modern and efficient `node:20-alpine` base image.
24
+ - **Chromium Included**: Full support for browser automation, web scraping, and PDF generation nodes thanks to the pre-installed `chromium`.
25
+ - **Python & Git Ready**: Comes with `python3`, `pip`, and `git` installed, allowing you to run scripts and interact with repositories directly within your workflows.
26
+ - **Build Tools Pre-installed**: Includes `build-base`, `g++`, and `make` to ensure compatibility with nodes that require compiling native addons.
27
+ - **Database Clients**: `postgresql-client` is included for easy connection to external PostgreSQL databases.
28
+ - **Graphics Libraries**: `cairo-dev` and `pango-dev` are available for nodes that perform canvas or image manipulation.
29
+
30
+ ## 🚀 How to Use
31
+
32
+ 1. **Launch the Space**: This Space will build the Docker container and start n8n automatically. Please be patient during the initial startup.
33
+ 2. **Access n8n**: Once the application is running, the n8n editor will be available to use.
34
+ 3. **Start Automating**: Begin building your workflows! You can now use many community nodes that would typically fail in a standard setup.
35
+
36
+ ### Data Persistence
37
+
38
+ By default, this Space uses SQLite to store your workflows and credentials, which are saved to the container's local filesystem (`/root/.n8n`).
39
+
40
+ **Important**: The filesystem of a Hugging Face Space is ephemeral. To ensure your workflows are not lost when the Space restarts, you should:
41
+ 1. **Download Your Workflows**: Regularly download your important workflows as JSON files from the n8n UI.
42
+ 2. **Commit to Repository**: For a more advanced setup, you can configure a process to commit your workflow files (`/root/.n8n/workflows/*.json`) back to the Space's Git repository.
43
+
44
+ ## ⚙️ Configuration (Using Space Secrets)
45
+
46
+ For a secure and customized setup, you should configure n8n using Hugging Face Space Secrets. You can find these in your Space's **Settings** tab.
47
+
48
+ | Secret Key | Description | Example Value |
49
+ | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
50
+ | `N8N_ENCRYPTION_KEY` | **(Highly Recommended)** A long, random, and secret key to encrypt your credentials. If not set, credentials are less secure. | `your_very_secret_and_long_encryption_key` |
51
+ | `GENERIC_TIMEZONE` | Sets the server timezone to ensure CRON nodes and date-based triggers run at the correct time. A list of timezones can be found [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). | `Europe/Berlin` |
52
+ | `NODE_FUNCTION_ALLOW_EXTERNAL` | Comma-separated list of external npm modules to allow in the Function and Edit Fields nodes (e.g., `axios,lodash`). | `axios,moment` |
53
+ | `WEBHOOK_URL` | **(Required for Production)** Manually set the public-facing webhook URL. It should be the URL of your Hugging Face Space. | `https://your-space-name.hf.space/` |
54
+
55
+ ### Connecting to an External Database
56
+
57
+ While SQLite is fine for testing, you can connect to an external PostgreSQL database (ex: Supabase 😉) for a more robust, production-ready setup. Simply set the following secrets:
58
+
59
+ - `DB_TYPE`: `postgresdb`
60
+ - `DB_POSTGRESDB_HOST`: Your database host
61
+ - `DB_POSTGRESDB_DATABASE`: Your database name
62
+ - `DB_POSTGRESDB_USER`: Your database user
63
+ - `DB_POSTGRESDB_PASSWORD`: Your database password
64
+ - `DB_POSTGRESDB_PORT`: `5432`
65
+
66
+ ## 🐳 About the Dockerfile
67
+
68
+ This instance is built from the provided `Dockerfile`. Here is a summary of its setup:
69
+
70
+ - **Base Image**: `node:20-alpine`
71
+ - **n8n Version**: `Latset`
72
+ - **System Dependencies**: Installs `git`, `python3`, `chromium`, `build-base`, `postgresql-client`, and more using `apk`.
73
+ - **Environment**: Sets up `PUPPETEER_EXECUTABLE_PATH` to work with the bundled Chromium.
74
+ - **Directories**: Creates and sets appropriate permissions for the n8n data directory at `/root/.n8n`.
75
+ - **Execution**: Starts n8n using the default `n8n start` command.