{
  "id": "nextcloud-postgres",
  "name": "Nextcloud with Postgres and Redis",
  "slogan": "Nextcloud file sync, sharing and collaboration on the official image with a bundled Postgres database and a Redis cache for file locking. The admin account is created on first start with the generated password.",
  "category": "Storage",
  "categorySlug": "storage",
  "tags": [
    "postgres",
    "redis",
    "multi-service"
  ],
  "license": {
    "spdx": "AGPL-3.0-or-later",
    "class": "network-copyleft"
  },
  "memoryMiB": 1536,
  "architectures": {
    "amd64": "unknown",
    "arm64": "unknown"
  },
  "trust": "listed",
  "verified": false,
  "status": "active",
  "installCommand": "levelrail-cli templates install nextcloud-postgres --name my-nextcloud-postgres",
  "deployFormats": [
    "cli",
    "api"
  ],
  "url": "https://levelrail.com/templates/nextcloud-postgres/",
  "docsUrl": "https://docs.nextcloud.com/server/latest/admin_manual/installation/",
  "sourceRepo": "https://github.com/nextcloud/server",
  "markdownUrl": "https://levelrail.com/templates/nextcloud-postgres.md",
  "jsonUrl": "https://levelrail.com/templates/nextcloud-postgres.json",
  "indexable": true,
  "description": "Nextcloud file sync, sharing and collaboration on the official image with a bundled Postgres database and a Redis cache for file locking. The admin account is created on first start with the generated password.",
  "pinnedTag": "17.11-alpine",
  "licenseUrl": "https://github.com/nextcloud/server/blob/HEAD/LICENSE",
  "licenseClassLabel": "Network copyleft (AGPL) license",
  "needsConfig": false,
  "gpu": false,
  "firstRun": [
    "Sign in as admin with the generated admin password from the app secrets. First start takes a minute while the database is prepared."
  ],
  "services": [
    {
      "name": "db",
      "image": "postgres",
      "tag": "17.11-alpine",
      "ports": [],
      "volumes": [
        "pgdata -> /var/lib/postgresql/data"
      ]
    },
    {
      "name": "nextcloud",
      "image": "nextcloud",
      "tag": "33.0.10-apache",
      "ports": [
        80
      ],
      "volumes": [
        "nextcloud_html -> /var/www/html"
      ]
    },
    {
      "name": "redis",
      "image": "redis",
      "tag": "7.4.7-alpine",
      "ports": [],
      "volumes": [
        "redis_data -> /data"
      ]
    }
  ],
  "env": [
    {
      "service": "db",
      "name": "POSTGRES_DB",
      "kind": "preset"
    },
    {
      "service": "db",
      "name": "POSTGRES_PASSWORD",
      "kind": "generated"
    },
    {
      "service": "db",
      "name": "POSTGRES_USER",
      "kind": "preset"
    },
    {
      "service": "nextcloud",
      "name": "NEXTCLOUD_ADMIN_PASSWORD",
      "kind": "generated"
    },
    {
      "service": "nextcloud",
      "name": "NEXTCLOUD_ADMIN_USER",
      "kind": "preset"
    },
    {
      "service": "nextcloud",
      "name": "POSTGRES_DB",
      "kind": "preset"
    },
    {
      "service": "nextcloud",
      "name": "POSTGRES_HOST",
      "kind": "preset"
    },
    {
      "service": "nextcloud",
      "name": "POSTGRES_PASSWORD",
      "kind": "generated"
    },
    {
      "service": "nextcloud",
      "name": "POSTGRES_USER",
      "kind": "preset"
    },
    {
      "service": "nextcloud",
      "name": "REDIS_HOST",
      "kind": "preset"
    }
  ],
  "verifiedTag": null,
  "verifiedArches": [],
  "aliases": [],
  "findings": [],
  "compose": null,
  "deploy": {
    "cli": "levelrail-cli templates install nextcloud-postgres --name my-nextcloud-postgres",
    "api": "curl -X POST -H \"Authorization: Bearer $TOKEN\" -H \"Content-Type: application/json\" \\\n  https://levelrail.example.com/api/v1/service-templates/nextcloud-postgres/install \\\n  -d '{\n    \"name\": \"my-nextcloud-postgres\"\n  }'",
    "stack": null,
    "terraform": null,
    "formats": [
      {
        "id": "cli",
        "label": "CLI",
        "lang": "bash",
        "code": "levelrail-cli templates install nextcloud-postgres --name my-nextcloud-postgres",
        "note": "Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain db=app.example.com."
      },
      {
        "id": "api",
        "label": "API",
        "lang": "bash",
        "code": "curl -X POST -H \"Authorization: Bearer $TOKEN\" -H \"Content-Type: application/json\" \\\n  https://levelrail.example.com/api/v1/service-templates/nextcloud-postgres/install \\\n  -d '{\n    \"name\": \"my-nextcloud-postgres\"\n  }'",
        "note": "Create a token in the dashboard first. Name, env and domains are the request fields."
      }
    ]
  }
}
