# Self-host Paymenter

> Open-source billing and client management for hosting providers, with invoices, subscriptions and provisioning extensions.

- Page: https://levelrail.com/templates/paymenter/
- JSON: https://levelrail.com/templates/paymenter.json
- Category: Finance
- Licence: MIT (Permissive license)
- Source: https://github.com/Paymenter/Paymenter
- Upstream docs: https://paymenter.org/docs/guides/docker

## Requirements
- Memory: about 768 MiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 11.8

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| mariadb | mariadb | 11.8 | none | mariadb -> /var/lib/mysql |
| paymenter | ghcr.io/paymenter/paymenter | v1.4.5 | 80 | logs -> /app/storage/logs; extensions -> /app/extensions; themes -> /app/themes; storage -> /app/storage/app |
| redis | redis | 7-alpine | none | none |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| mariadb | MYSQL_DATABASE | preset |
| mariadb | MYSQL_PASSWORD | generated |
| mariadb | MYSQL_ROOT_PASSWORD | generated |
| mariadb | MYSQL_USER | preset |
| paymenter | APP_ENV | preset |
| paymenter | APP_KEY | generated |
| paymenter | APP_URL | preset |
| paymenter | CACHE_STORE | preset |
| paymenter | DB_CONNECTION | preset |
| paymenter | DB_DATABASE | preset |
| paymenter | DB_HOST | preset |
| paymenter | DB_PASSWORD | generated |
| paymenter | DB_PORT | preset |
| paymenter | DB_USERNAME | preset |
| paymenter | QUEUE_CONNECTION | preset |
| paymenter | REDIS_HOST | preset |
| paymenter | REDIS_PASSWORD | generated |
| paymenter | REDIS_USERNAME | preset |
| paymenter | SESSION_DRIVER | preset |
| redis | REDIS_PASSWORD | generated |

## Deploy

### CLI

```bash
levelrail-cli templates install paymenter --name my-paymenter
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain mariadb=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/paymenter/install \
  -d '{
    "name": "my-paymenter"
  }'
```

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

## Questions

### Can I deploy Paymenter 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 paymenter for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image mariadb:11.8, ghcr.io/paymenter/paymenter:v1.4.5, redis:7-alpine is what you deploy there.

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