knadh / listmonk

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.
https://listmonk.app
GNU Affero General Public License v3.0
14.46k stars 1.32k forks source link

Listmonk on HTTPS #1940

Closed daway46 closed 1 month ago

daway46 commented 1 month ago

I can access listmonk with IP address on HTTP but struggling to work for HTTPS.

I cannot configure Gmail as an SMTP client because the password is sent via clear text with default HTTP on port 9000

I installed an SSL certificate for listmonk.mydomain.com and added DNS A record that point to my website server but when I cannot access https://listmonk.mydomain.com:9001 or via https://67.68.69.70:9001

I had to use 9001 for HTTPS because HTTP use 9000

The below my config.toml

address = "67.68.69.70:9001"

address = "listmonk.mydomain.com:9001"

address = "67.68.69.70:9000"

HTTPS server

[https] enabled = true address = "67.68.69.70:9001" cert_file = "/etc/letsencrypt/live/mydomain.com/fullchain.pem" key_file = "/etc/letsencrypt/live/mydomain.com/privkey.pem"

HTTP server.

[http] address = "67.68.69.70:9000"

I am using wordpress litespeed web server, hosted on vultr. Any inputs or suggestion will help.

daway46 commented 1 month ago

I can access my DNS URL http://listmonk.mydomain.com:9001/ with new port but problem is it only works for HTTP, not HTTPS

below is my updated config.toml file where I commented HTTP related configuration address = "67.68.69.70:9001"

address = "listmonk.mydomaincom:9001"

address = "67.68.69.70:9000"

HTTPS server

[https] enabled = true address = "67.68.69.70:9001" cert_file = "/etc/letsencrypt/live/mydomain.com/fullchain.pem" key_file = "/etc/letsencrypt/live/mydomain.com/privkey.pem"

HTTP server.

[http]

address = "67.68.69.70:9000"

MaximilianKohler commented 1 month ago

Have you looked through the tutorials in the docs?

knadh commented 1 month ago

@daway46 SMTP configuration for Google has no relation to whether listmonk is configured on http or https. That said, if you're running a public instance of listmonk, it should definitely be on https.

listmonk does not have built-in TLS/https support, so the config you've pasted above are not supported by listmonk. config.toml only takes the config parameters that you see in the sample config.

You should use a reverse proxy like Nginx or Caddy and put listmonk behind it. Caddy is simple to configure.

I am closing this issue as it is unconnected to listmonk.