# Self-host One-Time Secret

> Share a password or API key through a link that self-destructs after the first view, backed by Redis.

- Page: https://levelrail.com/templates/onetimesecret/
- JSON: https://levelrail.com/templates/onetimesecret.json
- Category: Security
- Licence: MIT (Permissive license)
- Source: https://github.com/onetimesecret/onetimesecret
- Upstream docs: https://docs.onetimesecret.com

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

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| app | onetimesecret/onetimesecret | v0.26.14 | 3000 | none |
| redis | redis | 7-alpine | none | redis -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| app | AUTH_AUTOVERIFY | preset |
| app | AUTH_SIGNUP | preset |
| app | COLONEL | preset |
| app | HOST | preset |
| app | RACK_ENV | preset |
| app | REDIS_URL | preset |
| app | SECRET | generated |
| app | SSL | preset |

## Deploy

### CLI

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

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

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

## Questions

### Can I deploy One-Time Secret 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 onetimesecret for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image onetimesecret/onetimesecret:v0.26.14, redis:7-alpine is what you deploy there.

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