# Self-host HeyForm

> A form builder for surveys, quizzes and lead capture, with conversational forms and a MongoDB backend.

- Page: https://levelrail.com/templates/heyform/
- JSON: https://levelrail.com/templates/heyform.json
- Category: Productivity
- Licence: AGPL-3.0 (Network copyleft (AGPL) license)
- Source: https://github.com/heyform/heyform
- Upstream docs: https://docs.heyform.net/open-source/installation

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

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| heyform | heyform/community-edition | v3.0.3 | 9157 | assets -> /app/static/upload |
| mongo | mongo | 7 | none | mongo -> /data/db |
| redis | redis | 7-alpine | none | redis -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| heyform | APP_HOMEPAGE_URL | preset |
| heyform | FORM_ENCRYPTION_KEY | generated |
| heyform | MONGO_URI | preset |
| heyform | REDIS_HOST | preset |
| heyform | REDIS_PASSWORD | generated |
| heyform | REDIS_PORT | preset |
| heyform | SESSION_KEY | generated |
| redis | REDIS_PASSWORD | generated |

## Deploy

### CLI

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

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

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

## Questions

### Can I deploy HeyForm 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 heyform for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image heyform/community-edition:v3.0.3, mongo:7, redis:7-alpine is what you deploy there.

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