[GH-ISSUE #1692] Documenso on coolify SMTP configuration #479

Open
opened 2026-02-26 18:47:14 +03:00 by kerem · 10 comments
Owner

Originally created by @rofkk on GitHub (Mar 8, 2025).
Original GitHub issue: https://github.com/documenso/documenso/issues/1692

I need help on configuring the SMTP server for my documenso service deployed via coolify.

Can anyone help me understand how the .env variables should be when it comes to coolify?

I have tried to follow the documentation of docuemenso but did not work.

Originally created by @rofkk on GitHub (Mar 8, 2025). Original GitHub issue: https://github.com/documenso/documenso/issues/1692 I need help on configuring the SMTP server for my documenso service deployed via coolify. Can anyone help me understand how the .env variables should be when it comes to coolify? I have tried to follow the documentation of docuemenso but did not work.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 8, 2025):

Thank you for opening your first issue and for being a part of the open signing revolution!

One of our team members will review it and get back to you as soon as it possible 💚

Meanwhile, please feel free to hop into our community in Discord

<!-- gh-comment-id:2708297745 --> @github-actions[bot] commented on GitHub (Mar 8, 2025): Thank you for opening your first issue and for being a part of the open signing revolution! <br /> One of our team members will review it and get back to you as soon as it possible 💚 <br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)
Author
Owner

@osos commented on GitHub (Mar 15, 2025):

I also have troubles getting the SMTP-auth settings to work... however, here on a self-hosted docker solution, trying to setup with smtp host on a another service.
No debuggin information in log / console, and no connection made.
No sure how to figure this out.

<!-- gh-comment-id:2726771045 --> @osos commented on GitHub (Mar 15, 2025): I also have troubles getting the SMTP-auth settings to work... however, here on a self-hosted docker solution, trying to setup with smtp host on a another service. No debuggin information in log / console, and no connection made. No sure how to figure this out.
Author
Owner

@Aj7ay7 commented on GitHub (Mar 25, 2025):

use this in coolify

services:
  documenso:
    image: documenso/documenso
    depends_on:
      database:
        condition: service_healthy
    environment:
      - SERVICE_FQDN_DOCUMENSO_3000
      - 'NEXTAUTH_URL=${SERVICE_FQDN_DOCUMENSO_3000}'
      - 'NEXTAUTH_SECRET=${SERVICE_BASE64_AUTHSECRET}'
      - 'NEXT_PRIVATE_ENCRYPTION_KEY=${SERVICE_BASE64_ENCRYPTIONKEY}'
      - 'NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=${SERVICE_BASE64_SECONDARYENCRYPTIONKEY}'
      - 'NEXT_PUBLIC_WEBAPP_URL=${SERVICE_FQDN_DOCUMENSO_3000}'
      - 'NEXT_PRIVATE_DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@database/${POSTGRES_DB:-documenso-db}?schema=public'
      - 'NEXT_PRIVATE_DIRECT_DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@database/${POSTGRES_DB:-documenso-db}?schema=public'
      # SMTP Configuration
      - 'NEXT_PRIVATE_SMTP_TRANSPORT=smtp-auth'
      - 'NEXT_PRIVATE_SMTP_HOST=smtp.gmail.com'
      - 'NEXT_PRIVATE_SMTP_PORT=587'
      - 'NEXT_PRIVATE_SMTP_USERNAME=${SMTP_USERNAME}'
      - 'NEXT_PRIVATE_SMTP_PASSWORD=${SMTP_APP_PASSWORD}'
      - 'NEXT_PRIVATE_SMTP_SECURE=false'
      - 'NEXT_PRIVATE_SMTP_FROM_NAME=Documenso'
      - 'NEXT_PRIVATE_SMTP_FROM_ADDRESS=${SMTP_FROM_ADDRESS}'
      - 'NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT=5'
    healthcheck:
      test:
        - CMD-SHELL
        - "wget -q -O - http://documenso:3000/ | grep -q 'Sign in to your account'"
      interval: 2s
      timeout: 10s
      retries: 20

  database:
    image: 'postgres:16-alpine'
    environment:
      - 'POSTGRES_USER=${SERVICE_USER_POSTGRES}'
      - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}'
      - 'POSTGRES_DB=${POSTGRES_DB:-documenso-db}'
    volumes:
      - 'documenso_postgresql_data:/var/lib/postgresql/data'
    healthcheck:
      test:
        - CMD-SHELL
        - 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'
      interval: 5s
      timeout: 20s
      retries: 10

