---
title: "Deploy Nextcloud on StackBlaze"
description: "Deploy Nextcloud with managed Postgres, Valkey for file locking, a data volume, background jobs and email that sends, on a public HTTPS URL. It installs itself before it goes live, so there is no setup page for someone else to claim. Sign in as admin and start uploading."
category: "storage, work, collaboration"
url: https://www.stackblaze.com/templates/nextcloud
---

# Deploy Nextcloud

Deploy Nextcloud with managed Postgres, Valkey for file locking, a data volume, background jobs and email that sends, on a public HTTPS URL. It installs itself before it goes live, so there is no setup page for someone else to claim. Sign in as admin and start uploading.

**[Deploy Nextcloud on StackBlaze](https://dashboard.stackblaze.com/new/template/nextcloud)**

## This stack

- **Nextcloud**: Web service
- **Worker**: Background worker
- **PostgreSQL**: managed database · TCP:5432
- **Valkey**: managed cache · TCP:6379
- **Email**: platform add-on

## What you get

- **Files from anywhere**: Upload, organise and preview files and photos in the browser, or sync them with the Nextcloud desktop and phone apps over WebDAV.
- **Share with a link**: Share a file or folder with people on your instance, or create a public link with an optional password and expiry date for anyone else.
- **Calendar and Contacts**: Calendar and Contacts are installed on the first start and sync with phones and desktop apps over CalDAV and CardDAV.
- **No open setup page**: Nextcloud installs itself with an admin password generated at deploy before the web server starts. Nobody else can claim your instance.
- **Locking and jobs set up**: Valkey handles file locking and caching, and a worker runs Nextcloud’s background jobs every five minutes, as upstream recommends.
- **Email that sends**: Password resets and share notifications go out through the platform Email add-on. There is no mail server to configure.

## After you deploy

1. **Open the public URL**: The hostname is on the app page after deploy. The first start installs Nextcloud with Calendar and Contacts before the web server starts, which takes about three minutes.
2. **Sign in as admin**: Copy NEXTCLOUD_ADMIN_PASSWORD from the app’s Variables in the dashboard and sign in as admin. Change the password under Personal settings, Security.
3. **Add people and files**: Create accounts under Accounts, then upload files or connect the desktop and phone apps with your URL.

## How it is wired

- **Files are on the volume**: Nextcloud’s config, its added apps and every uploaded file live on a 10 GB volume, so they stay after a restart or redeploy. The code itself comes from the image.
- **Postgres holds the metadata**: Accounts, shares, calendars, contacts and the file index live in the attached Postgres database, with passwords generated at deploy.
- **Valkey locks and caches**: File locking, the distributed cache and browser sessions use the attached Valkey, so parallel uploads and syncs don’t clash.
- **Background jobs in a worker**: A worker runs cron.php every five minutes for cleanup, notifications and previews, and Nextcloud is set to cron mode on install.

## Common questions

### How do I sign in after deploy?

Open the public URL and sign in as admin with the password generated at deploy, shown as NEXTCLOUD_ADMIN_PASSWORD in the app’s Variables in the dashboard. Nextcloud is installed before the web server starts, so there is no setup page.

### Why is the app store switched off?

Apps from the store run as PHP code on your server, so the template turns the store off. Admins can still enable or disable the apps that ship with Nextcloud, and Calendar and Contacts are installed for you and updated on each redeploy.

### Can I sync with the desktop and phone apps?

Yes. Install the Nextcloud desktop or phone app, enter your public URL and sign in. Calendars and contacts sync with any CalDAV and CardDAV client.

### How big can uploads be?

The web app and the sync clients upload large files in chunks, so files bigger than a single request go through. The volume starts at 10 GB.

### Can I use my own domain?

Yes. Attach a custom domain in the dashboard, add it to TRUSTED_DOMAINS under Variables and redeploy, so Nextcloud answers on it.

### How do updates work?

Nextcloud updates by moving to a newer image, not with the built in updater. On the next start the template upgrades the files on the volume and the database, one major version at a time.

### What does it cost?

You pay for the compute, storage and bandwidth Nextcloud, Postgres and Valkey use, and for the emails it sends, not per user or per seat.


Source: https://github.com/nextcloud/server
