mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 01:24:05 -08:00
97cd564f7b
* 🎉 starting feature development * ✨ sharing/unsharing a credential (#3601) * 🎉 initial design * ✨ sharing/unsharing of credentials * ✅ add tests for EE credentials controller * 💪 implement review comments * 🛠 refactor agent creation and credential role locking * 👕 linting adjustments (#3691) * 👕 Adjust rule `naming-convention` * 👕 Fix `naming-convention` config value * 👕 Disregard casing for EE-prefixed vars Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * 🛠 refactor authAgents in tests (#3725) * 🛠 refactor authAgent * 🛠 refactor authAgent * 🛠 refactor authAgent * 🛠 refactor authAgent * 👕 fix ts issue * 🐘 add migration for mysql and postgres + add AuthAgent type Co-authored-by: Iván Ovejero <ivov.src@gmail.com> * ⚡️ refactor existing credentials routes (#3672) * 🎉 initial design * ✨ sharing/unsharing of credentials * ♻️ split credential update route into controller and service * 🔥 remove credentials test that is no longer applicable * ♻️ split credential creation route into controller and service * ♻️ split single credential get * ♻️ split delete credentials route * ♻️ split get all credentials route * 🔥 remove unused imports in credentials contoller * 🔥 remove console.log * :refactor: changes to credentials controller and service from review - removed credentials from service function names - made relations list optional - put allowGlobalOwner in options objects - check length of relations array so join doesn't happen if empty - update some comments to further explain rationale - remove unneeded `Object.assign` - remove non-null assertion from test * ♻️ move filtered credentials selected fields to variable * ♻️ remove unneeded merges in credentials service Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com> Co-authored-by: Ben Hesseldieck <1849459+BHesseldieck@users.noreply.github.com> * ✅ fix test * 🐛 fix imports * 👕 fix lint issue * User Management: switch over to decorators to define routes (#3827) * Add permissions details to credentials for User Management (#3863) * ⚡ Open `GET /users` * ⚡ Add permissions to cred service * 🚚 Rename method * ⚡ Refactor cred controller * 🧪 Adjust test * ✏️ Improve comment * ✏️ Improve another comment * ⚡ Account for multiple sharings * 🐛 Fix access when user is editor * 📘 Expand interface * 📘 Relocate types * 📘 Exempt cred entity with service-injected fields * 📘 Adjust interface * ♻️ Add permissions only in `GET /credentials` * 🧪 Add expectations for `ownedBy` * 🧪 Add sharing details test * 🧪 Make `ownedBy` checks more granular * 📘 Adjust interface * 🚚 Rename cred getter * ♻️ Refactor cred getter * 🧪 Expand tests * ♻️ Refactor to use guard * 👕 Remove unneeded lint exception * 🔥 Remove unneeded relation * 🚚 Move relation to `GET /credentials/:id` * 📘 Consolidate typings * 🎨 Add multiline for readability * 🔥 Remove unneeded type * ✏️ Clarity comment * ✏️ Make comments consistent * 👕 Add exception to fix build * 👕 Add more lint exceptions to fix build * 🐛 Check for non-owner * 📘 Improve typings * 🧪 Temporarily skip tests * 🔥 Remove `@ts-ignore` * 👕 Move lint exceptions * ♻️ Refactor cred service and controller * ⚡ Simplify check * ✏️ adjust naming to experimental * ⚡️ add credentialsSharing flag to settings * 🛠 add helper to check if UM is also enabled as dependency for CredentialsSharing * 👕 fix lint error * 🐘 change name of credential role * 🚧 WIP batch sharing * 🚧 WIP use put for sharing * ✅ add tests for batch sharing, 🛠 implement review suggestions * ✅ expand credential sharing tests for User Management (#3931) * 🧪 Expand cred sharing tests * ⚡ Add recently added flags * ✅ fix and adjust tests for /credentials Co-authored-by: Ben Hesseldieck <b.hesseldieck@gmail.com> * ✨ User management v2 Front End (#3795) * feat: Added responsive generic page view layout. * feat: Added empty state. * feat: Added credentials view empty state. * test: Added unit tests for N8nActionBox * feat: Added credentials list initial design. * feat: Added credential actions. Started working on filters. * feat: Updated InfoTip markup, added tests and changed stories to typescript. * feat: Added credentials filtering by type. Added support for apply/reset filters. * feat: Added credential sharing user select and user list. Added paywall component. * feat: Updated credentials view permissions. * feat: Added support for temporary sharing config for unsaved credentials. * test: Fixed broken snapshots. * feat: Added overflow styles to page-view-layout list. * feat: Handled sharee specific views. * feat: Integration between FE and BE to support real-world credential sharing scenario. * feat: Added front end permissions table. * feat: Refactored credential sharing flow. Updated design elements. * feat: Added margin and padding auto spacer utilities. * feat: Rehauled permissions to support instanceOwner role and action inheritance. * feat: Updated credentials view to apply filters automatically. * feat: Removed apply filters button and added active button state. * test: Updated component snapshots. * refactor: Renamed ResourceSharee to ResourceReader. * feat: Credential sharing error handling, permissions improvement. * feat: Updated permissions and error handling. * chore: Removed console.log. * 🛠 refactor enabling of credentialsSharing * feat: Removed owner menu selector from credentials when sharing is disabled. * refactor: Moved EE features into ee store module file. * 🛠 add sharing info to GET credentials/:id * fix: Fixed initial credential data loading for sharing. * chore: Removed console.log. * 🐛 owner can fetch any credential * 🛠 refactor users test * 👕 fix build type issue * fix: Removed owner tag when credential sharing is disabled. Fixed small reactivity issue. * chore: Removed console.log. * 🚧 separate fetching credentials between EE and open * fix: Fixed empty dropdown in users list. * fix: Fixed error message and initialization when credential gets unshared. * ✅ add tests for fetching single credential * Revert decorators based controllers * ⚡️ adjust credentials test route to also allow testing for sharees (#3999) * ⚡️ pull data if user is sharee * fix: Removed sharedWith and ownedBy from credentialData on testing credentials. Co-authored-by: Alex Grozav <alex@grozav.com> * 📈 add BE analytics * 💪 improve credential test * ⚡️ adjust tracking properties * ⚡️ removed roles from tracking * 🐛 fix build by removing imports * 🐛 fix missed merge conflict * feat: User management P2 Front End bug bash and improvements (#4014) * fix: Fixed type select size after reopening dropdown. * fix: Fixed template cards. * fix: Fixed card content size and copy input. * fix: Fixed horizontal overflow. * fix: Hiding el-tags scrollbar in select. * fix: Added fallback credential icon. Added oAuth credential owner check. * feat: Added disabled state to user select. * feat: Added fallback scenario for non-existent credential types. * feat: Adjusted credentials empty state to show that there are shared credentials. * fix: Fixed time title. * feat: Added actionable empty state when shared credentials are present. * fix: Made action box x padding smaller * feat: Repositioned owner tag for credential card. * feat: Updated message box styling to use n8n css variables. * feat: Added confirmation for deleting sharee. * fix: Fixed deleted credential types. Fixed select in dropdown bug. * fix: Various code improvements. Addressed PR review comments. * fix: Fixed credential deletion errors. * fix: Various code quality improvements. * feat: N8N-4531 update cloud coming soon features (#4025) * feat: Showing different upcoming feature messages and format for cloud. * fix: Changed url format. * fix: Updated how cloud deployment is determined. * feat: N8N-4527 implementing credential sharing FE telemetry (#4023) * feat: Added credential sharing telemetry. * chore: Renamed computed function for consistency. * refactor: Simplified subview telemetry sending. * fix: Changed to callDebounced() helper. * 📧 update email text * fix: Adjusted feature coming soon margin. * chore: Fixed type and line height for delete sharee confirmation modal. * refactor(editor-ui): Update telemetry (#4040) * 🔥 Remove `identify` from BE * ⚡ Add `versionCli` * ⚡ Add node creator ignore input * ⚡ Move obfuscators to editor-ui * ⚡ Refactor `ph-no-capture` * ⚡ Pass `user_id` to manual exec props * 🚚 Relocate class in `SettingsApiView` * ⚡ Add `userId` to BE PH `identify` call * ⏪ Revert "⚡ Add `userId` to BE PH `identify` call" This reverts commit895aaa45e5
. * Revert "⏪ Revert "⚡ Add `userId` to BE PH `identify` call"" This reverts commitb86a098c20
. * 🐛 Fix `Promise` handling in `track()` call * ⏪ Restore `Db.collections` call * ⚡ Set up PH payload to mirror RS * 🔥 Remove excess `userId` * 📘 Remove `userId` from interface * 🔥 Remove unused ref and method * fix: Fixed bug causing instanceOwner to become credential owner on update. (#4079) * 🐛 fix test for credential shared with member * 👕 fix lint issues * delete conflicting migration. this data is already seeded in CreateUserManagement * feat: Expand obfuscation to User Management credential sharing (#4070) ⚡ Expand obfuscation * feat: Added credential sharing infotip for instance owner. * bring back the migration. add a check to avoid conflicts on inserts * fix(cli): use a non-env config flag to detect of enterprise features are enabled (#4105) * chore: Changed ampersand to and in translation. * refactor(telemetry): Obfuscate code and JSON editors (#4118) ⚡ Obfuscate code and JSON editors * feat(editor): improve design and functionality of coming soon features (#4116) * feat: Improved coming soon feature design and functionality. * style: Removed empty line. * chore: Removed unused translation. * fix: fix telemetry for credential creates and updates (#4125) fix telemetry for credential creates and updates * feat: Display errors due to missing credentials in the correct node (#4124) feat: Display errors due to invalid credentials in the correct node when missing permissions * fix: remove duplicate header for coming soon features in cloud deployment * telemetry: fix the payload for `User viewed credential tab` * telemetry: add credential_id to 'User selected credential from node modal' * feat: update empty states for coming soon features * Update ActionBox.spec.ts.snap * replace UserSharingsDetails with a subset of User properties * rename the CreateCredentialsEditorRole to CreateCredentialsUserRole * move IUser to the workflow package * use IUser in the frontend as well Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Valya <68596159+valya@users.noreply.github.com> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com> Co-authored-by: Alex Grozav <alex@grozav.com> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in> Co-authored-by: Omar Ajoue <krynble@gmail.com>
964 lines
24 KiB
TypeScript
964 lines
24 KiB
TypeScript
/* eslint-disable no-restricted-syntax */
|
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
|
|
import path from 'path';
|
|
import * as core from 'n8n-core';
|
|
|
|
export const schema = {
|
|
database: {
|
|
type: {
|
|
doc: 'Type of database to use',
|
|
format: ['sqlite', 'mariadb', 'mysqldb', 'postgresdb'] as const,
|
|
default: 'sqlite',
|
|
env: 'DB_TYPE',
|
|
},
|
|
tablePrefix: {
|
|
doc: 'Prefix for table names',
|
|
format: '*',
|
|
default: '',
|
|
env: 'DB_TABLE_PREFIX',
|
|
},
|
|
logging: {
|
|
enabled: {
|
|
doc: 'Typeorm logging enabled flag.',
|
|
format: Boolean,
|
|
default: false,
|
|
env: 'DB_LOGGING_ENABLED',
|
|
},
|
|
options: {
|
|
doc: 'Logging level options, default is "error". Possible values: query,error,schema,warn,info,log. To enable all logging, specify "all"',
|
|
format: String,
|
|
default: 'error',
|
|
env: 'DB_LOGGING_OPTIONS',
|
|
},
|
|
maxQueryExecutionTime: {
|
|
doc: 'Maximum number of milliseconds query should be executed before logger logs a warning. Set 0 to disable long running query warning',
|
|
format: Number,
|
|
default: 1000,
|
|
env: 'DB_LOGGING_MAX_EXECUTION_TIME',
|
|
},
|
|
},
|
|
postgresdb: {
|
|
database: {
|
|
doc: 'PostgresDB Database',
|
|
format: String,
|
|
default: 'n8n',
|
|
env: 'DB_POSTGRESDB_DATABASE',
|
|
},
|
|
host: {
|
|
doc: 'PostgresDB Host',
|
|
format: String,
|
|
default: 'localhost',
|
|
env: 'DB_POSTGRESDB_HOST',
|
|
},
|
|
password: {
|
|
doc: 'PostgresDB Password',
|
|
format: String,
|
|
default: '',
|
|
env: 'DB_POSTGRESDB_PASSWORD',
|
|
},
|
|
port: {
|
|
doc: 'PostgresDB Port',
|
|
format: Number,
|
|
default: 5432,
|
|
env: 'DB_POSTGRESDB_PORT',
|
|
},
|
|
user: {
|
|
doc: 'PostgresDB User',
|
|
format: String,
|
|
default: 'root',
|
|
env: 'DB_POSTGRESDB_USER',
|
|
},
|
|
schema: {
|
|
doc: 'PostgresDB Schema',
|
|
format: String,
|
|
default: 'public',
|
|
env: 'DB_POSTGRESDB_SCHEMA',
|
|
},
|
|
|
|
ssl: {
|
|
ca: {
|
|
doc: 'SSL certificate authority',
|
|
format: String,
|
|
default: '',
|
|
env: 'DB_POSTGRESDB_SSL_CA',
|
|
},
|
|
cert: {
|
|
doc: 'SSL certificate',
|
|
format: String,
|
|
default: '',
|
|
env: 'DB_POSTGRESDB_SSL_CERT',
|
|
},
|
|
key: {
|
|
doc: 'SSL key',
|
|
format: String,
|
|
default: '',
|
|
env: 'DB_POSTGRESDB_SSL_KEY',
|
|
},
|
|
rejectUnauthorized: {
|
|
doc: 'If unauthorized SSL connections should be rejected',
|
|
format: 'Boolean',
|
|
default: true,
|
|
env: 'DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED',
|
|
},
|
|
},
|
|
},
|
|
mysqldb: {
|
|
database: {
|
|
doc: 'MySQL Database',
|
|
format: String,
|
|
default: 'n8n',
|
|
env: 'DB_MYSQLDB_DATABASE',
|
|
},
|
|
host: {
|
|
doc: 'MySQL Host',
|
|
format: String,
|
|
default: 'localhost',
|
|
env: 'DB_MYSQLDB_HOST',
|
|
},
|
|
password: {
|
|
doc: 'MySQL Password',
|
|
format: String,
|
|
default: '',
|
|
env: 'DB_MYSQLDB_PASSWORD',
|
|
},
|
|
port: {
|
|
doc: 'MySQL Port',
|
|
format: Number,
|
|
default: 3306,
|
|
env: 'DB_MYSQLDB_PORT',
|
|
},
|
|
user: {
|
|
doc: 'MySQL User',
|
|
format: String,
|
|
default: 'root',
|
|
env: 'DB_MYSQLDB_USER',
|
|
},
|
|
},
|
|
sqlite: {
|
|
executeVacuumOnStartup: {
|
|
doc: 'Runs VACUUM operation on startup to rebuild the database. Reduces filesize and optimizes indexes. WARNING: This is a long running blocking operation. Will increase start-up time.',
|
|
format: Boolean,
|
|
default: false,
|
|
env: 'DB_SQLITE_VACUUM_ON_STARTUP',
|
|
},
|
|
},
|
|
},
|
|
|
|
credentials: {
|
|
overwrite: {
|
|
data: {
|
|
// Allows to set default values for credentials which
|
|
// get automatically prefilled and the user does not get
|
|
// displayed and can not change.
|
|
// Format: { CREDENTIAL_NAME: { PARAMETER: VALUE }}
|
|
doc: 'Overwrites for credentials',
|
|
format: '*',
|
|
default: '{}',
|
|
env: 'CREDENTIALS_OVERWRITE_DATA',
|
|
},
|
|
endpoint: {
|
|
doc: 'Fetch credentials from API',
|
|
format: String,
|
|
default: '',
|
|
env: 'CREDENTIALS_OVERWRITE_ENDPOINT',
|
|
},
|
|
},
|
|
defaultName: {
|
|
doc: 'Default name for credentials',
|
|
format: String,
|
|
default: 'My credentials',
|
|
env: 'CREDENTIALS_DEFAULT_NAME',
|
|
},
|
|
},
|
|
|
|
workflows: {
|
|
defaultName: {
|
|
doc: 'Default name for workflow',
|
|
format: String,
|
|
default: 'My workflow',
|
|
env: 'WORKFLOWS_DEFAULT_NAME',
|
|
},
|
|
onboardingFlowDisabled: {
|
|
doc: 'Show onboarding flow in new workflow',
|
|
format: 'Boolean',
|
|
default: false,
|
|
env: 'N8N_ONBOARDING_FLOW_DISABLED',
|
|
},
|
|
},
|
|
|
|
executions: {
|
|
// By default workflows get always executed in their own process.
|
|
// If this option gets set to "main" it will run them in the
|
|
// main-process instead.
|
|
process: {
|
|
doc: 'In what process workflows should be executed',
|
|
format: ['main', 'own'] as const,
|
|
default: 'own',
|
|
env: 'EXECUTIONS_PROCESS',
|
|
},
|
|
|
|
mode: {
|
|
doc: 'If it should run executions directly or via queue',
|
|
format: ['regular', 'queue'] as const,
|
|
default: 'regular',
|
|
env: 'EXECUTIONS_MODE',
|
|
},
|
|
|
|
// A Workflow times out and gets canceled after this time (seconds).
|
|
// If the workflow is executed in the main process a soft timeout
|
|
// is executed (takes effect after the current node finishes).
|
|
// If a workflow is running in its own process is a soft timeout
|
|
// tried first, before killing the process after waiting for an
|
|
// additional fifth of the given timeout duration.
|
|
//
|
|
// To deactivate timeout set it to -1
|
|
//
|
|
// Timeout is currently not activated by default which will change
|
|
// in a future version.
|
|
timeout: {
|
|
doc: 'Max run time (seconds) before stopping the workflow execution',
|
|
format: Number,
|
|
default: -1,
|
|
env: 'EXECUTIONS_TIMEOUT',
|
|
},
|
|
maxTimeout: {
|
|
doc: 'Max execution time (seconds) that can be set for a workflow individually',
|
|
format: Number,
|
|
default: 3600,
|
|
env: 'EXECUTIONS_TIMEOUT_MAX',
|
|
},
|
|
|
|
// If a workflow executes all the data gets saved by default. This
|
|
// could be a problem when a workflow gets executed a lot and processes
|
|
// a lot of data. To not exceed the database's capacity it is possible to
|
|
// prune the database regularly or to not save the execution at all.
|
|
// Depending on if the execution did succeed or error a different
|
|
// save behaviour can be set.
|
|
saveDataOnError: {
|
|
doc: 'What workflow execution data to save on error',
|
|
format: ['all', 'none'] as const,
|
|
default: 'all',
|
|
env: 'EXECUTIONS_DATA_SAVE_ON_ERROR',
|
|
},
|
|
saveDataOnSuccess: {
|
|
doc: 'What workflow execution data to save on success',
|
|
format: ['all', 'none'] as const,
|
|
default: 'all',
|
|
env: 'EXECUTIONS_DATA_SAVE_ON_SUCCESS',
|
|
},
|
|
saveExecutionProgress: {
|
|
doc: 'Whether or not to save progress for each node executed',
|
|
format: 'Boolean',
|
|
default: false,
|
|
env: 'EXECUTIONS_DATA_SAVE_ON_PROGRESS',
|
|
},
|
|
|
|
// If the executions of workflows which got started via the editor
|
|
// should be saved. By default they will not be saved as this runs
|
|
// are normally only for testing and debugging. This setting can
|
|
// also be overwritten on a per workflow basis in the workflow settings
|
|
// in the editor.
|
|
saveDataManualExecutions: {
|
|
doc: 'Save data of executions when started manually via editor',
|
|
format: 'Boolean',
|
|
default: false,
|
|
env: 'EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS',
|
|
},
|
|
|
|
// To not exceed the database's capacity and keep its size moderate
|
|
// the execution data gets pruned regularly (default: 1 hour interval).
|
|
// All saved execution data older than the max age will be deleted.
|
|
// Pruning is currently not activated by default, which will change in
|
|
// a future version.
|
|
pruneData: {
|
|
doc: 'Delete data of past executions on a rolling basis',
|
|
format: 'Boolean',
|
|
default: false,
|
|
env: 'EXECUTIONS_DATA_PRUNE',
|
|
},
|
|
pruneDataMaxAge: {
|
|
doc: 'How old (hours) the execution data has to be to get deleted',
|
|
format: Number,
|
|
default: 336,
|
|
env: 'EXECUTIONS_DATA_MAX_AGE',
|
|
},
|
|
pruneDataTimeout: {
|
|
doc: 'Timeout (seconds) after execution data has been pruned',
|
|
format: Number,
|
|
default: 3600,
|
|
env: 'EXECUTIONS_DATA_PRUNE_TIMEOUT',
|
|
},
|
|
},
|
|
|
|
queue: {
|
|
health: {
|
|
active: {
|
|
doc: 'If health checks should be enabled',
|
|
format: 'Boolean',
|
|
default: false,
|
|
env: 'QUEUE_HEALTH_CHECK_ACTIVE',
|
|
},
|
|
port: {
|
|
doc: 'Port to serve health check on if activated',
|
|
format: Number,
|
|
default: 5678,
|
|
env: 'QUEUE_HEALTH_CHECK_PORT',
|
|
},
|
|
},
|
|
bull: {
|
|
prefix: {
|
|
doc: 'Prefix for all queue keys',
|
|
format: String,
|
|
default: '',
|
|
env: 'QUEUE_BULL_PREFIX',
|
|
},
|
|
redis: {
|
|
db: {
|
|
doc: 'Redis DB',
|
|
format: Number,
|
|
default: 0,
|
|
env: 'QUEUE_BULL_REDIS_DB',
|
|
},
|
|
host: {
|
|
doc: 'Redis Host',
|
|
format: String,
|
|
default: 'localhost',
|
|
env: 'QUEUE_BULL_REDIS_HOST',
|
|
},
|
|
password: {
|
|
doc: 'Redis Password',
|
|
format: String,
|
|
default: '',
|
|
env: 'QUEUE_BULL_REDIS_PASSWORD',
|
|
},
|
|
port: {
|
|
doc: 'Redis Port',
|
|
format: Number,
|
|
default: 6379,
|
|
env: 'QUEUE_BULL_REDIS_PORT',
|
|
},
|
|
timeoutThreshold: {
|
|
doc: 'Redis timeout threshold',
|
|
format: Number,
|
|
default: 10000,
|
|
env: 'QUEUE_BULL_REDIS_TIMEOUT_THRESHOLD',
|
|
},
|
|
},
|
|
queueRecoveryInterval: {
|
|
doc: 'If > 0 enables an active polling to the queue that can recover for Redis crashes. Given in seconds; 0 is disabled. May increase Redis traffic significantly.',
|
|
format: Number,
|
|
default: 60,
|
|
env: 'QUEUE_RECOVERY_INTERVAL',
|
|
},
|
|
gracefulShutdownTimeout: {
|
|
doc: 'How long should n8n wait for running executions before exiting worker process',
|
|
format: Number,
|
|
default: 30,
|
|
env: 'QUEUE_WORKER_TIMEOUT',
|
|
},
|
|
},
|
|
},
|
|
|
|
generic: {
|
|
// The timezone to use. Is important for nodes like "Cron" which start the
|
|
// workflow automatically at a specified time. This setting can also be
|
|
// overwritten on a per workflow basis in the workflow settings in the
|
|
// editor.
|
|
timezone: {
|
|
doc: 'The timezone to use',
|
|
format: '*',
|
|
default: 'America/New_York',
|
|
env: 'GENERIC_TIMEZONE',
|
|
},
|
|
},
|
|
|
|
// How n8n can be reached (Editor & REST-API)
|
|
path: {
|
|
format: String,
|
|
default: '/',
|
|
arg: 'path',
|
|
env: 'N8N_PATH',
|
|
doc: 'Path n8n is deployed to',
|
|
},
|
|
host: {
|
|
format: String,
|
|
default: 'localhost',
|
|
arg: 'host',
|
|
env: 'N8N_HOST',
|
|
doc: 'Host name n8n can be reached',
|
|
},
|
|
port: {
|
|
format: Number,
|
|
default: 5678,
|
|
arg: 'port',
|
|
env: 'N8N_PORT',
|
|
doc: 'HTTP port n8n can be reached',
|
|
},
|
|
listen_address: {
|
|
format: String,
|
|
default: '0.0.0.0',
|
|
env: 'N8N_LISTEN_ADDRESS',
|
|
doc: 'IP address n8n should listen on',
|
|
},
|
|
protocol: {
|
|
format: ['http', 'https'] as const,
|
|
default: 'http',
|
|
env: 'N8N_PROTOCOL',
|
|
doc: 'HTTP Protocol via which n8n can be reached',
|
|
},
|
|
ssl_key: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_SSL_KEY',
|
|
doc: 'SSL Key for HTTPS Protocol',
|
|
},
|
|
ssl_cert: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_SSL_CERT',
|
|
doc: 'SSL Cert for HTTPS Protocol',
|
|
},
|
|
editorBaseUrl: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_EDITOR_BASE_URL',
|
|
doc: 'Public URL where the editor is accessible. Also used for emails sent from n8n.',
|
|
},
|
|
|
|
security: {
|
|
excludeEndpoints: {
|
|
doc: 'Additional endpoints to exclude auth checks. Multiple endpoints can be separated by colon (":")',
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_AUTH_EXCLUDE_ENDPOINTS',
|
|
},
|
|
basicAuth: {
|
|
active: {
|
|
format: 'Boolean',
|
|
default: false,
|
|
env: 'N8N_BASIC_AUTH_ACTIVE',
|
|
doc: 'If basic auth should be activated for editor and REST-API',
|
|
},
|
|
user: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_BASIC_AUTH_USER',
|
|
doc: 'The name of the basic auth user',
|
|
},
|
|
password: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_BASIC_AUTH_PASSWORD',
|
|
doc: 'The password of the basic auth user',
|
|
},
|
|
hash: {
|
|
format: 'Boolean',
|
|
default: false,
|
|
env: 'N8N_BASIC_AUTH_HASH',
|
|
doc: 'If password for basic auth is hashed',
|
|
},
|
|
},
|
|
jwtAuth: {
|
|
active: {
|
|
format: 'Boolean',
|
|
default: false,
|
|
env: 'N8N_JWT_AUTH_ACTIVE',
|
|
doc: 'If JWT auth should be activated for editor and REST-API',
|
|
},
|
|
jwtHeader: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_JWT_AUTH_HEADER',
|
|
doc: 'The request header containing a signed JWT',
|
|
},
|
|
jwtHeaderValuePrefix: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_JWT_AUTH_HEADER_VALUE_PREFIX',
|
|
doc: 'The request header value prefix to strip (optional)',
|
|
},
|
|
jwksUri: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_JWKS_URI',
|
|
doc: 'The URI to fetch JWK Set for JWT authentication',
|
|
},
|
|
jwtIssuer: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_JWT_ISSUER',
|
|
doc: 'JWT issuer to expect (optional)',
|
|
},
|
|
jwtNamespace: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_JWT_NAMESPACE',
|
|
doc: 'JWT namespace to expect (optional)',
|
|
},
|
|
jwtAllowedTenantKey: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_JWT_ALLOWED_TENANT_KEY',
|
|
doc: 'JWT tenant key name to inspect within JWT namespace (optional)',
|
|
},
|
|
jwtAllowedTenant: {
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_JWT_ALLOWED_TENANT',
|
|
doc: 'JWT tenant to allow (optional)',
|
|
},
|
|
},
|
|
},
|
|
|
|
endpoints: {
|
|
payloadSizeMax: {
|
|
format: Number,
|
|
default: 16,
|
|
env: 'N8N_PAYLOAD_SIZE_MAX',
|
|
doc: 'Maximum payload size in MB.',
|
|
},
|
|
metrics: {
|
|
enable: {
|
|
format: 'Boolean',
|
|
default: false,
|
|
env: 'N8N_METRICS',
|
|
doc: 'Enable metrics endpoint',
|
|
},
|
|
prefix: {
|
|
format: String,
|
|
default: 'n8n_',
|
|
env: 'N8N_METRICS_PREFIX',
|
|
doc: 'An optional prefix for metric names. Default: n8n_',
|
|
},
|
|
},
|
|
rest: {
|
|
format: String,
|
|
default: 'rest',
|
|
env: 'N8N_ENDPOINT_REST',
|
|
doc: 'Path for rest endpoint',
|
|
},
|
|
webhook: {
|
|
format: String,
|
|
default: 'webhook',
|
|
env: 'N8N_ENDPOINT_WEBHOOK',
|
|
doc: 'Path for webhook endpoint',
|
|
},
|
|
webhookWaiting: {
|
|
format: String,
|
|
default: 'webhook-waiting',
|
|
env: 'N8N_ENDPOINT_WEBHOOK_WAIT',
|
|
doc: 'Path for waiting-webhook endpoint',
|
|
},
|
|
webhookTest: {
|
|
format: String,
|
|
default: 'webhook-test',
|
|
env: 'N8N_ENDPOINT_WEBHOOK_TEST',
|
|
doc: 'Path for test-webhook endpoint',
|
|
},
|
|
disableUi: {
|
|
format: Boolean,
|
|
default: false,
|
|
env: 'N8N_DISABLE_UI',
|
|
doc: 'Disable N8N UI (Frontend).',
|
|
},
|
|
disableProductionWebhooksOnMainProcess: {
|
|
format: Boolean,
|
|
default: false,
|
|
env: 'N8N_DISABLE_PRODUCTION_MAIN_PROCESS',
|
|
doc: 'Disable production webhooks from main process. This helps ensures no http traffic load to main process when using webhook-specific processes.',
|
|
},
|
|
skipWebhoooksDeregistrationOnShutdown: {
|
|
/**
|
|
* Longer explanation: n8n deregisters webhooks on shutdown / deactivation
|
|
* and registers on startup / activation. If we skip
|
|
* deactivation on shutdown, webhooks will remain active on 3rd party services.
|
|
* We don't have to worry about startup as it always
|
|
* checks if webhooks already exist.
|
|
* If users want to upgrade n8n, it is possible to run
|
|
* two instances simultaneously without downtime, similar
|
|
* to blue/green deployment.
|
|
* WARNING: Trigger nodes (like Cron) will cause duplication
|
|
* of work, so be aware when using.
|
|
*/
|
|
doc: 'Deregister webhooks on external services only when workflows are deactivated.',
|
|
format: Boolean,
|
|
default: false,
|
|
env: 'N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN',
|
|
},
|
|
},
|
|
|
|
publicApi: {
|
|
disabled: {
|
|
format: Boolean,
|
|
default: false,
|
|
env: 'N8N_PUBLIC_API_DISABLED',
|
|
doc: 'Whether to disable the Public API',
|
|
},
|
|
path: {
|
|
format: String,
|
|
default: 'api',
|
|
env: 'N8N_PUBLIC_API_ENDPOINT',
|
|
doc: 'Path for the public api endpoints',
|
|
},
|
|
},
|
|
|
|
workflowTagsDisabled: {
|
|
format: Boolean,
|
|
default: false,
|
|
env: 'N8N_WORKFLOW_TAGS_DISABLED',
|
|
doc: 'Disable workflow tags.',
|
|
},
|
|
|
|
userManagement: {
|
|
disabled: {
|
|
doc: 'Disable user management and hide it completely.',
|
|
format: Boolean,
|
|
default: false,
|
|
env: 'N8N_USER_MANAGEMENT_DISABLED',
|
|
},
|
|
jwtSecret: {
|
|
doc: 'Set a specific JWT secret (optional - n8n can generate one)', // Generated @ start.ts
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_USER_MANAGEMENT_JWT_SECRET',
|
|
},
|
|
emails: {
|
|
mode: {
|
|
doc: 'How to send emails',
|
|
format: ['', 'smtp'] as const,
|
|
default: 'smtp',
|
|
env: 'N8N_EMAIL_MODE',
|
|
},
|
|
smtp: {
|
|
host: {
|
|
doc: 'SMTP server host',
|
|
format: String, // e.g. 'smtp.gmail.com'
|
|
default: '',
|
|
env: 'N8N_SMTP_HOST',
|
|
},
|
|
port: {
|
|
doc: 'SMTP server port',
|
|
format: Number,
|
|
default: 465,
|
|
env: 'N8N_SMTP_PORT',
|
|
},
|
|
secure: {
|
|
doc: 'Whether or not to use SSL for SMTP',
|
|
format: Boolean,
|
|
default: true,
|
|
env: 'N8N_SMTP_SSL',
|
|
},
|
|
auth: {
|
|
user: {
|
|
doc: 'SMTP login username',
|
|
format: String, // e.g.'you@gmail.com'
|
|
default: '',
|
|
env: 'N8N_SMTP_USER',
|
|
},
|
|
pass: {
|
|
doc: 'SMTP login password',
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_SMTP_PASS',
|
|
},
|
|
},
|
|
sender: {
|
|
doc: 'How to display sender name',
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_SMTP_SENDER',
|
|
},
|
|
},
|
|
templates: {
|
|
invite: {
|
|
doc: 'Overrides default HTML template for inviting new people (use full path)',
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_UM_EMAIL_TEMPLATES_INVITE',
|
|
},
|
|
passwordReset: {
|
|
doc: 'Overrides default HTML template for resetting password (use full path)',
|
|
format: String,
|
|
default: '',
|
|
env: 'N8N_UM_EMAIL_TEMPLATES_PWRESET',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
externalFrontendHooksUrls: {
|
|
doc: 'URLs to external frontend hooks files, ; separated',
|
|
format: String,
|
|
default: 'https://public.n8n.cloud/posthog-hooks.js',
|
|
env: 'EXTERNAL_FRONTEND_HOOKS_URLS',
|
|
},
|
|
|
|
externalHookFiles: {
|
|
doc: 'Files containing external hooks. Multiple files can be separated by colon (":")',
|
|
format: String,
|
|
default: '',
|
|
env: 'EXTERNAL_HOOK_FILES',
|
|
},
|
|
|
|
nodes: {
|
|
include: {
|
|
doc: 'Nodes to load',
|
|
format: function check(rawValue: string): void {
|
|
if (rawValue === '') {
|
|
return;
|
|
}
|
|
try {
|
|
const values = JSON.parse(rawValue);
|
|
if (!Array.isArray(values)) {
|
|
throw new Error();
|
|
}
|
|
|
|
for (const value of values) {
|
|
if (typeof value !== 'string') {
|
|
throw new Error();
|
|
}
|
|
}
|
|
} catch (error) {
|
|
throw new TypeError(`The Nodes to include is not a valid Array of strings.`);
|
|
}
|
|
},
|
|
default: undefined,
|
|
env: 'NODES_INCLUDE',
|
|
},
|
|
exclude: {
|
|
doc: 'Nodes not to load',
|
|
format: function check(rawValue: string): void {
|
|
try {
|
|
const values = JSON.parse(rawValue);
|
|
if (!Array.isArray(values)) {
|
|
throw new Error();
|
|
}
|
|
|
|
for (const value of values) {
|
|
if (typeof value !== 'string') {
|
|
throw new Error();
|
|
}
|
|
}
|
|
} catch (error) {
|
|
throw new TypeError(`The Nodes to exclude is not a valid Array of strings.`);
|
|
}
|
|
},
|
|
default: '[]',
|
|
env: 'NODES_EXCLUDE',
|
|
},
|
|
errorTriggerType: {
|
|
doc: 'Node Type to use as Error Trigger',
|
|
format: String,
|
|
default: 'n8n-nodes-base.errorTrigger',
|
|
env: 'NODES_ERROR_TRIGGER_TYPE',
|
|
},
|
|
communityPackages: {
|
|
enabled: {
|
|
doc: 'Allows you to disable the usage of community packages for nodes',
|
|
format: Boolean,
|
|
default: true,
|
|
env: 'N8N_COMMUNITY_PACKAGES_ENABLED',
|
|
},
|
|
},
|
|
},
|
|
|
|
logs: {
|
|
level: {
|
|
doc: 'Log output level',
|
|
format: ['error', 'warn', 'info', 'verbose', 'debug', 'silent'] as const,
|
|
default: 'info',
|
|
env: 'N8N_LOG_LEVEL',
|
|
},
|
|
output: {
|
|
doc: 'Where to output logs. Options are: console, file. Multiple can be separated by comma (",")',
|
|
format: String,
|
|
default: 'console',
|
|
env: 'N8N_LOG_OUTPUT',
|
|
},
|
|
file: {
|
|
fileCountMax: {
|
|
doc: 'Maximum number of files to keep.',
|
|
format: Number,
|
|
default: 100,
|
|
env: 'N8N_LOG_FILE_COUNT_MAX',
|
|
},
|
|
fileSizeMax: {
|
|
doc: 'Maximum size for each log file in MB.',
|
|
format: Number,
|
|
default: 16,
|
|
env: 'N8N_LOG_FILE_SIZE_MAX',
|
|
},
|
|
location: {
|
|
doc: 'Log file location; only used if log output is set to file.',
|
|
format: String,
|
|
default: path.join(core.UserSettings.getUserN8nFolderPath(), 'logs/n8n.log'),
|
|
env: 'N8N_LOG_FILE_LOCATION',
|
|
},
|
|
},
|
|
},
|
|
|
|
versionNotifications: {
|
|
enabled: {
|
|
doc: 'Whether feature is enabled to request notifications about new versions and security updates.',
|
|
format: Boolean,
|
|
default: true,
|
|
env: 'N8N_VERSION_NOTIFICATIONS_ENABLED',
|
|
},
|
|
endpoint: {
|
|
doc: 'Endpoint to retrieve version information from.',
|
|
format: String,
|
|
default: 'https://api.n8n.io/api/versions/',
|
|
env: 'N8N_VERSION_NOTIFICATIONS_ENDPOINT',
|
|
},
|
|
infoUrl: {
|
|
doc: `Url in New Versions Panel with more information on updating one's instance.`,
|
|
format: String,
|
|
default: 'https://docs.n8n.io/getting-started/installation/updating.html',
|
|
env: 'N8N_VERSION_NOTIFICATIONS_INFO_URL',
|
|
},
|
|
},
|
|
|
|
templates: {
|
|
enabled: {
|
|
doc: 'Whether templates feature is enabled to load workflow templates.',
|
|
format: Boolean,
|
|
default: true,
|
|
env: 'N8N_TEMPLATES_ENABLED',
|
|
},
|
|
host: {
|
|
doc: 'Endpoint host to retrieve workflow templates from endpoints.',
|
|
format: String,
|
|
default: 'https://api.n8n.io/api/',
|
|
env: 'N8N_TEMPLATES_HOST',
|
|
},
|
|
},
|
|
|
|
binaryDataManager: {
|
|
availableModes: {
|
|
format: String,
|
|
default: 'filesystem',
|
|
env: 'N8N_AVAILABLE_BINARY_DATA_MODES',
|
|
doc: 'Available modes of binary data storage, as comma separated strings',
|
|
},
|
|
mode: {
|
|
format: ['default', 'filesystem'] as const,
|
|
default: 'default',
|
|
env: 'N8N_DEFAULT_BINARY_DATA_MODE',
|
|
doc: 'Storage mode for binary data',
|
|
},
|
|
localStoragePath: {
|
|
format: String,
|
|
default: path.join(core.UserSettings.getUserN8nFolderPath(), 'binaryData'),
|
|
env: 'N8N_BINARY_DATA_STORAGE_PATH',
|
|
doc: 'Path for binary data storage in "filesystem" mode',
|
|
},
|
|
binaryDataTTL: {
|
|
format: Number,
|
|
default: 60,
|
|
env: 'N8N_BINARY_DATA_TTL',
|
|
doc: 'TTL for binary data of unsaved executions in minutes',
|
|
},
|
|
persistedBinaryDataTTL: {
|
|
format: Number,
|
|
default: 1440,
|
|
env: 'N8N_PERSISTED_BINARY_DATA_TTL',
|
|
doc: 'TTL for persisted binary data in minutes (binary data gets deleted if not persisted before TTL expires)',
|
|
},
|
|
},
|
|
|
|
deployment: {
|
|
type: {
|
|
format: String,
|
|
default: 'default',
|
|
env: 'N8N_DEPLOYMENT_TYPE',
|
|
},
|
|
},
|
|
|
|
enterprise: {
|
|
features: {
|
|
sharing: {
|
|
format: Boolean,
|
|
default: false,
|
|
},
|
|
},
|
|
},
|
|
|
|
hiringBanner: {
|
|
enabled: {
|
|
doc: 'Whether hiring banner in browser console is enabled.',
|
|
format: Boolean,
|
|
default: true,
|
|
env: 'N8N_HIRING_BANNER_ENABLED',
|
|
},
|
|
},
|
|
|
|
personalization: {
|
|
enabled: {
|
|
doc: 'Whether personalization is enabled.',
|
|
format: Boolean,
|
|
default: true,
|
|
env: 'N8N_PERSONALIZATION_ENABLED',
|
|
},
|
|
},
|
|
|
|
diagnostics: {
|
|
enabled: {
|
|
doc: 'Whether diagnostic mode is enabled.',
|
|
format: Boolean,
|
|
default: true,
|
|
env: 'N8N_DIAGNOSTICS_ENABLED',
|
|
},
|
|
config: {
|
|
posthog: {
|
|
apiKey: {
|
|
doc: 'API key for PostHog',
|
|
format: String,
|
|
default: 'phc_4URIAm1uYfJO7j8kWSe0J8lc8IqnstRLS7Jx8NcakHo',
|
|
env: 'N8N_DIAGNOSTICS_POSTHOG_API_KEY',
|
|
},
|
|
apiHost: {
|
|
doc: 'API host for PostHog',
|
|
format: String,
|
|
default: 'https://app.posthog.com',
|
|
env: 'N8N_DIAGNOSTICS_POSTHOG_API_HOST',
|
|
},
|
|
disableSessionRecording: {
|
|
doc: 'Disable posthog session recording',
|
|
format: Boolean,
|
|
default: true,
|
|
env: 'N8N_DIAGNOSTICS_POSTHOG_DISABLE_RECORDING',
|
|
},
|
|
},
|
|
frontend: {
|
|
doc: 'Diagnostics config for frontend.',
|
|
format: String,
|
|
default: '1zPn9bgWPzlQc0p8Gj1uiK6DOTn;https://telemetry.n8n.io',
|
|
env: 'N8N_DIAGNOSTICS_CONFIG_FRONTEND',
|
|
},
|
|
backend: {
|
|
doc: 'Diagnostics config for backend.',
|
|
format: String,
|
|
default: '1zPn7YoGC3ZXE9zLeTKLuQCB4F6;https://telemetry.n8n.io/v1/batch',
|
|
env: 'N8N_DIAGNOSTICS_CONFIG_BACKEND',
|
|
},
|
|
},
|
|
},
|
|
|
|
defaultLocale: {
|
|
doc: 'Default locale for the UI',
|
|
format: String,
|
|
default: 'en',
|
|
env: 'N8N_DEFAULT_LOCALE',
|
|
},
|
|
|
|
onboardingCallPrompt: {
|
|
enabled: {
|
|
doc: 'Whether onboarding call prompt feature is available',
|
|
format: Boolean,
|
|
default: true,
|
|
env: 'N8N_ONBOARDING_CALL_PROMPTS_ENABLED',
|
|
},
|
|
},
|
|
};
|