volumes:
  documenso_postgresql_data: 
<!-- gh-comment-id:2750700593 --> @Aj7ay7 commented on GitHub (Mar 25, 2025): use this in coolify ``` services: documenso: image: documenso/documenso depends_on: database: condition: service_healthy environment: - SERVICE_FQDN_DOCUMENSO_3000 - 'NEXTAUTH_URL=${SERVICE_FQDN_DOCUMENSO_3000}' - 'NEXTAUTH_SECRET=${SERVICE_BASE64_AUTHSECRET}' - 'NEXT_PRIVATE_ENCRYPTION_KEY=${SERVICE_BASE64_ENCRYPTIONKEY}' - 'NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=${SERVICE_BASE64_SECONDARYENCRYPTIONKEY}' - 'NEXT_PUBLIC_WEBAPP_URL=${SERVICE_FQDN_DOCUMENSO_3000}' - 'NEXT_PRIVATE_DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@database/${POSTGRES_DB:-documenso-db}?schema=public' - 'NEXT_PRIVATE_DIRECT_DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@database/${POSTGRES_DB:-documenso-db}?schema=public' # SMTP Configuration - 'NEXT_PRIVATE_SMTP_TRANSPORT=smtp-auth' - 'NEXT_PRIVATE_SMTP_HOST=smtp.gmail.com' - 'NEXT_PRIVATE_SMTP_PORT=587' - 'NEXT_PRIVATE_SMTP_USERNAME=${SMTP_USERNAME}' - 'NEXT_PRIVATE_SMTP_PASSWORD=${SMTP_APP_PASSWORD}' - 'NEXT_PRIVATE_SMTP_SECURE=false' - 'NEXT_PRIVATE_SMTP_FROM_NAME=Documenso' - 'NEXT_PRIVATE_SMTP_FROM_ADDRESS=${SMTP_FROM_ADDRESS}' - 'NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT=5' healthcheck: test: - CMD-SHELL - "wget -q -O - http://documenso:3000/ | grep -q 'Sign in to your account'" interval: 2s timeout: 10s retries: 20 database: image: 'postgres:16-alpine' environment: - 'POSTGRES_USER=${SERVICE_USER_POSTGRES}' - 'POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}' - 'POSTGRES_DB=${POSTGRES_DB:-documenso-db}' volumes: - 'documenso_postgresql_data:/var/lib/postgresql/data' healthcheck: test: - CMD-SHELL - 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}' interval: 5s timeout: 20s retries: 10 volumes: documenso_postgresql_data: ```
Author
Owner

@Aj7ay7 commented on GitHub (Mar 25, 2025):

The main issue on coolify or i dont know in documenso
Even after signed from both parties it still showing pending 😂
Image

<!-- gh-comment-id:2750704237 --> @Aj7ay7 commented on GitHub (Mar 25, 2025): The main issue on coolify or i dont know in documenso Even after signed from both parties it still showing pending 😂 <img width="1243" alt="Image" src="https://github.com/user-attachments/assets/e2809474-b140-4b4d-b400-f545315fce8c" />
Author
Owner

@doronkatz commented on GitHub (Apr 8, 2025):

@Aj7ay7 can you share your .env (obviously with sensitive stuff redacted)? Im trying to get mine running as well

<!-- gh-comment-id:2787209497 --> @doronkatz commented on GitHub (Apr 8, 2025): @Aj7ay7 can you share your .env (obviously with sensitive stuff redacted)? Im trying to get mine running as well
Author
Owner

@Aj7ay7 commented on GitHub (Apr 28, 2025):

