# Self-host Plunk

> An email platform for transactional mail, marketing campaigns and automations that sends through your own AWS SES account.

- Page: https://levelrail.com/templates/plunk/
- JSON: https://levelrail.com/templates/plunk.json
- Category: Communication
- Licence: AGPL-3.0 (Network copyleft (AGPL) license)
- Source: https://github.com/useplunk/plunk
- Upstream docs: https://docs.useplunk.com/self-hosting/introduction

## Requirements
- Memory: about 512 MiB
- amd64: published, arm64: published
- Needs configuration before start: yes
- Pinned image tag: 16-alpine

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| db | postgres | 16-alpine | none | pgdata -> /var/lib/postgresql/data |
| plunk | driaug/plunk | 1.3.6 | 3000 | none |
| redis | redis | 7.4-alpine | none | redis -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| db | POSTGRES_DB | preset |
| db | POSTGRES_PASSWORD | generated |
| db | POSTGRES_USER | preset |
| plunk | API_URI | preset |
| plunk | APP_URI | preset |
| plunk | AWS_ACCESS_KEY_ID | required |
| plunk | AWS_REGION | required |
| plunk | AWS_SECRET_ACCESS_KEY | required |
| plunk | AWS_SES_CONFIGURATION_SET | required |
| plunk | DATABASE_URL | generated |
| plunk | DISABLE_SIGNUPS | preset |
| plunk | JWT_SECRET | generated |
| plunk | NEXT_PUBLIC_API_URI | preset |
| plunk | NODE_OPTIONS | preset |
| plunk | REDIS_URL | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install plunk --name my-plunk --env AWS_REGION=VALUE --env AWS_ACCESS_KEY_ID=VALUE --env AWS_SECRET_ACCESS_KEY=VALUE --env AWS_SES_CONFIGURATION_SET=VALUE
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain db=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/plunk/install \
  -d '{
    "name": "my-plunk",
    "env": { "AWS_REGION": "VALUE", "AWS_ACCESS_KEY_ID": "VALUE", "AWS_SECRET_ACCESS_KEY": "VALUE", "AWS_SES_CONFIGURATION_SET": "VALUE" }
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## Questions

### Can I deploy Plunk on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id plunk for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image postgres:16-alpine, driaug/plunk:1.3.6, redis:7.4-alpine is what you deploy there.

Self-host Plunk, Plunk docker compose file, deploy Plunk on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
