How to deploy LogChimp on Railway?
Guide to know your LogChimp site successfully on Railway
alert
There are many ways to install LogChimp, with Railway, you can get started with 3 easy steps, click the button, enter environment variables and hit deploy. This will automatically provisioning a PostgreSQL database and deploy single instance of LogChimp for you.
Clicking "Deploy on Railway" will auto provision a PostgreSQL database, and deploy a LogChimp site for you.
Disclaimer: The above link contains a referral code which gives referral credits to @mittalyashu.
Environment variables
To get most of LogChimp, you can customise using environment variables.
💡 Don't want to deal with environment variables? You can configure LogChimp using
logchimp.config.json
file, you can read more about it here.
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
FAQ
How to upload custom Logo?
Currently, LogChimp doesn’t have integration with third-party services to upload images and only support filesystem and the default filesystem of Railway is ephemeral, meaning the data isn’t persisted across deploys and restarts.
The trick is to directly update the LogChimp site logo URL directly from database, upload your logo to any image hosting service (for example, AWS S3 bucket), and grab the image url.
Go to PostgreSQL plugin > Data tab > click "settings" database table
Click on the first row in "settings" table, that should open that row in edit mode Paste the image url you've copied and click the save button.
How to add custom domain?
You can even attach a custom domain to your LogChimp site.
Go to variables page and click on edit button from dropdown for the environment variable of
LOGCHIMP_SERVER_HOST
.Enter your custom domain and click on checkmark icon.
🚨 Make sure to prefix
https://
protocol before your custom domain.
Demo
You can take a look at this demo deployment at: https://logchimp-production.up.railway.app.
warning
Conclusion
And with that you should have all the information you need to set up LogChimp on Railway. You should be able to accept your customers feedback with ease.