# Self-host Manyfold

> A self-hosted manager for 3D printing model libraries with tags, previews and sharing, backed by Postgres and Redis. Create the first admin on first open.

- Page: https://levelrail.com/templates/manyfold/
- JSON: https://levelrail.com/templates/manyfold.json
- Category: Media
- Licence: MIT (Permissive license)
- Source: https://github.com/manyfold3d/manyfold
- Upstream docs: https://manyfold.app/get-started/docker

## Requirements
- Memory: about 768 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 17.11-alpine

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| db | postgres | 17.11-alpine | none | pgdata -> /var/lib/postgresql/data |
| manyfold | ghcr.io/manyfold3d/manyfold | 0.154.1 | 3214 | libraries -> /libraries |
| redis | redis | 7.4.7-alpine | none | redis_data -> /data |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| db | POSTGRES_DB | preset |
| db | POSTGRES_PASSWORD | generated |
| db | POSTGRES_USER | preset |
| manyfold | DATABASE_ADAPTER | preset |
| manyfold | DATABASE_HOST | preset |
| manyfold | DATABASE_NAME | preset |
| manyfold | DATABASE_PASSWORD | generated |
| manyfold | DATABASE_PORT | preset |
| manyfold | DATABASE_USER | preset |
| manyfold | PGID | preset |
| manyfold | PUID | preset |
| manyfold | REDIS_URL | preset |
| manyfold | SECRET_KEY_BASE | generated |

## Deploy

### CLI

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

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

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

## First run
1. Open the page and create the first admin account, then add a library path.

## Questions

### Can I deploy Manyfold 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 Manyfold, 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 postgres:17.11-alpine, ghcr.io/manyfold3d/manyfold:0.154.1, redis:7.4.7-alpine is what you deploy there.

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