Configuration
Step by step guide for you to configure LogChimp site using `logchimp.config.json` file.
Overview
There are some configuration options which is pre-filled by default at installation process via one-click deploy button, and other options needs to be configured manually, for example secret credentials.
There are two ways to configure your LogChimp site:
logchimp.config.json
file- Environment variables
Tip
Configuring your LogChimp site is one time task and is not required for you to update often, unless you're rotating your secret credentials.
logchimp.config.json
file
A custom configuration file must be a valid JSON file located in the root folder.
Warning
The configuration below is just an example and not recommended for production use.
The two required options are database
and server
which are configurated during installation process.
{
"database": {
"host": "database.domain.com/postgresql",
"user": "logchimp",
"password": "password",
"name": "logchimp-database",
"port": 1001,
"ssl": false
},
"server": {
"port": 3000,
"secretKey": "Diq1-Xir9"
}
// ...
}
LogChimp uses SMPT connection for sending emails programmatically.
{
// ...
"mail": {
"service": "awesomeMail",
"host": "smtp.domain.com",
"user": "mail@sub-domain.domain.com",
"password": "strong-password",
"port": 587
}
}
Environment variables
SERVER
LOGCHIMP_SECRET_KEY
: Railway provides an easy way to generate 32-char secret key, by pressingCommand + K
(on MacOS) orCtrl + K
(on windows). Of course, you can provide your own secret key as well.PORT
: Please do not change the pre-filled value.LOGCHIMP
: This tells LogChimp to use environment variables instead of configuration file. Please do not change the pre-filled value.LOGCHIMP_THEME_STANDALONE
: LogChimp allows you to run on single port or split API and theme. If you're using Railway deploy button, you can leave the value tofalse
.
DATABASE
You can use your own PostgreSQL database or use PostgreSQL plugin provided by Railway. If you're using Railway plugin, you don't have to change the pre-filled values.
LOGCHIMP_DB_HOST
: Database host; default to${{ PGHOST }}
LOGCHIMP_DB_DATABASE
: Database name; default to${{ PGDATABASE }}
LOGCHIMP_DB_PORT
: Database port; default to${{ PGPORT }}
LOGCHIMP_DB_USER
: Database user; default to${{ PGUSER }}
LOGCHIMP_DB_PASSWORD
: Database password; default to${{ PGPASSWORD }}
LOGCHIMP_DB_SSL
: Database SSL; default totrue
You've have to provide SMPT mail authentication details.
LOGCHIMP_MAIL_SERVICE
: Name of the email service providerLOGCHIMP_MAIL_HOST
,LOGCHIMP_MAIL_USER
, andLOGCHIMP_MAIL_PASSWORD
LOGCHIMP_MAIL_PORT
: SMPT port provided by the service provider; default to587
Does LogChimp support SMPT connection URL?
No, currently it's not supported. But you're most welcome to submit a feature request anytime.