# Spec: Deploy Nextcloud

## Metadata
- Type: Spec
- Status: Draft
- Project: Nextcloud
- Created: 2026-05-12
- Updated: 2026-05-14

## Objective

Deploy Nextcloud as a collaboration platform for tasks, calendar, communication, coordination, and later cloud storage.

## Background

The user wants Pi to help manage home servers, projects, learning, notes, scripts, and personal operations. A shared platform is needed to reduce overwhelm and provide task/calendar/collaboration structure.

## Requirements

Must have:
- Nextcloud running on a dedicated VM/LXC on the user's Proxmox box
- Admin account configured
- User account for Deeso
- User account for Pi/assistant
- Tasks app available
- Calendar app available
- Talk app available
- LAN and Tailscale access
- Use `nc.dropcutstud.io` as the intended hostname
- Approximately 80 GB initial storage allocation
- Basic operational documentation
- Backup approach identified before important data is stored

Nice to have:
- HTTPS via reverse proxy or local certificate strategy
- Friendly domain/subdomain
- Contacts app
- Notes integration or Obsidian-friendly workflow
- Monitoring/health checks

Out of scope for initial deployment:
- Public internet exposure unless explicitly approved
- Full cloud storage migration
- Complex automation before the manual deployment is understood
- Multi-user governance beyond initial needs

## Users / Stakeholders

- Primary user: Deeso
- Assistant/operator: Pi
- Possible future collaborators/family/users

## Proposed Design

Preferred approach:
- Run Nextcloud in a dedicated VM.
- Keep initial deployment LAN-only unless public access is deliberately specified.
- Use a deployment method that is maintainable for a single-person homelab.
- Document all important decisions and routine operations.

Recommended deployment method:
- Docker Compose on a Debian/Ubuntu VM, using Nextcloud + PostgreSQL + Redis.

Rationale:
- Easier to understand and document than a fully bundled appliance.
- More flexible for LAN/Tailscale/reverse-proxy setups.
- Avoids Snap-specific operational quirks.
- Less opinionated than Nextcloud AIO while still easy to back up and move.

Alternatives considered:
- Nextcloud AIO: convenient, but more opinionated and can complicate custom reverse proxy / LAN-only setups.
- Snap: simple initially, but less transparent for learning and operations.
- Traditional package install: flexible, but more manual maintenance burden.

## Infrastructure / Dependencies

Known:
- Hypervisor/host: user's Proxmox box
- Guest VM hostname: `nextcloud`
- Guest VM IP: `192.168.0.110`
- Guest VM OS: Ubuntu 25.04
- Guest VM current root disk: about 39 GB usable, not 80 GB yet
- Guest VM resources: 2 vCPU, about 3.3 GiB RAM
- Access model: LAN and Tailscale
- Intended hostname: `nc.dropcutstud.io`
- Current public DNS for `nc.dropcutstud.io`: `202.90.245.135`, not the VM LAN IP
- Initial storage target: about 80 GB
- Recommended database: PostgreSQL
- Recommended cache/locking: Redis

Still to confirm:
- VM vs LXC; VM recommended for isolation and simpler Docker support
- VM operating system; Debian 12 or Ubuntu Server LTS recommended
- CPU/RAM allocation
- Backup target; currently none
- DNS/domain implementation for LAN/Tailscale
- Reverse proxy / HTTPS plan

## Security / Safety

- Prefer least privilege.
- Use strong admin password.
- Avoid exposing Nextcloud publicly until reverse proxy, HTTPS, updates, and backup plan are clear.
- Take VM snapshot before major changes when possible.
- Document credentials location without storing secrets directly in this repo.

## Backup / Rollback Plan

Current state:
- No backup destination exists yet.

Initial requirement:
- Identify what needs backing up: Docker Compose files, environment file, PostgreSQL database, Nextcloud config, app data, and user data.
- Use Proxmox snapshot/backup as a temporary safety net if available.
- Choose a real backup destination before storing important data.
- Document restore outline.

Before production use:
- Take initial VM snapshot or host-level backup.
- Create a runbook for backup and restore.
- Consider adding a separate backup ticket.

## Open Questions

Answered:
- Host/hypervisor: user's Proxmox box.
- Access: LAN and Tailscale.
- Domain/subdomain: `nc.dropcutstud.io`.
- Initial storage: about 80 GB.
- Backup destination: none currently available.
- Deployment recommendation: Docker Compose on a VM.

Still open:
- Whether to continue with Ubuntu 25.04 or rebuild on Debian 12 / Ubuntu LTS.
- Whether to expand VM disk to the intended 80 GB before deployment.
- How should `nc.dropcutstud.io` resolve on LAN/Tailscale?
- Is HTTPS required immediately?
- Where should backups go?
- Should Pi/assistant account be admin or normal user initially?

## Acceptance Criteria

This spec is satisfied when:
- [x] Deployment target is chosen: Proxmox box
- [x] Deployment method is recommended: Docker Compose on VM
- [x] Access model is chosen: LAN and Tailscale
- [ ] Backup target/approach is chosen
- [ ] Installation succeeds
- [ ] Admin login works
- [ ] Tasks and calendar are usable
- [ ] Basic runbook and decisions are documented

## Decisions

- Prefer a dedicated VM for Nextcloud.
- Treat Nextcloud as an operational platform, not just file storage.
- Do not expose management interfaces or new services publicly without deliberate security planning.
- Use LAN and Tailscale access initially.
- Use `nc.dropcutstud.io` as the intended hostname.
- Start with approximately 80 GB storage.
- Recommend Docker Compose on Debian/Ubuntu VM with PostgreSQL and Redis.
- A backup destination is still needed before important data is stored.
