FaxStore
The configuration file is one of the most important files in a FaxStore installation. Without it, FaxStore wouldn't even boot or come online in any way. The configuration is where tokens and other non-dynamic information is stored and if the configuration file is edited a restart of the store is required to have the updates applied.
The config file (config.json) is a JavaScript Object Notation (JSON) file and requires specific formatting to properly function and load within FaxStore. The FaxStore config.json file consists of a 'section', 'key', and 'value' format to help with organising the file. For example:
{
"section": {
"key": "value",
"key": "value"
},
}Items marked in red are required. Items in orange are conditionally required.
Section | Key | Default Value | Description |
|---|---|---|---|
siteInformation | processPort |
| The port used to run FaxStore, this is referenced in Nginx. |
siteInformation | domain |
| The protocol and domain used for the store. |
siteInformation | ownerId |
| The master administrators for the store. |
siteInformation | startDebug |
| Sets the console to log extra information on start up. |
siteInformation | developerMode |
| Not recommended, sets the store to directly throw errors and not automate them into a report file. |
siteInformation | blockCORS |
| Blocks the CORS policy that FaxStore uses on requests by default. |
siteInformation | disableCfxCheck |
| Disables Cfx username checks on Tebex packages. |
siteInformation | tebexCheckoutGame |
| The game authentication link type to use. Optional. |
siteInformation | betaUpdates |
| Allow FaxStore to fetch beta updates. Note; beta updates may not be stable |
payments | usePayPal |
| Sets PayPal as a checkout option. |
payments | useStripe |
| Sets Stripe as a checkout option. |
payments | useSquare |
| Sets Square as a checkout option. |
payments | currency |
| In lowercase, the currency code to be used. |
payments | checkoutTOS |
| When 'true' a ToS checkbox will display on the Stripe checkout page. |
payments | stripeAutomaticTax |
| When 'true' Stripe checkouts will use automatic tax. This must be setup on the Stripe account. |
payments | stripePublishableKey |
| The 'Publishable Key' issued by Stripe. |
payments | stripeSecretKey |
| The 'Secret Key' issued by Stripe. |
payments | paypalClientId |
| The 'Client ID' issued by PayPal. |
payments | paypalClientSecret |
| The 'Client Secret' issued by PayPal. |
payments | squareAppId |
| The 'Application ID' provided by Square. |
payments | squareAppToken |
| The 'Application Token' provided by Square. |
payments | stripePaymentTypes |
| Stripe payment method override. Configure to add additional methods if needed |
tokens | discordBotToken |
| A Discord bot token which is used for Discord related requests. |
tokens | oAuth2ClientId |
| The 0Auth Client ID from a Discord application. |
tokens | oAuth2ClientToken |
| The 0Auth Client Token from a Discord application. |
tokens | googleClientId |
| Google 0Auth Client ID |
tokens | googleClientSecret |
| Google 0Auth Client Secret |
tokens | githubClientId |
| GitHub 0Auth Client ID |
tokens | githubClientSecret |
| GitHub 0Auth Client Secret |
tokens | tebexSecret |
| Tebex store secret used for Tebex related API calls. |
tokens | faxesLicenseKey |
| The Weblutions license key issued by Weblutions. |
SQLInformation | host |
| The host IP or domain for the database. |
SQLInformation | username |
| The user of the MySQL account. |
SQLInformation | password |
| The password corresponding to the username. |
SQLInformation | database |
| The database for FaxStore. |
emails | useEmails |
| Whether to use emails in FaxStore. Emails are required for standard accounts. |
emails | fromEmail |
| The from address for emails that are sent. |
emails | sendGridToken |
| The SendGrid token, required if the from address is changed. |
emails | emailHeader | ... | The header used in emails. |
emails | emailFooter | ... | The footer used in emails. |
discordConfig | useDiscordChannelLogs |
| Whether to use a Discord channel for Audit logs. |
discordConfig | botStatus |
| The bot status override used for the Discord bot. |
discordConfig | loggingChannelId |
| the log channel Id used if 'useDiscordChannelLogs' is enabled. |
discordConfig | autoJoinUsers |
| Toggles the function to automatically join users into your Discord when they create their account. |
discordConfig | useDiscordCommands |
| Enables Discord slash command usage. |
discordConfig | activity |
| Overrides the default Discord bot activity. Requires object items to operate. |
discordConfig.activity | status |
| The status the Discord bot will use. Must be one of: |
discordConfig.activity | name |
| The name for the status, if missing the domain is used. |
discordConfig.activity | type |
| Must be a valid Discord Activity Type's number |
redirects | [].name |
| The name of the link, this will be accessed by '/faxes' |
redirects | [].link |
| The link to redirect users to. |
{
"siteInformation": {
"processPort": 3000,
"domain": "http://localhost:3000",
"ownerId": [],
"startDebug": true,
"developerMode": true,
"blockCORS": true,
"apiKeys": []
},
"payments": {
"usePayPal": true,
"useStripe": true,
"useSquare": true,
"currency": "aud",
"stripePublishableKey": "",
"stripeSecretKey": "",
"paypalClientId": "",
"paypalClientSecret": "",
"squareAppId": "",
"squareAppToken": "",
"stripePaymentTypes": null
},
"tokens": {
"discordBotToken": "",
"oAuth2ClientId": "",
"oAuth2ClientToken": "",
"googleClientId": "",
"googleClientSecret": "",
"githubClientId": "",
"githubClientSecret": "",
"faxesLicenseKey": "",
"tebexSecret": "",
"tebexCheckoutGame": ""
},
"SQLInformation": {
"host": "",
"username": "",
"password": "",
"database": "faxstore"
},
"emails": {
"useEmails": true,
"fromEmail": "",
"sendGridToken": "",
"emailHeader": "",
"emailFooter": ""
},
"discordConfig": {
"useDiscordChannelLogs": true,
"autoJoinUsers": true,
"useDiscordCommands": true
},
"redirects": [
{
"name": "weblutions",
"link": "http://weblutions.com"
}
],
"smtp": {
"user": "",
"password": "",
"host": "",
"port": 2525,
"ssl": false,
"email": ""
}
}FaxStore retains a backup of the configuration file in the event of a failure during an upgrade. When FaxStore updates the configuration file during an update the file gets backed up into the below directory. This can assist during any data recovery situations if needed.
/faxstore/files/_config.backup.json