# Self-host Memcached

> A fast in-memory cache for query results, sessions and rendered pages, reachable by other apps on host memcached.

- Page: https://levelrail.com/templates/memcached/
- JSON: https://levelrail.com/templates/memcached.json
- Category: Database Tools
- Licence: BSD-3-Clause (Permissive license)
- Source: https://github.com/memcached/memcached
- Upstream docs: https://memcached.org/

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

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| memcached | memcached | 1.6-alpine | 11211 | none |

## Deploy

### CLI

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

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/memcached/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 Memcached on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Memcached, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image memcached:1.6-alpine is what you deploy there.

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