Setup mail server on ODK Central (on-prem server)

1. What is the problem? Be very detailed.
I have an ODK Central already running on-perm Linux. Now I want to configure ODK Central to use a new mail server so that ODK Central (on-prem host) could work with the new mail server. How to configure and then restart ?

2. What app or server are you using and on what device and operating system? Include version numbers.
ODK Central v1.1.2, on-prem CentOS7.
3. What you have you tried to fix the problem?
Configure ODK Central to use a new mail server.

4. What steps can we take to reproduce the problem?
Review the documents.
5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

What step at are you stuck on?

1 Like

Hi Yaw,

Following your instructions, I tried to re-configure "files/service/config.json.template". But I think I made a mistake and lost all my previous configurations (app users, admins, projects, forms, etc.) in ODK. I tried to stop ODK central by "docker-compose down" (or "docker-compose stop", as I forgot which command I used). I think I shouldn't do that, now after I ""docker-compose up -d". I noticed that all my previous settings are gone now. Do you think there is a way to restore back ?

I appreciate your help !

This is recoverable!
You can restore the data volumes following

Hi Florian,

Thanks for the reply! Very helpful. I followed the link, and in step#1, I found only one volume returned "ASCII text", I think that is the current database. While in step #5 I found a few volumes returned "ASCII text", which one should I pick the correct one, based on timestamp ?

I appreciate your help !

Sorry, I've never done these steps myself, so unfortunately I have no experience with the particulars of this process. I'll have to ping @LN or @yanokwa for that one.

Thanks @Florian_May , I successfully restored.

But I met another question after I reset the mail server in files/service/config.json.template . After i restarted, and set to reset password, and then rebuild/run (docker-compose build service, docker-compose stop service, docker-compose up -d service). I noticed that there server couldn't be completely up when I "docker-compose ps" (nginx is always in Restarting status):

[root@ service]# docker-compose ps

   Name                     Command                 State       Ports

central_postgres_1 postgres Up 5432/tcp
enketo /bin/ ... Up 8005/tcp
enketo_redis_cache redis ... Up 6379/tcp
enketo_redis_main redis ... Up 6379/tcp
mail /bin/ exim -b ... Up 25/tcp
nginx /bin/bash /scripts/odk-set ... Restarting
pyxform waitress-serve --port=80 - ... Up
secrets ./gen ... Exit 0
service ./wai ... Restarting
[root@ service]#

Below is contents of files/service/config.json.template:
"email": {
"serviceAccount": "my email address (not post here for security reasons)",
"transport": "smtp",
"transportOpts": {
"host": "mail server host (not post here for security reasons)",
"port": 25,
"secure": false,
"auth": {
"user": "my-smtp-user",
"pass": "my-smtp-password"

Did I miss anything?

I appreciate your help.

Constant restarting usually points to a cert issue. Use docker-compose logs to see if nginx or service gives you any hints.