---
title: "Deploy listmonk on Pethost in one click"
description: "A newsletter and mailing list manager. A template for Pethost: in a minute or two the app is live on your machine, with HTTPS at its own address and nightly backups."
---

[← All templates](https://pethost.dev/templates/)

# Deploy listmonk on Pethost in one click

A newsletter and mailing list manager

[Deploy on Pethost](https://console.pethost.dev/?template=listmonk)

## What happens

1. You sign in to Pethost or make an account, with a passkey, GitHub or Google.
2. No machine yet? You pick a plan, and we prepare one for you. The link waits in your browser until it is ready.
3. New project opens at the app. You fill in what it asks for and click Create project: **Admin password**.
4. In a minute or two the app is live at its own address with HTTPS. Its secrets are made for it at random, and its data is in the nightly backup.
5. It is a project like any other: its compose.yaml, its .env, its logs and a terminal are in the panel, and your agent can change it, roll it back or restore it.

## First steps

Sign in as admin with the password you gave. Then set Settings > General > Root URL to https://listmonk.sam.pethost.app, and add your SMTP server under Settings > SMTP.

## What it runs

The template is this compose.yaml and the variables it writes into the project’s .env. Pethost runs the file as it is written.

```
services:
  app:
    image: listmonk/listmonk:v6.2.0
    restart: unless-stopped
    command: [sh, -c, "./listmonk --install --idempotent --yes --config '' && ./listmonk --upgrade --yes --config '' && ./listmonk --config ''"]
    environment:
      LISTMONK_app__address: "0.0.0.0:9000"
      LISTMONK_db__host: db
      LISTMONK_db__port: 5432
      LISTMONK_db__user: listmonk
      LISTMONK_db__password: ${DB_PASSWORD}
      LISTMONK_db__database: listmonk
      LISTMONK_db__ssl_mode: disable
      LISTMONK_db__max_open: 25
      LISTMONK_db__max_idle: 25
      LISTMONK_db__max_lifetime: 300s
      # The install makes this Super Admin, so no setup page is left open.
      LISTMONK_ADMIN_USER: admin
      LISTMONK_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
      TZ: Etc/UTC
    depends_on:
      db:
        condition: service_healthy
    volumes:
      - uploads:/listmonk/uploads

  db:
    image: postgres:17-alpine
    restart: unless-stopped
    environment:
      POSTGRES_USER: listmonk
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: listmonk
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U listmonk -d listmonk"]
      interval: 5s
      timeout: 5s
      retries: 10
      start_period: 30s
    volumes:
      - db:/var/lib/postgresql/data

volumes:
  uploads:
  db:
```

[compose.yaml](https://pethost.dev/templates/listmonk/compose.yaml)[See it on GitHub](https://github.com/pethost-dev/templates/tree/main/listmonk)

Pethost · Stephan Gomer · NIP 1133096755

[Templates](https://pethost.dev/templates/) [About](https://pethost.dev/about/) [Blog](https://pethost.dev/blog/) [Terms](https://pethost.dev/terms/) [Privacy](https://pethost.dev/privacy/) [Refunds](https://pethost.dev/refunds/) [API](https://pethost.dev/docs/api/) [CLI](https://pethost.dev/docs/cli/) [Plugin](https://github.com/pethost-dev/plugin) [support@pethost.dev](mailto:support@pethost.dev)
