# Self-host phpMyAdmin

> A web-based admin tool for MySQL and MariaDB, built for ad-hoc use against any reachable database.

- Page: https://levelrail.com/templates/phpmyadmin/
- JSON: https://levelrail.com/templates/phpmyadmin.json
- Category: Database Tools
- Licence: GPL-2.0-only (Copyleft license)
- Source: https://github.com/phpmyadmin/phpmyadmin
- Upstream docs: https://www.phpmyadmin.net/docs/

## Requirements
- Memory: about 256 MiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 5.2.2

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| phpmyadmin | phpmyadmin | 5.2.2 | 80 | none |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| phpmyadmin | PMA_ARBITRARY | preset |
| phpmyadmin | UPLOAD_LIMIT | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy phpmyadmin --name my-phpmyadmin
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/phpmyadmin/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy phpMyAdmin 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 phpmyadmin for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image phpmyadmin:5.2.2 is what you deploy there.

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