POSTGRES_DB=documenso-db
SERVICE_BASE64_AUTHSECRET=tlk3rgX9E2DXwXXXXXXXXXXknGDMnt
SERVICE_BASE64_ENCRYPTIONKEY=g6rw5RzFX30XXXXXXXXXXCBSEOYdw
SERVICE_BASE64_SECONDARYENCRYPTIONKEY=UpEmeAPr5XXXXXX4EPEmoyd8AHIkf
SERVICE_FQDN_DOCUMENSO=https://documenso.XXXX.com
SERVICE_FQDN_DOCUMENSO_3000=https://documenso.XXXX.com
SERVICE_PASSWORD_POSTGRES=17U6xJZfCsXXXXXXjApD7JQf9viC4
SERVICE_USER_POSTGRES=J0jq5NXXXPGMokC
SMTP_APP_PASSWORD=ogfw XXXXX upsk
SMTP_FROM_ADDRESS=ajay@gmail.com
SMTP_USERNAME=ajay@gmail.com
<!-- gh-comment-id:2834159595 --> @Aj7ay7 commented on GitHub (Apr 28, 2025): ``` POSTGRES_DB=documenso-db SERVICE_BASE64_AUTHSECRET=tlk3rgX9E2DXwXXXXXXXXXXknGDMnt SERVICE_BASE64_ENCRYPTIONKEY=g6rw5RzFX30XXXXXXXXXXCBSEOYdw SERVICE_BASE64_SECONDARYENCRYPTIONKEY=UpEmeAPr5XXXXXX4EPEmoyd8AHIkf SERVICE_FQDN_DOCUMENSO=https://documenso.XXXX.com SERVICE_FQDN_DOCUMENSO_3000=https://documenso.XXXX.com SERVICE_PASSWORD_POSTGRES=17U6xJZfCsXXXXXXjApD7JQf9viC4 SERVICE_USER_POSTGRES=J0jq5NXXXPGMokC SMTP_APP_PASSWORD=ogfw XXXXX upsk SMTP_FROM_ADDRESS=ajay@gmail.com SMTP_USERNAME=ajay@gmail.com ```
Author
Owner

@BadrLaajali commented on GitHub (Jul 22, 2025):

Any news ?
same problem
Log :
Submitting job to endpoint:

