listmonk/docs/configuration/index.html
github-actions[bot] af1b2f6b4c deploy: e332622db9
2023-04-25 16:48:21 +00:00

927 lines
No EOL
21 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="prev" href="../upgrade/">
<link rel="next" href="../developer-setup/">
<link rel="icon" href="../images/favicon.png">
<meta name="generator" content="mkdocs-1.4.2, mkdocs-material-9.1.8">
<title>Configuration - listmonk / Documentation</title>
<link rel="stylesheet" href="../assets/stylesheets/main.ded33207.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.a0c5b2b5.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Inter";--md-code-font:"Roboto Mono"}</style>
<link rel="stylesheet" href="../static/style.css">
<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="white" data-md-color-accent="red">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#configuration" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="listmonk / Documentation" class="md-header__button md-logo" aria-label="listmonk / Documentation" data-md-component="logo">
<img src="../images/favicon.png" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
listmonk / Documentation
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Configuration
</span>
</div>
</div>
</div>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href=".." title="listmonk / Documentation" class="md-nav__button md-logo" aria-label="listmonk / Documentation" data-md-component="logo">
<img src="../images/favicon.png" alt="logo">
</a>
listmonk / Documentation
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href=".." class="md-nav__link">
Introduction
</a>
</li>
<li class="md-nav__item">
<a href="../installation/" class="md-nav__link">
Installation
</a>
</li>
<li class="md-nav__item">
<a href="../upgrade/" class="md-nav__link">
Upgrade
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
Configuration
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
Configuration
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#toml-configuration-file" class="md-nav__link">
TOML Configuration file
</a>
</li>
<li class="md-nav__item">
<a href="#environment-variables" class="md-nav__link">
Environment variables
</a>
</li>
<li class="md-nav__item">
<a href="#customizing-system-templates" class="md-nav__link">
Customizing system templates
</a>
</li>
<li class="md-nav__item">
<a href="#http-routes" class="md-nav__link">
HTTP routes
</a>
<nav class="md-nav" aria-label="HTTP routes">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#private-admin-endpoints" class="md-nav__link">
Private admin endpoints.
</a>
</li>
<li class="md-nav__item">
<a href="#public-endpoints-to-expose-to-the-internet" class="md-nav__link">
Public endpoints to expose to the internet.
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#media-uploads" class="md-nav__link">
Media Uploads
</a>
<nav class="md-nav" aria-label="Media Uploads">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#filesystem" class="md-nav__link">
Filesystem
</a>
<nav class="md-nav" aria-label="Filesystem">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#using-volumes" class="md-nav__link">
Using volumes
</a>
</li>
<li class="md-nav__item">
<a href="#using-bind-mounts" class="md-nav__link">
Using bind mounts
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../developer-setup/" class="md-nav__link">
Developer setup
</a>
</li>
<li class="md-nav__item">
<a href="../concepts/" class="md-nav__link">
Concepts
</a>
</li>
<li class="md-nav__item">
<a href="../querying-and-segmentation/" class="md-nav__link">
Querying and segmenting subscribers
</a>
</li>
<li class="md-nav__item">
<a href="../templating/" class="md-nav__link">
Templating
</a>
</li>
<li class="md-nav__item">
<a href="../bounces/" class="md-nav__link">
Bounce processing
</a>
</li>
<li class="md-nav__item">
<a href="../messengers/" class="md-nav__link">
Messengers
</a>
</li>
<li class="md-nav__item">
<a href="../i18n/" class="md-nav__link">
Internationalization
</a>
</li>
<li class="md-nav__item">
<a href="../external-integration/" class="md-nav__link">
Integrating with external systems
</a>
</li>
<li class="md-nav__item">
<a href="../apis/apis/" class="md-nav__link">
API
</a>
</li>
<li class="md-nav__item">
<a href="../apis/subscribers/" class="md-nav__link">
API / Subscribers
</a>
</li>
<li class="md-nav__item">
<a href="../apis/lists/" class="md-nav__link">
API / Lists
</a>
</li>
<li class="md-nav__item">
<a href="../apis/import/" class="md-nav__link">
API / Import
</a>
</li>
<li class="md-nav__item">
<a href="../apis/campaigns/" class="md-nav__link">
API / Campaigns
</a>
</li>
<li class="md-nav__item">
<a href="../apis/media/" class="md-nav__link">
API / Media
</a>
</li>
<li class="md-nav__item">
<a href="../apis/templates/" class="md-nav__link">
API / Templates
</a>
</li>
<li class="md-nav__item">
<a href="../apis/transactional/" class="md-nav__link">
API / Transactional
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#toml-configuration-file" class="md-nav__link">
TOML Configuration file
</a>
</li>
<li class="md-nav__item">
<a href="#environment-variables" class="md-nav__link">
Environment variables
</a>
</li>
<li class="md-nav__item">
<a href="#customizing-system-templates" class="md-nav__link">
Customizing system templates
</a>
</li>
<li class="md-nav__item">
<a href="#http-routes" class="md-nav__link">
HTTP routes
</a>
<nav class="md-nav" aria-label="HTTP routes">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#private-admin-endpoints" class="md-nav__link">
Private admin endpoints.
</a>
</li>
<li class="md-nav__item">
<a href="#public-endpoints-to-expose-to-the-internet" class="md-nav__link">
Public endpoints to expose to the internet.
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#media-uploads" class="md-nav__link">
Media Uploads
</a>
<nav class="md-nav" aria-label="Media Uploads">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#filesystem" class="md-nav__link">
Filesystem
</a>
<nav class="md-nav" aria-label="Filesystem">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#using-volumes" class="md-nav__link">
Using volumes
</a>
</li>
<li class="md-nav__item">
<a href="#using-bind-mounts" class="md-nav__link">
Using bind mounts
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">&para;</a></h1>
<h3 id="toml-configuration-file">TOML Configuration file<a class="headerlink" href="#toml-configuration-file" title="Permanent link">&para;</a></h3>
<p>One or more TOML files can be read by passing <code>--config config.toml</code> multiple times. Apart from a few low level configuration variables and the database configuration, all other settings can be managed from the <code>Settings</code> dashboard on the admin UI.</p>
<p>To generate a new sample configuration file, run <code>--listmonk --new-config</code></p>
<h3 id="environment-variables">Environment variables<a class="headerlink" href="#environment-variables" title="Permanent link">&para;</a></h3>
<p>Variables in config.toml can also be provided as environment variables prefixed by <code>LISTMONK_</code> with periods replaced by <code>__</code> (double underscore). Example:</p>
<table>
<thead>
<tr>
<th><strong>Environment variable</strong></th>
<th>Example value</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>LISTMONK_app__address</code></td>
<td>"0.0.0.0:9000"</td>
</tr>
<tr>
<td><code>LISTMONK_app__admin_username</code></td>
<td>listmonk</td>
</tr>
<tr>
<td><code>LISTMONK_app__admin_password</code></td>
<td>listmonk</td>
</tr>
<tr>
<td><code>LISTMONK_db__host</code></td>
<td>db</td>
</tr>
<tr>
<td><code>LISTMONK_db__port</code></td>
<td>9432</td>
</tr>
<tr>
<td><code>LISTMONK_db__user</code></td>
<td>listmonk</td>
</tr>
<tr>
<td><code>LISTMONK_db__password</code></td>
<td>listmonk</td>
</tr>
<tr>
<td><code>LISTMONK_db__database</code></td>
<td>listmonk</td>
</tr>
<tr>
<td><code>LISTMONK_db__ssl_mode</code></td>
<td>disable</td>
</tr>
</tbody>
</table>
<h3 id="customizing-system-templates">Customizing system templates<a class="headerlink" href="#customizing-system-templates" title="Permanent link">&para;</a></h3>
<p><a href="../templating/#system-templates">Read this</a></p>
<h3 id="http-routes">HTTP routes<a class="headerlink" href="#http-routes" title="Permanent link">&para;</a></h3>
<p>When configuring auth proxies and web application firewalls, use this table.</p>
<h4 id="private-admin-endpoints">Private admin endpoints.<a class="headerlink" href="#private-admin-endpoints" title="Permanent link">&para;</a></h4>
<table>
<thead>
<tr>
<th>Methods</th>
<th>Route</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>*</code></td>
<td><code>/api/*</code></td>
<td>Admin APIs</td>
</tr>
<tr>
<td><code>GET</code></td>
<td><code>/admin/*</code></td>
<td>Admin UI and HTML pages</td>
</tr>
<tr>
<td><code>POST</code></td>
<td><code>/webhooks/bounce</code></td>
<td>Admin bounce webhook</td>
</tr>
</tbody>
</table>
<h4 id="public-endpoints-to-expose-to-the-internet">Public endpoints to expose to the internet.<a class="headerlink" href="#public-endpoints-to-expose-to-the-internet" title="Permanent link">&para;</a></h4>
<table>
<thead>
<tr>
<th>Methods</th>
<th>Route</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>GET, POST</code></td>
<td><code>/subscription/*</code></td>
<td>HTML subscription pages</td>
</tr>
<tr>
<td><code>GET,</code></td>
<td><code>/link/*</code></td>
<td>Tracked link redirection</td>
</tr>
<tr>
<td><code>GET</code></td>
<td><code>/campaign/*</code></td>
<td>Pixel tracking image</td>
</tr>
<tr>
<td><code>GET</code></td>
<td><code>/public/*</code></td>
<td>Static files for HTML subscription pages</td>
</tr>
<tr>
<td><code>POST</code></td>
<td><code>/webhooks/service/*</code></td>
<td>Bounce webhook endpoints for AWS and Sendgrid</td>
</tr>
</tbody>
</table>
<h2 id="media-uploads">Media Uploads<a class="headerlink" href="#media-uploads" title="Permanent link">&para;</a></h2>
<h3 id="filesystem">Filesystem<a class="headerlink" href="#filesystem" title="Permanent link">&para;</a></h3>
<p>When configuring <code>docker</code> volume mounts for using filesystem media uploads, you can follow either of two approaches.</p>
<h4 id="using-volumes">Using volumes<a class="headerlink" href="#using-volumes" title="Permanent link">&para;</a></h4>
<p>Using <code>docker volumes</code>, you can specify the name of volume and destination for the files to be uploaded inside the container.</p>
<div class="highlight"><pre><span></span><code>app:
volumes:
- type: volume
source: listmonk-uploads
target: /listmonk/uploads
volumes:
listmonk-uploads:
</code></pre></div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This volume is managed by <code>docker</code> itself, and you can see find the host path with <code>docker volume inspect listmonk_listmonk-uploads</code>.</p>
</div>
<h4 id="using-bind-mounts">Using bind mounts<a class="headerlink" href="#using-bind-mounts" title="Permanent link">&para;</a></h4>
<div class="highlight"><pre><span></span><code> volumes:
- /data/uploads:/listmonk/uploads
</code></pre></div>
<p>The files will be available inside <code>/data/uploads</code> directory on the host machine.</p>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
<div class="md-copyright__highlight">
Copyright &copy; 2019-2023, Kailash Nadh.
</div>
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "..", "features": [], "search": "../assets/javascripts/workers/search.208ed371.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script>
<script src="../assets/javascripts/bundle.51198bba.min.js"></script>
</body>
</html>