Spaces:
Paused
Paused
Update OAuth redirect URLs to use n8n-clickup-oauth-proxy.vercel.app
Browse files- Dockerfile +5 -1
- README.md +11 -0
- start.sh +11 -1
Dockerfile
CHANGED
|
@@ -59,7 +59,11 @@ ENV DB_POSTGRESDB_PORT="5432"
|
|
| 59 |
ENV DB_POSTGRESDB_DATABASE="n8n"
|
| 60 |
ENV DB_POSTGRESDB_USER="n8n"
|
| 61 |
ENV OLLAMA_HOST="0.0.0.0:11434"
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
ENV N8N_SEC_ALLOW_ALL_ORIGINS_FOR_WEBHOOKS="true"
|
| 64 |
ENV N8N_RUNNERS_ENABLED="true"
|
| 65 |
|
|
|
|
| 59 |
ENV DB_POSTGRESDB_DATABASE="n8n"
|
| 60 |
ENV DB_POSTGRESDB_USER="n8n"
|
| 61 |
ENV OLLAMA_HOST="0.0.0.0:11434"
|
| 62 |
+
# OAuth redirect URL configuration - override with proxy base URL
|
| 63 |
+
ENV N8N_EDITOR_BASE_URL="https://n8n-clickup-oauth-proxy.vercel.app/"
|
| 64 |
+
ENV N8N_WEBHOOK_URL="https://n8n-clickup-oauth-proxy.vercel.app/"
|
| 65 |
+
ENV WEBHOOK_URL="https://n8n-clickup-oauth-proxy.vercel.app/"
|
| 66 |
+
ENV N8N_SEC_EMBEDDER_HEADER_ALLOW_FROM_REGEX="^https?:\\/\\/([a-zA-Z0-9\\-]+\\.)*hf\\.space$"
|
| 67 |
ENV N8N_SEC_ALLOW_ALL_ORIGINS_FOR_WEBHOOKS="true"
|
| 68 |
ENV N8N_RUNNERS_ENABLED="true"
|
| 69 |
|
README.md
CHANGED
|
@@ -69,6 +69,17 @@ This Space deploys the [n8n Self-Hosted AI Starter Kit](https://github.com/n8n-i
|
|
| 69 |
* **Initial Startup Time**: The first startup might be slow due to database initialization and model download. Check the logs for progress.
|
| 70 |
* **WEBHOOK_URL / N8N_EDITOR_BASE_URL**: These are automatically configured by the `start.sh` script to use the Hugging Face Space URL.
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
## Troubleshooting
|
| 73 |
|
| 74 |
* Check the Space logs for any errors during startup or operation.
|
|
|
|
| 69 |
* **Initial Startup Time**: The first startup might be slow due to database initialization and model download. Check the logs for progress.
|
| 70 |
* **WEBHOOK_URL / N8N_EDITOR_BASE_URL**: These are automatically configured by the `start.sh` script to use the Hugging Face Space URL.
|
| 71 |
|
| 72 |
+
## OAuth Configuration (ClickUp and Other OAuth Providers)
|
| 73 |
+
|
| 74 |
+
This n8n instance is configured to use `n8n-clickup-oauth-proxy.vercel.app` as the base URL for OAuth callbacks and webhooks.
|
| 75 |
+
|
| 76 |
+
**For ClickUp OAuth setup in n8n:**
|
| 77 |
+
- **Redirect URL**: `https://n8n-clickup-oauth-proxy.vercel.app/rest/oauth2-credential/callback`
|
| 78 |
+
- Ensure your proxy at `n8n-clickup-oauth-proxy.vercel.app` forwards requests to the Space's actual n8n endpoint: `https://leon4gr45-n8n.hf.space/rest/oauth2-credential/callback`
|
| 79 |
+
|
| 80 |
+
**Alternative webhook URL** (if needed):
|
| 81 |
+
- `https://n8n-clickup-oauth-proxy.vercel.app/rest/workflow-callback-url`
|
| 82 |
+
|
| 83 |
## Troubleshooting
|
| 84 |
|
| 85 |
* Check the Space logs for any errors during startup or operation.
|
start.sh
CHANGED
|
@@ -140,7 +140,10 @@ if [ -z "$N8N_ENCRYPTION_KEY" ]; then
|
|
| 140 |
exit 1
|
| 141 |
fi
|
| 142 |
if [ -z "$DB_POSTGRESDB_PASSWORD" ]; then
|
| 143 |
-
echo "ERROR: DB_POSTGRESDB_PASSWORD is not set.
|
|
|
|
|
|
|
|
|
|
| 144 |
exit 1
|
| 145 |
fi
|
| 146 |
|
|
@@ -179,6 +182,13 @@ else
|
|
| 179 |
echo "Warning: Specific Hugging Face URL environment variables not found. Using fallback: $FALLBACK_URL"
|
| 180 |
fi
|
| 181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
# Optional: Increase n8n log level for more startup details
|
| 183 |
# export N8N_LOG_LEVEL="debug"
|
| 184 |
|
|
|
|
| 140 |
exit 1
|
| 141 |
fi
|
| 142 |
if [ -z "$DB_POSTGRESDB_PASSWORD" ]; then
|
| 143 |
+
echo "ERROR: DB_POSTGRESDB_PASSWORD is not set."
|
| 144 |
+
echo "Please set this as a Hugging Face Space secret:"
|
| 145 |
+
echo "1. Go to https://huggingface.co/spaces/Leon4gr45/n8n_suite/settings"
|
| 146 |
+
echo "2. Add secret: DB_POSTGRESDB_PASSWORD=<your-secure-password>"
|
| 147 |
exit 1
|
| 148 |
fi
|
| 149 |
|
|
|
|
| 182 |
echo "Warning: Specific Hugging Face URL environment variables not found. Using fallback: $FALLBACK_URL"
|
| 183 |
fi
|
| 184 |
|
| 185 |
+
# CRITICAL: Override with proxy URL for OAuth redirects
|
| 186 |
+
# This MUST come after the above URL detection to ensure it takes precedence
|
| 187 |
+
export N8N_EDITOR_BASE_URL="https://n8n-clickup-oauth-proxy.vercel.app/"
|
| 188 |
+
export N8N_WEBHOOK_URL="https://n8n-clickup-oauth-proxy.vercel.app/"
|
| 189 |
+
export WEBHOOK_URL="https://n8n-clickup-oauth-proxy.vercel.app/"
|
| 190 |
+
echo "OAuth redirect URLs configured to use proxy: https://n8n-clickup-oauth-proxy.vercel.app/"
|
| 191 |
+
|
| 192 |
# Optional: Increase n8n log level for more startup details
|
| 193 |
# export N8N_LOG_LEVEL="debug"
|
| 194 |
|