Go to file
jorge 1ec9611ebb added external link to HOWTOS in readme 2021-07-14 14:46:34 +02:00
.github Delete feature---change-request.md 2021-05-17 20:05:39 +05:30
cmd Add option on UI to toggle update checks. 2021-05-16 16:54:55 +05:30
frontend Wrap lines in <pre> without overflowing the viewport. 2021-05-18 16:16:28 +05:30
i18n Add option on UI to toggle update checks. 2021-05-16 16:54:55 +05:30
internal Add option on UI to toggle update checks. 2021-05-16 16:54:55 +05:30
models Improve campaign content format conversion. 2021-05-09 15:36:31 +05:30
scripts Add script to merge and normalize i18n files 2021-04-14 13:52:13 +05:30
static Add hidden nonce (honeypot) field to filter bot autofills on subs page 2021-04-21 14:01:32 +05:30
.dockerignore feat: Add blobstore package 2019-10-31 11:25:31 +05:30
.gitattributes Add .gitattributes for github-linguist 2019-07-15 09:34:56 +05:30
.gitignore feat: Add separate config for demo setup, tweak docs 2020-07-08 22:38:31 +05:30
.goreleaser.yml fix: remove deprecated syntax in goreleaser 2021-03-19 12:21:35 +05:30
Dockerfile chore(dockerfile): not are using multi-stage build 2021-04-19 18:14:32 -03:00
LICENSE Refactor and add new build routines 2019-07-09 15:57:04 +05:30
Makefile Build static Go binary 2021-04-11 15:07:19 +05:30
README.md added external link to HOWTOS in readme 2021-07-14 14:46:34 +02:00
TODO.md Remove completed items 2020-05-25 11:55:02 +05:30
config-demo.toml Don't indent TOML keys deeper than their sections 2021-05-06 18:28:04 +03:00
config.toml.sample Document tidbits about listening addresses for non-sysadmin types 2021-05-07 14:44:17 +03:00
docker-compose.yml Fix indentation of docker-compose file 2021-04-11 15:07:20 +05:30
go.mod Add markdown support to campaign content. 2021-04-14 12:26:09 +05:30
go.sum Add markdown support to campaign content. 2021-04-14 12:26:09 +05:30
install-demo.sh feat: Add shell script for demo setup 2021-01-21 21:53:49 +05:30
queries.sql Add `preconfirm_subscriptions=true/false`new subs API. 2021-04-17 13:34:37 +05:30
schema.sql Add option on UI to toggle update checks. 2021-05-16 16:54:55 +05:30
stats.sql Add support for campaign view tracking with {{ TrackView }} pixel tag 2018-11-02 13:20:32 +05:30

README.md

listmonk is a standalone, self-hosted, newsletter and mailing list manager. It is fast, feature-rich, and packed into a single binary. It uses a PostgreSQL database as its data store.

Visit listmonk.app

Installation

Docker

The latest image is available on DockerHub at listmonk/listmonk:latest. Use the sample docker-compose.yml to run listmonk and Postgres DB with docker-compose as follows:

Demo

mkdir listmonk-demo
sh -c "$(curl -sSL https://raw.githubusercontent.com/knadh/listmonk/master/install-demo.sh)"

The demo does not persist Postgres after the containers are removed. DO NOT use this demo setup in production.

Production

  • docker-compose up db to run the Postgres DB.
  • docker-compose run --rm app ./listmonk --install to setup the DB (or --upgrade to upgrade an existing DB)
  • Run docker-compose up app and visit http://localhost:9000.

More information on docs.


Binary

download an prepare config file

  • Download the latest release and extract the listmonk binary.
  • ./listmonk --new-config to generate config.toml. Then, edit the file.

prerequisites Debian: system user and PostgreSQL

  • install PostgreSQL apt install postgresql
  • create system user with config.toml data for the database: adduser listmonk
  • create the postgreSQL database, the user and grant permissions: su - postgres and then acces de PostgreSQL console psql
    postgres=# CREATE DATABASE listmonk;
    postgres=# CREATE USER listmonk WITH PASSWORD 'listmonk';
    postgres=# GRANT ALL PRIVILEGES ON DATABASE listmonk TO listmonk;
    

proceed to install

  • ./listmonk --install to setup the Postgres DB (or --upgrade to upgrade an existing DB. Upgrades are idempotent and running them multiple times have no side effects).
  • Run ./listmonk and visit http://localhost:9000.

after install, fine tunning

