**Tags:** Analytics · Node.js · Next.js

# Umami

One-click deployment of [Umami](https://umami.is/) - modern analytics platform that makes it easy to collect, analyze and understand your website data.

### Available Environments

- [Development](https://app.zerops.io/recipes/umami.md?environment=development)
- **Production** ← current

### Services in this Environment

**Services:**

- **core** (core:ha@2)
  - Containers: 3 × Shared Core, 0.00 GB RAM, 0 GB Disk
- **db** (postgresql:ha@17) :5432, :6432, :5433
  - Containers: 1 × Dedicated Core, 4.50 GB RAM, 1 GB Disk
- **umami** (ubuntu/nodejs@22) :3000
  - Containers: 2 × Shared Core, 0.19 GB RAM, 1 GB Disk
  - Repository: [zerops-recipe-apps/umami-app](https://github.com/zerops-recipe-apps/umami-app)

**Total Resources:** 6 containers, 4.88 GB RAM, 3 GB Disk

### One-Click Deploy (Import YAML)

Use this YAML with `zcli project import` to deploy this environment:

```yaml
# zeropsPreprocessor=on
project:
  name: umami-production
  corePackage: SERIOUS

services:
  - hostname: db
    type: postgresql:ha@17
    profile: oltp-production
    priority: 10

  - hostname: umami
    type: nodejs@22
    buildFromGit: https://github.com/zerops-recipe-apps/umami-app
    enableSubdomainAccess: true
    envSecrets:
      APP_SECRET: <@generateRandomString(<64>)>
    minContainers: 2

```

---

## Next Steps

After deploying one of the environments you'll have full control over your own copy, but there's a few more steps to take before everything is ready for your production workloads.

### Run Umami on your domain
By default the recipe is set up to run on a Zerops preview domain, to run it on your own, do xyz.

### Upgrading Umami
When Umami releases a new version, you can either clone our source repository, modify the version number and setup deployment. If our recipes already includes the version you want to upgrade to, go to pipeline trigger and do xyz

### Backing up / restoring Umami data
Database backups are created daily by default, if you need to restore data, do xyz.

## Knowledge Base

### Platform Reference

- [Routing & Domains](https://docs.zerops.io/features/access)
- [Scaling](https://docs.zerops.io/features/scaling)
- [Environment Variables](https://docs.zerops.io/features/env-variables)
- [CLI (zcli)](https://docs.zerops.io/references/cli)

### Service Type Reference

**PostgreSQL**

- [Connect](https://docs.zerops.io/postgresql/how-to/connect)
- [Backup & Restore](https://docs.zerops.io/postgresql/how-to/backup)
- [Manage](https://docs.zerops.io/postgresql/how-to/manage)
- [Scale](https://docs.zerops.io/postgresql/how-to/scale)

**Node.js**

- [Build & Deploy](https://docs.zerops.io/nodejs/how-to/build-pipeline)
- [Customize Runtime](https://docs.zerops.io/nodejs/how-to/customize-runtime)

### General Reference

### Next.js Standalone Build Artifact

The Umami app is built and deployed in "standalone" mode, see: [output: 'standalone'](https://nextjs.org/docs/pages/api-reference/config/next-config-js/output).
That means the development and maintenance scripts (e.g. `update-tracker`) are not available in the runtime container by default.

To enable this functionality, follow these steps:
1. [SSH into the runtime container](https://docs.zerops.io/references/networking/ssh) or open service web shell in GUI
2. Add some RAM for `pnpm install`:
```shell
zsc scale ram +2GB 10m

# Wait for the scaling to apply.
sleep 10s 
```
3. Install script dependencies:
```shell
pnpm add npm-run-all dotenv chalk semver prisma@6.18.0 @prisma/adapter-pg@6.18.0
```

After that, you should be able to run the maintenance tasks, e.g.:
```shell
pnpm run update-tracker
pnpm run update-db
```

---

## Related Recipes

- [Next SSR Hello World](https://app.zerops.io/recipes/nextjs-ssr-hello-world.md)
- [Nest.js showcase](https://app.zerops.io/recipes/nestjs-showcase.md)
- [Nest.js minimal](https://app.zerops.io/recipes/nestjs-minimal.md)
- [Nest.js Hello World](https://app.zerops.io/recipes/nestjs-hello-world.md)

