-
-
Notifications
You must be signed in to change notification settings - Fork 1
Settings
Jarbunq uses the SetMeUp library to handle its configuratio. Config is split mainly into 4 files:
- settings.json - General settings shared accross all environments
- settings.development.json - Development and test settings only
- settings.production.json - Production settings only
- settings.private.json - This is where you'll make your customisations
Some of the individual settings are optional, depending on which features you want to enable. For instance if you're not interested on the Strava features then you don't need to set anything under settings.strava. If you don't set the SMTP details then no email notifications will be sent. And so on.
To get the full list of settings, it's always best to check the settings files above directly (settings.json, settings.development.json and settings.production.json).
Below you'll find a table with the most relevant settings. Settings styled in italic are considered advanced and should not be changed in most cases, unless you have specific needs.
| key | value | default |
|---|---|---|
| app.url | Full base URL where the service can be reached | https://bunq.local:8833/ |
| app.port | Port on which the web server will listen to | 8833 |
| app.title | The title or name you want to give to the system | Jarbunq |
| app.auth.user | Username to authenticate on admin pages | admin |
| app.auth.password | Password to authenticate on admin pages | |
| amazon.paymentMultiplier | Multiply Amazon payment amounts by that value | 1 |
| amazon.refundDays | Amazon refunds should be processed X days after email is received | 8 |
| bunq.api.clientId | Required, the client ID of your bunq OAuth2 app | |
| bunq.api.clientSecret | Required, he client secret of your bunq OAuth2 app | |
| bunq.api.key | Required, your personal API key from bunq | |
| bunq.api.cryptoKey | Your random 16 byte encryption hex key (generate one) | |
| bunq.api.environment | The bunq API environment, "PRODUCTION" or "SANDBOX" | depends on NODE_ENV |
| bunq.api.ips | Array of allowed IPs, ["*"] to allow any IP, or null to allow current IP | ["*"] |
| bunq.accounts.main | Alias of your main account where funds are taken | |
| bunq.accounts.amazon | Alias of the Amazon credit card account | |
| bunq.accounts.strava | Alias of the account to where Strava savings should be made | |
| bunq.accounts.zalando | Alias of the account for Zalando pay-later invoices | |
| bunq.addPaymentNotes | Add notes to payments made by Jarbunq | true |
| bunq.disablePayments | Set to true to disable payments altogether | false |
| bunq.draftPayment | Use draft payments by default (needs user confirmation on the app) | false |
| bunq.maxPaymentAmount | Maximum allowed value for any payment made | 800 |
| bunq.minBalance | Minimum allowed balance on a source bunq accounts | 0 |
| bunq.callbacks.enabled | Enable payment / transaction notifications from bunq to Jarbunq | true |
| bunq.callbacks.saveRaw | Save full original callback body (as .rawBody) on the database | false |
| database.sizeLimits.payments | Maximum size of the payments collection | 2000 |
| database.sizeLimits.processedEmails | Maximum size of the processedEmails collection | 2000 |
| database.sizeLimits.stravaPayments | Maximum size of the stravaPayments collection | 2000 |
| database.sizeLimits.callbacks | Maximum size of the callbacks collection | 1000 |
| email.from | The "from" address of emails sent by the server | |
| email.to | The default destination address of emails sent | |
| email.markAsRead | Mark processed messages as read | true |
| email.weeklyReports | Send weekly payment reports to account owner | true |
| email.checkSecurity | Check email headers for SPF / DKIM / DMARC before processing | true |
| email.checkHeaders | Check additional headers, defined as key/value pairs | null |
| email.fetchHours | Fetch emails from the last X hours when starting the app | 24 |
| email.maxRetry | How many times should the client try to connect before aborting? | 5 |
| email.retryInterval | Retry after X milliseconds when fetching emails fails | 120000 |
| email.smtp.host | Hostname of the SMTP server, ie. smtp.gmail.com | |
| email.smtp.port | Hostname of the SMTP server, ie. 465 | |
| email.smtp.secure | Set true to use SSL, otherwise false, ie. true if using Gmail | |
| email.smtp.auth.user | Username for the SMTP server, ie. your Gmail address | |
| email.smtp.auth.password | Password for the SMTP server, ie. app password from Google | |
| email.accounts | Objects representing IMAP email accounts, more info... | |
| email.accounts.$accountID | Replace $accountID with an ID for this IMAP account | |
| email.accounts..inboxName | Name of the inbox on the IMAP server, ie. Inbox | |
| email.accounts..host | Hostname of the IMAP server, ie. imap.gmail.com | |
| email.accounts..port | Port of the IMAP server, ie. 993 | |
| email.accounts..user | Username for the IMAP server, ie. your Gmail address | |
| email.accounts..password | Password for the IMAP server, ie. app password from Google | |
| email.accounts..tls | Set true to use TLS, otherwise false, ie. true if using Gmail | |
| email.rules | Array of email rules, more info... | |
| email.rules[].action | Filename of an existing .ts action file under /src/email-actions | |
| email.rules[].from | The "from" address that should trigger the rule | |
| email.rules[].subject | Subject must contain this string to trigger the rule | |
| email.rules[].body | Email body must contain this string to trigger the rule | |
| notification.events.paymentSuccess | Send notifications of successful Jarbunq payments to user | true |
| notification.events.paymentError | Send notifications of failed Jarbunq payments to user | true |
| notification.push.enabled | Enable push notifications, more info... | false |
| notification.push.url | Full URL of the push notification service | Pushover |
| notification.push.subjectField | Name of the subject field on the push service | title |
| notification.push.messageField | Name of the message field on the push service | message |
| notification.push.post | Object with additional key / values to be posted to the push service | null |
| routes.ipWhitelist.global | Whitelist of IPs / ranges allowed to access Jarbunq | null |
| routes.ipWhitelist.$route | Whitelist of IPs / ranges allowed to access the specified $route | |
| scheduler.ignoreDelayed | Ignore delayed scheduled jobs (true) or run then anyways (false) | false |
| strava.api.clientId | Your OAuth2 client ID on Strava API, more info... | |
| strava.api.clientSecret | Your OAuth2 client secret on Strava API | |
| strava.api.refreshToken | Your initial OAuth2 refresh token from Strava API | |
| strava.payments.pricePerKm | How much you want to save for each kilometer (distance) | 0.09 |
| strava.payments.pricePerClimbedKm | How much you want to save for each kilometer climbed (elevation) | 1.19 |
| strava.payments.interval | Pay "weekly" on Mondays, can also be set do "daily" | weekly |
| strava.payments.time | Time when the transfer should be made | 16:00 |
| zalando.autoScheduleDays | Schedule Zalando invoices to be paid automatically after X days (0 or false to disable) | 8 |
| zalando.iban | IBAN of the target Zalando accounts, default is the official for Germany | DE86210700200123010101 |
| zalando.name | Payee (full company name) of the Zalando account | Zalando Payments GmbH |
It is also possible to set settings via environment variables. The variable names are the settings name prefixed with "SMU_" and having dots . replaced with underscore _. For instance:
- bunq.api.clientSecret = $SMU_bunq_api_clientSecret
- strava.api.clientId = $SMU_strava_api_clientId
On a very basic example, if you want to start the service on a different port, instead of changing the settings.app.port on the private settings file, you could run:
$ SMU_app_port=1234 node index.js
For more info you can always check the SetMeUp docs.
Once you have set your desired private settings, you can proceed and try running the service...
Need help? Open an issue
- Source code docs: https://jarbunq.devv.com
- bunq API docs: https://doc.bunq.com/