Skip to main content

Configuration

While you can configure organization-specific settings in the administrator web interface, global settings are set using environment variables. Set these environment variables when running the Seatsurfing backend Docker container.

Example: Using Docker Compose

environment:
POSTGRES_URL: 'postgres://seatsurfing:DB_PASSWORD@db/seatsurfing?sslmode=disable'
PUBLIC_LISTEN_ADDR: '0.0.0.0:8080'
...

List of environment variables

Environment Variable Type Default Description
DEVbool0Development Mode, set to 1 to enable
PUBLIC_LISTEN_ADDRstring0.0.0.0:8080TCP/IP listen address and port
POSTGRES_URLstringpostgres://postgres:root @ localhost/seatsurfing?sslmode=disablePostgreSQL Connection
JWT_PRIVATE_KEYstringPath to PEM file with RSA private key for JWT signing
JWT_PUBLIC_KEYstringPath to PEM file with RSA public key for JWT verification
SMTP_HOSTstring127.0.0.1SMTP server address
SMTP_PORTint25SMTP server port
SMTP_START_TLSbool0Use SMTP STARTTLS extension, set to 1 to enable
SMTP_INSECURE_SKIP_VERIFYbool0Disable SMTP TLS certificate validation
SMTP_AUTHbool0SMTP authentication, set to 1 to enable
SMTP_AUTH_METHODstringPLAINSMTP authentication method: PLAIN or LOGIN
SMTP_AUTH_USERstring SMTP auth username
SMTP_AUTH_PASSstring SMTP auth password
MAIL_SENDER_ADDRESSstringno-reply@seatsurfing.localMail sender address
MAIL_SERVICEstringsmtpMail send service (smtp = SMTP or acs = Azure Communication Services)
ACS_HOSTstringAzure Communication Services Host
ACS_ACCESS_KEYstringAzure Communication Services Access Key
MOCK_SENDMAILbool0SMTP mocking, set to 1 to enable
INIT_ORG_NAMEstringSample CompanyYour organization's name
INIT_ORG_USERstringadminYour organization's admin username
INIT_ORG_PASSstring12345678Your organization's admin password
INIT_ORG_LANGUAGEstringenYour organization's ISO language code
ALLOW_ORG_DELETEbool0Allow admins to delete their own organization
LOGIN_PROTECTION_MAX_FAILSint10Number of failed login attempts before user gets banned
LOGIN_PROTECTION_SLIDING_WINDOW_SECONDSint600Sliding window size in seconds for checking failed login attempts
LOGIN_PROTECTION_BAN_MINUTESint5Ban time in minutes
DISABLE_PASSWORD_LOGINbool0Disable password-based login entirely (use SSO only)
CRYPT_KEYstring A 32 bytes long string used for encrypting certain database fields
FILESYSTEM_BASE_PATHstringcurrent working directory The base path for loading additional ressources
PUBLIC_SCHEMEstringhttps  The http scheme under which your server is publicly reachable
PUBLIC_PORTint443  The http port under which your server is publicly reachable
STATIC_UI_PATHstring/app/ui  The path to the static UI Web Assets
CACHE_TYPEstringdefault  The cache to use ('default' = built-in, 'valkey' = Valkey.io)
VALKEY_HOSTSstring127.0.0.1:6379  Comma-separated list of Valkey hosts
VALKEY_USERNAMEstringdefault  Valkey username
VALKEY_PASSWORDstring Valkey password

Please note: Required option SMTP_AUTH_METHOD has been added in version 1.44.0.

MAIL_SERVICE=smtp
SMTP_HOST=smtp.office365.com
SMTP_PORT=587
SMTP_START_TLS=1
SMTP_AUTH=1
SMTP_AUTH_METHOD=LOGIN
SMTP_AUTH_USER=your-email@yourdomain.com
SMTP_AUTH_PASS=your-app-password
MAIL_SENDER_ADDRESS=your-email@yourdomain.com

Security Notes

  • Use App Passwords instead of regular passwords when possible
  • Ensure STARTTLS is enabled (SMTP_START_TLS=1)
  • Never set SMTP_INSECURE_SKIP_VERIFY=1 in production

Troubleshooting

If emails still fail to send:

  1. Verify your M365 account has SMTP AUTH enabled
  2. Use an App Password instead of your regular password
  3. Check that your firewall allows outbound connections to port 587
  4. Enable debug logging to see detailed SMTP conversation
  5. Try both PLAIN and LOGIN authentication methods