https://documenso.xxxx.com/api/jobs/send.signup.confirmation.email/cmdenmh1d0000k81xl357k39q
2025-07-22T14:56:09.156615827Z [JOBS]: Triggering job send.signup.confirmation.email with payload { email: 'yyyyy@xxxx.com' }
2025-07-22T14:56:39.377191057Z Error: Greeting never received
2025-07-22T14:56:39.377238817Z     at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:809:19)
2025-07-22T14:56:39.377243417Z     at SMTPConnection._onError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:795:20)
2025-07-22T14:56:39.377246827Z     at Timeout.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:729:22)
2025-07-22T14:56:39.377250607Z     at listOnTimeout (node:internal/timers:588:17)
2025-07-22T14:56:39.377253857Z     at process.processTimers (node:internal/timers:523:7) {
2025-07-22T14:56:39.377257117Z   code: 'ETIMEDOUT',
2025-07-22T14:56:39.377260257Z   command: 'CONN'
2025-07-22T14:56:39.377281707Z }
2025-07-22T14:56:39.377958993Z [JOBS]: Job send.signup.confirmation.email failed Error: Failed to send the confirmation email
2025-07-22T14:56:39.377972973Z     at sendConfirmationToken (file:///app/apps/remix/build/server/hono/packages/lib/server-only/user/send-confirmation-token.js:54:11)
2025-07-22T14:56:39.377976373Z     at async Module.run (file:///app/apps/remix/build/server/hono/packages/lib/jobs/definitions/emails/send-confirmation-email.handler.js:6:3)
2025-07-22T14:56:39.377979223Z     at async Object.handler (file:///app/apps/remix/build/server/hono/packages/lib/jobs/definitions/emails/send-confirmation-email.js:20:5)
2025-07-22T14:56:39.377982163Z     at async file:///app/apps/remix/build/server/hono/packages/lib/jobs/client/local.js:101:9
2025-07-22T14:56:39.377984743Z     at async dispatch (file:///app/node_modules/hono/dist/compose.js:30:17)
2025-07-22T14:56:39.377987273Z     at async file:///app/apps/remix/build/server/hono/server/router.js:57:3
2025-07-22T14:56:39.377989833Z     at async dispatch (file:///app/node_modules/hono/dist/compose.js:30:17)
2025-07-22T14:56:39.378004263Z     at async requestId2 (file:///app/node_modules/hono/dist/middleware/request-id/request-id.js:16:5)
2025-07-22T14:56:39.378007263Z     at async dispatch (file:///app/node_modules/hono/dist/compose.js:30:17)
2025-07-22T14:56:39.378009213Z     at async dispatch (file:///app/node_modules/hono/dist/compose.js:30:17)
<!-- gh-comment-id:3103210038 --> @BadrLaajali commented on GitHub (Jul 22, 2025): Any news ? same problem Log : Submitting job to endpoint: ``` https://documenso.xxxx.com/api/jobs/send.signup.confirmation.email/cmdenmh1d0000k81xl357k39q 2025-07-22T14:56:09.156615827Z [JOBS]: Triggering job send.signup.confirmation.email with payload { email: 'yyyyy@xxxx.com' } 2025-07-22T14:56:39.377191057Z Error: Greeting never received 2025-07-22T14:56:39.377238817Z at SMTPConnection._formatError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:809:19) 2025-07-22T14:56:39.377243417Z at SMTPConnection._onError (/app/node_modules/nodemailer/lib/smtp-connection/index.js:795:20) 2025-07-22T14:56:39.377246827Z at Timeout.<anonymous> (/app/node_modules/nodemailer/lib/smtp-connection/index.js:729:22) 2025-07-22T14:56:39.377250607Z at listOnTimeout (node:internal/timers:588:17) 2025-07-22T14:56:39.377253857Z at process.processTimers (node:internal/timers:523:7) { 2025-07-22T14:56:39.377257117Z code: 'ETIMEDOUT', 2025-07-22T14:56:39.377260257Z command: 'CONN' 2025-07-22T14:56:39.377281707Z } 2025-07-22T14:56:39.377958993Z [JOBS]: Job send.signup.confirmation.email failed Error: Failed to send the confirmation email 2025-07-22T14:56:39.377972973Z at sendConfirmationToken (file:///app/apps/remix/build/server/hono/packages/lib/server-only/user/send-confirmation-token.js:54:11) 2025-07-22T14:56:39.377976373Z at async Module.run (file:///app/apps/remix/build/server/hono/packages/lib/jobs/definitions/emails/send-confirmation-email.handler.js:6:3) 2025-07-22T14:56:39.377979223Z at async Object.handler (file:///app/apps/remix/build/server/hono/packages/lib/jobs/definitions/emails/send-confirmation-email.js:20:5) 2025-07-22T14:56:39.377982163Z at async file:///app/apps/remix/build/server/hono/packages/lib/jobs/client/local.js:101:9 2025-07-22T14:56:39.377984743Z at async dispatch (file:///app/node_modules/hono/dist/compose.js:30:17) 2025-07-22T14:56:39.377987273Z at async file:///app/apps/remix/build/server/hono/server/router.js:57:3 2025-07-22T14:56:39.377989833Z at async dispatch (file:///app/node_modules/hono/dist/compose.js:30:17) 2025-07-22T14:56:39.378004263Z at async requestId2 (file:///app/node_modules/hono/dist/middleware/request-id/request-id.js:16:5) 2025-07-22T14:56:39.378007263Z at async dispatch (file:///app/node_modules/hono/dist/compose.js:30:17) 2025-07-22T14:56:39.378009213Z at async dispatch (file:///app/node_modules/hono/dist/compose.js:30:17) ```
Author
Owner

@DrFatalis commented on GitHub (Jul 30, 2025):

@Aj7ay7 just to be sure, your SMTP_APP_PASSWORD doesn't have space am i right ?

<!-- gh-comment-id:3137705144 --> @DrFatalis commented on GitHub (Jul 30, 2025): @Aj7ay7 just to be sure, your SMTP_APP_PASSWORD doesn't have space am i right ?
Author
Owner

@nicanordlc commented on GitHub (Aug 8, 2025):

Hi @Aj7ay7 , I just pushed a PR on coolify repo to fix the template. With this change after all signees are finished it will complete the document and will not appear as pending.

<!-- gh-comment-id:3166558344 --> @nicanordlc commented on GitHub (Aug 8, 2025): Hi @Aj7ay7 , I just pushed a PR on coolify repo to fix the template. With this change after all signees are finished it will complete the document and will not appear as pending.
Author
Owner

@nicanordlc commented on GitHub (Aug 26, 2025):

We are Live: https://github.com/coollabsio/coolify/releases/tag/v4.0.0-beta.420.7

<!-- gh-comment-id:3224633361 --> @nicanordlc commented on GitHub (Aug 26, 2025): We are Live: https://github.com/coollabsio/coolify/releases/tag/v4.0.0-beta.420.7
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#479
No description provided.