post_install() {
cat <<- EOF
- Installed with default password. To generate a new random one:
+ WARNING: Installed with default password!
- \$ cd /tmp
- \$ listmonk --new-config
- \$ sudo mv config.toml /etc/listmonk/
+ To setup:
- Setup credentials and a database (substiting your own password!):
+ Setup PostgreSQL with credentials and a database:
\$ sudo -u postgres psql
- postgres=# CREATE USER listmonk WITH PASSWORD 'TKByjizucIoex3mA';
+ postgres=# CREATE USER listmonk WITH PASSWORD '<your_password>';
postgres=# CREATE DATABASE listmonk;
postgres=# GRANT ALL PRIVILEGES ON DATABASE listmonk TO listmonk;
+ postgres=# \\q
- Edit with PostgreSQL database credentials, then to setup database, run:
+ Then edit /etc/listmonk/config.toml with your new database credentials.
+ Also be sure to change the admin password from the defalut.
+
+ Run manually once to setup the database tables:
\$ sudo -u listmonk listmonk --config /etc/listmonk/config.toml --install
+
+ Lastly you can enable the system service:
+
+ \$ sudo systemctl enable --now listmonk
EOF
}
post_upgrade() {
cat <<- EOF
- To update database, run
+ To update the Listmonk database format, first backup your data, then run:
\$ sudo -u listmonk listmonk --config /etc/listmonk/config.toml --upgrade
+
+ Then restart the service:
+
+ \$ sudo systemctl restart listmonk
EOF
}
[app]
- # Interface and port where the app will run its webserver.
- address = "0.0.0.0:9000"
+# Interface and port where the app will run its webserver.
+address = "localhost:9000"
- # BasicAuth authentication for the admin dashboard. This will eventually
- # be replaced with a better multi-user, role-based authentication system.
- # IMPORTANT: Leave both values empty to disable authentication on admin
- # only where an external authentication is already setup.
- admin_username = "listmonk"
- admin_password = "TKByjizucIoex3mA"
+# BasicAuth authentication for the admin dashboard. This will eventually
+# be replaced with a better multi-user, role-based authentication system.
+# IMPORTANT: Leave both values empty to disable authentication on admin
+# only where an external authentication is already setup.
+admin_username = "listmonk"
+admin_password = "<your_password>"
# Database.
[db]
- host = "localhost"
- port = 5432
- user = "listmonk"
- password = "TKByjizucIoex3mA"
- database = "listmonk"
- ssl_mode = "disable"
- max_open = 25
- max_idle = 25
- max_lifetime = "300s"
+host = "localhost"
+port = 5432
+user = "listmonk"
+password = "listmonk"
+database = "<your_password>"
+ssl_mode = "disable"
+max_open = 25
+max_idle = 25
+max_lifetime = "300s"