Use external postgres server (e.g. heroku) using SSL #204

Closed
opened 2026-02-04 17:49:23 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @juanpabloxk on GitHub (Jun 9, 2022).

I'm trying to use an external postgresql provider (Heroku) which requires a SSL connection. I set the DATABASE_URL envvar with the url provided by heroku but I got the following error:

/app/node_modules/pg-protocol/dist/parser.js:287
downloads-planka-1    |         const message = name === 'notice' ? new messages_1.NoticeMessage(length, messageValue) : new ength, name);
                                                                                                 ^

downloads-planka-1    | error: no pg_hba.conf entry for host "MY_PUBLIC_IP", user "myuser", database "mydatabase", no     at Parser.parseErrorMessage (/app/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/app/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/app/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/app/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  length: 172,
  severity: 'FATAL',
  code: '28000',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'auth.c',
  line: '545',
  routine: 'ClientAuthentication'
}

If I add a parameter to the postgres url like ssl=true or sslmode=require I got the following:

Error: self signed certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1532:34)
    at TLSSocket.emit (node:events:527:28)
    at TLSSocket._finishInit (node:_tls_wrap:946:8)
    at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:727:12) {
  code: 'DEPTH_ZERO_SELF_SIGNED_CERT'
}
Originally created by @juanpabloxk on GitHub (Jun 9, 2022). I'm trying to use an external postgresql provider (Heroku) which requires a SSL connection. I set the `DATABASE_URL` envvar with the url provided by heroku but I got the following error: ``` /app/node_modules/pg-protocol/dist/parser.js:287 downloads-planka-1 | const message = name === 'notice' ? new messages_1.NoticeMessage(length, messageValue) : new ength, name); ^ downloads-planka-1 | error: no pg_hba.conf entry for host "MY_PUBLIC_IP", user "myuser", database "mydatabase", no at Parser.parseErrorMessage (/app/node_modules/pg-protocol/dist/parser.js:287:98) at Parser.handlePacket (/app/node_modules/pg-protocol/dist/parser.js:126:29) at Parser.parse (/app/node_modules/pg-protocol/dist/parser.js:39:38) at Socket.<anonymous> (/app/node_modules/pg-protocol/dist/index.js:11:42) at Socket.emit (node:events:527:28) at addChunk (node:internal/streams/readable:315:12) at readableAddChunk (node:internal/streams/readable:289:9) at Socket.Readable.push (node:internal/streams/readable:228:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23) { length: 172, severity: 'FATAL', code: '28000', detail: undefined, hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'auth.c', line: '545', routine: 'ClientAuthentication' } ``` If I add a parameter to the postgres url like `ssl=true` or `sslmode=require` I got the following: ``` Error: self signed certificate at TLSSocket.onConnectSecure (node:_tls_wrap:1532:34) at TLSSocket.emit (node:events:527:28) at TLSSocket._finishInit (node:_tls_wrap:946:8) at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:727:12) { code: 'DEPTH_ZERO_SELF_SIGNED_CERT' } ```
Author
Owner

@FluffyDiscord commented on GitHub (Jun 10, 2022):

I have the same issue, but on my unraid machine, using postgress v14

planka and postgres are on the same docker network, ssl or not

@FluffyDiscord commented on GitHub (Jun 10, 2022): I have the same issue, but on my unraid machine, using postgress v14 planka and postgres are on the same docker network, ssl or not
Author
Owner

@candideu commented on GitHub (Feb 27, 2023):

Hi! Is there a Heroku deploy button?

@candideu commented on GitHub (Feb 27, 2023): Hi! Is there a Heroku deploy button?
Author
Owner

@meltyshev commented on GitHub (Feb 27, 2023):

Unfortunately, not yet. The only thing that does not allow to add this - file storage, first we need to integrate with S3.

@meltyshev commented on GitHub (Feb 27, 2023): Unfortunately, not yet. The only thing that does not allow to add this - file storage, first we need to integrate with S3.
Author
Owner

@candideu commented on GitHub (Feb 27, 2023):

Unfortunately, not yet. The only thing that does not allow to add this - file storage, first we need to integrate with S3.

I see... I'd check out how NocoDB handles storage. They have a plugins system which allow users to connect to a number of third party cloud storage systems, so that any attachment added to a record is saved to the selected storage service: https://docs.nocodb.com/setup-and-usages/account-settings#app-store

NocoDB can be deployed on Heroku and Railway, which I'm hoping to do with Planka.

@candideu commented on GitHub (Feb 27, 2023): > Unfortunately, not yet. The only thing that does not allow to add this - file storage, first we need to integrate with S3. I see... I'd check out how NocoDB handles storage. They have a plugins system which allow users to connect to a number of third party cloud storage systems, so that any attachment added to a record is saved to the selected storage service: https://docs.nocodb.com/setup-and-usages/account-settings#app-store NocoDB can be deployed on Heroku and Railway, which I'm hoping to do with Planka.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#204