# Self-host Stash

> A self hosted organiser and player for your personal video library, with tags and scraping.

- Page: https://levelrail.com/templates/stash/
- JSON: https://levelrail.com/templates/stash.json
- Category: Media
- Licence: AGPL-3.0-only (Network copyleft (AGPL) license)
- Source: https://github.com/stashapp/stash
- Upstream docs: https://docs.stashapp.cc/

## Requirements
- Memory: about 1 GiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: v0.32.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| stash | stashapp/stash | v0.32.0 | 9999 | config -> /root/.stash; data -> /data; generated -> /generated; metadata -> /metadata; cache -> /cache; blobs -> /blobs |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| stash | STASH_CACHE | preset |
| stash | STASH_GENERATED | preset |
| stash | STASH_METADATA | preset |
| stash | STASH_PORT | preset |
| stash | STASH_STASH | preset |

## Deploy

### CLI

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

### API

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

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

## First run
1. Run the setup wizard on first visit and set a username and password.

## Questions

### Can I deploy Stash 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 Stash, 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 stashapp/stash:v0.32.0 is what you deploy there.

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