Skip to content
Deployments

Deploy Nextcloud with the nextcloud-files template

Deployment

Deploy Nextcloud with the nextcloud-files template

Stand up Nextcloud, an open-source file-sync and collaboration platform, on a single Quake AI instance using the validated OpenTofu template nextcloud-files. You apply the template, serve it over HTTPS through Caddy, set the trusted domain and admin bootstrap credentials, log in, upload a file and create a share link, and invite a teammate.

Nextcloud keeps your team's files on infrastructure you own. You run it yourself; this is a self-hosted tool you operate, not a managed multi-tenant service.

Team memberFloating IPUbuntu instanceCaddyreverse proxyNextcloudappMariaDBRedis proxies 443 to 8080files, users, sharesfile locking, cachingHTTPS
Click to zoom
What you'll build: a Nextcloud host on a single instance with bundled MariaDB and Redis, served over HTTPS through a Caddy reverse proxy

Monthly cost estimate

Pricing calculator ↗

Sized as a custom package on shared vCPU.

Starting template$33.60/mo

Monthly total for the required template above. Use the configurator below to add optional pieces and see the total update.

What each resource is for

Nextcloud files/collaboration host

s1a.medium · 4 shared vCPU, 4 GiB RAM, 0.5 Gbps

Runs Nextcloud's app container alongside a bundled MariaDB and Redis, with the database data and the Nextcloud html/data directory on an attached volume.

Nextcloud plus its bundled MariaDB and Redis runs on 4 vCPU and 4 GiB RAM for a small team. Nextcloud's entire purpose is storing user files, so its storage footprint grows with usage: plan to grow the attached volume over time.

$33.00/mo

Compute shown per role at custom-package rates ($29/dedicated vCPU, $7.25/shared vCPU, $1/GiB RAM). The headline above is the billed total: the cheaper of a named plan and the custom package, plus add-ons.

Included in baseline

s1a.medium

4 shared vCPU, 4 GiB RAM, 0.5 Gbps

$33.00

Compute + RAM rate basis

4 vCPU + 4 GiB RAM at $29/dedicated vCPU, $7.25/shared vCPU, $1/GiB RAM (regular). Totals apply the flat −$5/mo package promotion.

—

Block storage (70 GiB)

70 GiB at $0.08/GiB/mo

$5.60

Public IP (included)

1 included with the custom package

$0.00

Package promotional discount

Flat −$5.00/mo on the custom package (same promotion as named plans).

$-5.00

Included at no charge

These line items are zero on Quake AI. Many other providers meter them separately.

Data transfer (inbound and outbound)

Unlimited data transfer on every plan; Quake AI does not meter per-GB egress.

AWS, GCP, and Azure meter outbound transfer per GB. DigitalOcean and Hetzner include an allowance on compute plans, then charge overage.

Learn more
$0.00

Private networking

Private networks, subnets, Neutron routers, and security groups are included with the plan.

VPC objects are usually free to create elsewhere, but NAT gateways bill hourly plus per-GB processed. Quake AI uses router SNAT with no separate NAT line item.

$0.00

Control-plane API requests

OpenStack API calls for provisioning and management are included.

Some managed services on other clouds meter API calls or charge for premium control-plane features.

$0.00

Pricing data last validated: . For current rates, check quake.ai/pricing.

Prerequisites#

You need:

  • OpenTofu 1.6.0 or later (or Terraform 1.6.0 or later) installed locally.
  • Your OpenStack credentials sourced into the shell (source openrc.sh). See the OpenStack CLI guide.
  • An SSH keypair that already exists in your project. Record its name for the key_name variable.
  • A copy of the nextcloud-files template directory from the template reference page.
  • A domain you can point at the instance.

Step 1: Apply the template#

Copy the template's example variables file and set key_name:

bash
cp terraform.tfvars.example terraform.tfvars
HCL
key_name = "YOUR_KEY_NAME"

Initialize, preview, and apply:

bash
tofu init
tofu plan
tofu apply

OpenTofu provisions a private network, a router, a security group, a block volume mounted at /var/lib/docker, an instance, and a floating IP. On first boot, cloud-init installs Docker Engine, generates the MariaDB root/app passwords and the Redis password into /opt/nextcloud/.env, and starts only db and redis. Nextcloud rejects requests for hosts not on its trusted-domain list, so the app container waits until you finish configuration.

Read the outputs and record floating_ip:

bash
tofu output

Step 2: Point a domain at the host and serve HTTPS with Caddy#

  1. Create a DNS A record for your domain (for example files.example.com) pointing at YOUR_FLOATING_IP. Follow How to point a domain at a Quake AI resource. Wait until it resolves:
bash
dig +short files.example.com
  1. SSH to the instance and create /opt/nextcloud/Caddyfile:
files.example.com {
  reverse_proxy 127.0.0.1:8080
}
  1. Add Caddy to /opt/nextcloud/docker-compose.yml:
YAML
services:
  caddy:
    image: caddy:2
    restart: unless-stopped
    network_mode: host
    volumes:
      - /opt/nextcloud/Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data
volumes:
  caddy_data:

For background on certificates, see How to issue and auto-renew a TLS certificate with Let's Encrypt.

Step 3: Set the trusted domain and start Nextcloud#

Edit /opt/nextcloud/.env and uncomment and set:

NEXTCLOUD_ADMIN_USER=admin
NEXTCLOUD_ADMIN_PASSWORD=CHOOSE_A_STRONG_PASSWORD
NEXTCLOUD_TRUSTED_DOMAINS=files.example.com
OVERWRITEPROTOCOL=https
OVERWRITECLIURL=https://files.example.com

Start the full stack:

bash
cd /opt/nextcloud
sudo docker compose up -d

Step 4: Log in with the admin account#

Open https://files.example.com and log in with the NEXTCLOUD_ADMIN_USER/NEXTCLOUD_ADMIN_PASSWORD you set in step 3.

  1. Select Upload, choose a file from your machine, and confirm.
  2. Hover the uploaded file, select Share, then Create link.
  3. Copy the generated link.

Step 6: Invite a teammate#

  1. Select the account menu in the top right and choose Users.
  2. Select New user, enter a username and password for your teammate, and confirm.
  3. Share the login URL and the credentials with your teammate directly.

What you built#

  • Applied the nextcloud-files template to provision a network, security group, data volume, instance, and floating IP, with MariaDB and Redis started automatically by cloud-init
  • Served Nextcloud over HTTPS by pointing a domain at the floating IP and routing it through a Caddy reverse proxy
  • Set the trusted domain and admin bootstrap credentials and started the Nextcloud app container
  • Logged in with the admin account
  • Uploaded a file, created a share link, and invited a teammate

Scope of this deployment#

This template runs a single-VM Nextcloud host, not a managed multi-tenant file-storage service. The instance is CPU-only and runs in one region, and it bundles MariaDB and Redis as containers on the same host, sized for a small team. You operate the instance, Docker, Nextcloud, the database, and the data volume yourself: back them up, patch them, and grow the attached volume as your team's file storage usage grows.

Next steps#

Clean up#

When you no longer need the deployment, destroy everything the template created:

bash
tofu destroy

Then remove the DNS A record you created in step 2. Because Nextcloud and its database both live on the instance and its attached volume, tofu destroy removes them along with the infrastructure.

Before this
Was this page helpful?