Problem
When self-hosting Seatable using Docker, you might experience issues with your SMTP setup, even if you’re confident that your configuration is correct because it works on another platform. This might appear to be a bug, but there is a specific cause. Recently, a friend encountered this problem, and I was able to identify the root cause.
Root Cause
Seatable does not automatically refresh its email configuration from Docker Compose environment variables after the initial setup.
When the service starts for the first time, email credentials such as the SMTP password are written to a configuration file stored in the container’s data volume. Updates to the environment variables in the Docker Compose file afterward do not overwrite these existing settings. For instance, running docker compose down && docker compose up -d will not apply new email credentials.
In this case, the originally set password 123456 remained in the configuration file instead of being updated from the new environment variable values, showing that the credentials are only applied during the first deployment.
You can access the configuration file by using the following commands:
# Log into the remote server first
# Within the server environment, locate the Seatable server container
# Access the Seatable server container
docker exec -it <seatable-server-container-id> bash
cd /shared/seatable/conf
nano dtable_web_settings.py
You will find the setting EMAIL_HOST_PASSWORD in the dtable_web_settings.py file, which contains the old password value.
So, although it seems like you have successfully updated the password, Seatable continues to use the old password saved in its configuration file.
Solution
To resolve this issue, update the email configuration directly in the dtable_web_settings.py file and restart the Seatable service, which involves restarting the container, to ensure that the changes take effect.
Ensure that the password and the port are set correctly. The port should be set to 587, which is used for STARTTLS.
Here’s an example of the full list of environment variables used for email configuration (SMTP):
SEATABLE_EMAIL_USE_TLS=True
SEATABLE_EMAIL_HOST=xxx
SEATABLE_EMAIL_HOST_USER=
SEATABLE_EMAIL_HOST_PASSWORD=
SEATABLE_EMAIL_PORT=587
SEATABLE_DEFAULT_FROM_EMAIL=
SEATABLE_SERVER_EMAIL=
By following these steps, your SMTP configuration should work as expected in your self-hosted Seatable setup.
Enjoyed this article? Support my work with a coffee ☕ on Ko-fi.