Configuration
Step-by-step guide for configuring LogChimp site using `logchimp.config.json` file.
Overview
Some configuration options are pre-filled by default during the installation process via the one-click deploy button, while others need to be configured manually, such as secret credentials.
There are two ways to configure your LogChimp site:
- Using the
logchimp.config.json
file - Using environment variables
Tip
Configuring your LogChimp site is a one-time task and is not required to be updated frequently, 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 is not recommended for production use.
The two required options are database
and server
, which are configured during the 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 SMTP connection for sending emails programmatically.
{
// ...
"mail": {
"service": "awesomeMail",
"host": "smtp.domain.com",
"user": "[email protected]",
"password": "strong-password",
"port": 587
}
}
Environment Variables
SERVER
LOGCHIMP_SECRET_KEY
: Railway provides an easy way to generate a 32-character 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 a configuration file. Please do not change the pre-filled value.LOGCHIMP_THEME_STANDALONE
: LogChimp allows you to run on a single port or split API and theme. If you're using the Railway deploy button, you can leave the value asfalse
.
DATABASE
You can use your own PostgreSQL database or use the PostgreSQL plugin provided by Railway. If you're using the Railway database, you don't have to change the pre-filled values.
LOGCHIMP_DB_HOST
: Database host; defaults to${{ PGHOST }}
LOGCHIMP_DB_DATABASE
: Database name; defaults to${{ PGDATABASE }}
LOGCHIMP_DB_PORT
: Database port; defaults to${{ PGPORT }}
LOGCHIMP_DB_USER
: Database user; defaults to${{ PGUSER }}
LOGCHIMP_DB_PASSWORD
: Database password; defaults to${{ PGPASSWORD }}
LOGCHIMP_DB_SSL
: Database SSL; defaults totrue
You have to provide SMTP mail authentication details.
LOGCHIMP_MAIL_SERVICE
: Name of the email service providerLOGCHIMP_MAIL_HOST
,LOGCHIMP_MAIL_USER
, andLOGCHIMP_MAIL_PASSWORD
LOGCHIMP_MAIL_PORT
: SMTP port provided by the service provider; defaults to587
Does LogChimp support SMTP connection URL?
No, currently it's not supported. But you're most welcome to submit a feature request anytime.