oncen checked it works, stop the process.

  • move the files to where you like most, usually /opt/listmonk/ or inside /var/www/html/
  • change ownership of the files to www-data or whatever user you have assigned the webserver chown -R www-data:www-data listmonk
  • run listmonk as a service, create /etc/systemd/system/listmonk.service with:
    [Unit]
    Description=Listmonk server
    After=syslog.target network.target postgressql.target
    
    [Service]
    Type=simple
    # the user and group executing the service
    User=www-data
    Group=www-data
    # the directory where you have listmonk
    WorkingDirectory=/var/www/html/listmonk
    # the file to execute
    ExecStart=/var/www/html/listmonk/listmonk
    Restart=always
    RestartSec=10
    
    [Install]
    WantedBy=multi-user.target
    
  • enable and run the service sudo systemctl enable listmonk.service and then sudo systemctl start listmonk.service

upgrade (the binary install)

  • Download the latest release and extract the listmonk binary.
  • stop listmonk or it's service if run as so sudo systemctl stop listmonk.service
  • move the binary to executing destination.
  • change ownership of the files to www-data or whatever user you have assigned the webserver chown -R www-data:www-data listmonk
  • ./listmonk --upgrade to upgrade an existing DB. (Upgrades are idempotent and running them multiple times have no side effects).
  • start again the binary or the service sudo systemctl start listmonk.service

Postgres

connect to db

su postres -

as user postgres execute

psql

inside postgres use these commands

  • \l to list databases
  • \c <databasename> to use a database
  • \dt to list relations/tables

See the lists

SELECT * from lists;

will show something like

id |                 uuid                 |                            name                            |  type   | optin  |  tags  |          created_at           |          updated_at           
----+--------------------------------------+------------------------------------------------------------+---------+--------+--------+-------------------------------+-------------------------------
  1 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | Lista de prueba                                            | private | single | {test} | 2021-05-19 15:33:08.503002+02 | 2021-05-27 12:05:28.201633+02
  3 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | Agendas                                                    | public  | single |        | 2021-06-03 17:18:58.398437+02 | 2021-06-03 17:42:13.446523+02
  4 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | Prensa                                                     | public  | single |        | 2021-06-03 17:19:11.233554+02 | 2021-07-13 18:04:58.078138+02
  5 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | Instituciones, Festivales, etc | public  | single |        | 2021-06-03 17:19:38.707663+02 | 2021-07-13 18:41:34.764095+02
  6 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | Newsletter                                                 | public  | single |        | 2021-06-03 17:19:51.514315+02 | 2021-07-13 18:44:15.855554+02
  7 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | Antiguas socias y colaboradoras                            | public  | single |        | 2021-06-03 17:20:15.807685+02 | 2021-07-13 18:47:55.651608+02
(6 rows)

Manage subscribers list

once connected to database with \c <databasename> and promt changes to <databasename>=#

select all users from subscribers lists

SELECT * subscriber_lists;

will show something like this

 subscriber_id | list_id |   status    |          created_at           |          updated_at           
---------------+---------+-------------+-------------------------------+-------------------------------
           646 |       7 | confirmed   | 2021-07-13 18:47:55.616239+02 | 2021-07-13 18:47:55.616239+02
            45 |       4 | confirmed   | 2021-07-13 18:04:57.974174+02 | 2021-07-13 18:04:57.974174+02
             9 |       3 | confirmed   | 2021-06-03 17:34:34.714387+02 | 2021-06-03 17:42:13.431435+02
          3148 |       7 | confirmed   | 2021-07-13 18:47:55.616239+02 | 2021-07-13 18:47:55.616239+02
             7 |       7 | unconfirmed | 2021-06-08 17:17:26.372759+02 | 2021-06-08 17:17:26.372759+02
          1232 |       7 | confirmed   | 2021-07-13 18:47:55.616239+02 | 2021-07-13 18:47:55.616239+02
             7 |       5 | confirmed   | 2021-06-08 17:17:26.372759+02 | 2021-06-08 17:17:26.372759+02

confirm users

modify the status from unconfirmed to confirmed

UPDATE subscriber_lists SET status='confirmed' WHERE list_id=<number>;

change the <number> for the one you see under list_id


Heroku

Using the Nginx buildpack can be used to deploy listmonk on Heroku and use Nginx as a proxy to setup basicauth. Heroku deploy button provides an automated default deployment.

HOWTOS

HOWTO set up listmonk HOWTO import mailchimp subscribers

Developers

listmonk is a free and open source software licensed under AGPLv3. If you are interested in contributing, refer to the developer setup. The backend is written in Go and the frontend is Vue with Buefy for UI.

License

listmonk is licensed under the AGPL v3 license.