---
title: Deploy Nextcloud with AI on Blossom
url: "/deploy/nextcloud/"
canonical_url: https://blossom88.com/deploy/nextcloud/
markdown_url: https://blossom88.com/deploy/nextcloud.md
summary: Deploy Nextcloud with AI on Blossom. Give your team a private file workspace
  with managed PostgreSQL and Redis, and persistent storage for files and configuration.
stack:
- PHP
- Vue.js
- PostgreSQL
- Redis
---

# Deploy Nextcloud with AI on Blossom

[Nextcloud](https://nextcloud.com/) gives your team a private place to store,
organize and share files. Upload documents in the browser and choose who can
access them.

## Ask Your Agent

> **Ask your AI agent:** Deploy Nextcloud on Blossom so my team can store and share files.
>
> Follow this guide: https://blossom88.com/deploy/nextcloud/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Your File Workspace

| Part | Purpose |
|---|---|
| Nextcloud | File browser, accounts and sharing |
| Managed PostgreSQL | Users, file metadata and sharing records |
| Managed Redis | File locking and session coordination |
| Persistent Volume | Files, configuration and installed apps |

The app uses one [Persistent Service](https://docs.blossom88.com/docs/apps/persistent-services/).
Choose storage for your files and room for previews and file versions.

![Nextcloud displays a private workspace containing sample team documents.](/deploy/assets/images/nextcloud/file-workspace.webp)

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

Check the current [system requirements](https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html)
and [official image configuration](https://github.com/nextcloud/docker).
Choose a maintained Apache image and compatible managed PostgreSQL and Redis.
Pin the image's multi-architecture index digest.

    blossom profile:show
    blossom app:create --data '{"app":{"name":"nextcloud"}}'
    blossom environment:create --data environment.yml
    blossom database_instance:create --data postgres.yml
    blossom cache_instance:create --data redis.yml
    blossom activity:wait --id activity-100 --timeout 20m
    blossom environment_link:create --data postgres-link.yml
    blossom environment_link:create --data redis-link.yml

Map the linked connection URLs to the image's `POSTGRES_*` and `REDIS_*`
settings at startup, including Redis username, password and port. Use the
`default` Redis user when the URL leaves its username empty. Keep the
logical database and credentials stable. Set a private administrator password
and keep initial setup behind Blossom Account access.

Use a Persistent Service mounted at `/var/www/html`. This preserves the image's
configuration, installed apps and data together. Set trusted domains and
HTTPS overwrite settings from the Service's public hostname. Give installation
and upgrades time to finish before the `/status.php` readiness check.

    blossom service:create --data web.yml
    blossom env_var:push --environment environment-100 --file .env.production
    blossom environment:deploy --id environment-100 --follow
    blossom environment:show --id environment-100

Configure background jobs using the image's supported entrypoint hooks and
cron process. Run Nextcloud commands as its application user. Keep one writer
for the Volume. Add an email provider when you need invitations and password
reset messages.

Keep the browser behind Account access, or use Nextcloud's own authentication
for a workspace your team can reach directly. Desktop/mobile clients and
public sharing need their required endpoints reachable; configure and test
those separately.

</details>

## Share Your First Folder

Upload a few sample documents. Create another user and share a folder with
that account. Confirm that each user sees only the files they should.

<details class="optional-reading" markdown="1">
<summary>Updates, persistence and backups</summary>

Keep the Volume, database, Redis connection and configuration across updates.
A Persistent Service stops its current writer before the replacement starts,
so expect an interruption during that handoff.

    blossom environment:deploy --id environment-100 --follow
    blossom container:list --environment environment-100

Our sample files and the read-only folder share survived Container replacement.
Fresh logins reopened the workspace, and the recipient could still read the
shared files while private files and writes stayed protected.

Follow the [Nextcloud backup guidance](https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html).
Back up the database, configuration and files together, then test restoring
them. A successful Container replacement does not test backup restoration.

</details>

## What You Get

- Your own browser-based file workspace
- User accounts and file-sharing controls
- Managed PostgreSQL and Redis with persistent file storage
