Post

How to Install Nextcloud AIO in a Proxmox LXC

Step-by-step guide to installing Nextcloud AIO in a Proxmox LXC container. Learn how to set up a secure, efficient, and self-hosted cloud solution for your files, calendars, and contacts using Proxmox and a reverse proxy.

How to Install Nextcloud AIO in a Proxmox LXC

Nextcloud is an open-source, self-hosted cloud storage solution that allows you to manage your files, calendars, contacts, and much more - all while maintaining complete control over your data. Rather than trusting your files to commercial cloud providers, you host Nextcloud on your own infrastructure, ensuring privacy and full ownership.

Installing Nextcloud on a Proxmox LXC (Linux Container) offers a lightweight, efficient, and resource-friendly method to run Nextcloud on your home server. Personally, I’ve been running this exact setup for several months without any significant issues. The system has proven to be remarkably stable, and weekly upgrades handle with minimal fuss. That said, I want to be honest - this is still a self-hosted solution, which means the responsibility for maintenance, updates, and troubleshooting falls on you. However, the effort is worthwhile if you value privacy and want to avoid being locked into proprietary platforms.

This guide walks you through installing Nextcloud AIO (All-In-One) in a Proxmox LXC container, and explains how to enable secure, public access to your Nextcloud instance using a reverse proxy with Nginx Proxy Manager (NPM). My approach here has been shaped by running a real setup for many months, so I try to share not just the steps, but also the reasoning behind them.


⚙️ Prerequisites and Planning

Before you begin, let me share some thoughts on preparation. Taking time to plan your setup properly will save you considerable troubleshooting later. Here’s what you’ll need in place:

  • A Proxmox server set up and running (see this article for reference).
  • Storage planning: A dedicated folder or mount point on your Proxmox server to hold all your Nextcloud data. I recommend using ZFS if your Proxmox setup supports it - it offers data redundancy and is very reliable for this use case. The amount of storage you need depends entirely on how much data you plan to store; there’s no universal answer.
  • An internet connection with reasonable speed for downloading packages, installing dependencies, and handling uploads/downloads between clients and your server.
  • A reverse proxy setup: This guide shows how to use Nginx Proxy Manager (NPM), but any other reverse proxy (Caddy, Traefik, etc.) will also work. The reverse proxy is important for two reasons: (1) it lets you use a proper domain name and HTTPS certificates instead of bare IP addresses, and (2) it simplifies your network architecture by centralizing SSL termination in one place.

A personal recommendation: Make sure your hardware has enough capacity. After monitoring my deployment for months, I found that 4 CPU cores and 8 GB of RAM were actually far more than I needed for personal use, but they provide comfortable headroom. If you’re just starting out, you can begin with these specs and reduce them later if you find the system is underutilized.

About Storage: ZFS vs Other Filesystems

While this guide uses ZFS as an example, it’s worth understanding the trade-offs. ZFS is excellent for reliability and data integrity - features like checksums and snapshots are powerful. However, it does consume more memory than simpler filesystems. If you’re on a system with limited RAM, ext4 is a perfectly valid (and simpler) alternative. The important thing is having some redundancy strategy - whether that’s ZFS pools, RAID, or regular backups to external drives.

Step 1: Create an LXC for Nextcloud

The first step is creating a lightweight container that will host Nextcloud AIO. LXCs are more efficient than full virtual machines - they use fewer system resources while still providing good isolation. This makes them ideal for homelab setups where you want to maximize performance without spending money on expensive hardware.

The Rationale: Unlike running Nextcloud directly on the Proxmox host, an LXC container keeps things isolated and modular. If something goes wrong with Nextcloud, you can wipe the container and start fresh without affecting the rest of your system.

Creating the Container

  1. Log in to Proxmox and create a new container:
    • Open your Proxmox Web Interface at https://<your-proxmox-ip>:8006.
    • Click the Create CT button.
    • Give it a meaningful name like nextcloud-aio - this helps you identify it later.
    • Choose a Debian-based template (Debian 13 or Ubuntu 24.04 recommended). These have excellent Docker support and long-term stability.
  2. Allocate resources thoughtfully:
    • For CPU: 4 cores is comfortable for personal use. You can always adjust this later if needed.
    • For RAM: 8 GB is a good starting point. Less is possible, but you’ll have less flexibility.
    • For disk: This is where Nextcloud stores all container images and configuration. I’d suggest at least 50 GB to be safe.
  3. Mount your storage for user data: This is critical - you want your actual Nextcloud files (photos, documents, etc.) to be stored on your dedicated storage, not on the LXC’s system disk.

    In Proxmox, after creating the container, you need to add a mount point. You can do this in two ways:

    Option A - Via the Config File (more reliable): Edit /etc/pve/lxc/<container_id>.conf (replacing <container_id> with your actual container ID) and add:

    1
    
    mp0: /pool/nextcloud_data,mp=/srv/nextcloud
    

    This maps your ZFS pool directory (/pool/nextcloud_data on the host) to /srv/nextcloud inside the container.

    Option B - Via Command Line:

    1
    
    pct set <container_id> -mp0 /pool/nextcloud_data,mp=/srv/nextcloud
    

    Why this matters: By mounting storage separately, if your LXC ever needs to be rebuilt, your actual data isn’t lost - it remains safely on the ZFS pool. This separation of “configuration” from “data” is a time-tested principle that has saved me from several stressful situations.


Step 2: Install Nextcloud AIO in the LXC

Now begins the actual Nextcloud installation. Let me walk you through this process and explain what’s happening at each stage.

Nextcloud AIO (All-In-One) works differently from traditional software installations. Instead of installing individual components separately, AIO uses Docker to manage a complete stack: Nextcloud itself, a database (PostgreSQL), caching layers (Redis and APCu), and optional components like Collabora (for document editing) and Talk (for video calls). This “batteries included” approach sounds complex, but it actually makes your life easier because you don’t have to juggle incompatible versions - everything is pre-tested together.

Preparation and Installation

  1. Start the LXC container: From the Proxmox Web Interface, select your container and click Start.

  2. Access the container console to run commands inside it: You can use the Web Console in Proxmox or SSH into the container if your network allows.

    1
    
    pct enter <container_id>
    
  3. Install the essentials - Docker and utilities: Docker is the foundation that runs all the Nextcloud components. While the installation script we’ll use later can handle much of this, it’s good to install Docker explicitly first:

    1
    2
    
    apt update && apt upgrade -y
    apt install -y curl git sudo
    

    Then install Docker using the official Docker installation script (this is safer than using distro packages):

    1
    
    curl -fsSL https://get.docker.com | bash
    

    Why the official script? Package managers sometimes provide older Docker versions. The official script always gives you the latest stable version with proper integration.

    Let’s verify Docker is working:

    1
    2
    
    sudo systemctl status docker
    docker --version
    
  4. Install Nextcloud AIO: This is where the real magic happens. We’ll use Docker to run the AIO “mastercontainer,” which orchestrates all the other services.

    Here’s the command to start AIO (this is the latest version - note the GitHub Container Registry URL):

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    
    sudo docker run \
      --init \
      --sig-proxy=false \
      --name nextcloud-aio-mastercontainer \
      --restart always \
      --publish 8080:8080 \
      --volume /srv/nextcloud/aio-config:/mnt/docker-aio-config \
      --volume /var/run/docker.sock:/var/run/docker.sock:ro \
      --env NEXTCLOUD_DATADIR="/srv/nextcloud/data" \
      --env APACHE_PORT=11000 \
      --env APACHE_IP_BINDING=0.0.0.0 \
      --env APACHE_ADDITIONAL_NETWORKS="" \
      --env SKIP_DOMAIN_VALIDATION=false \
      ghcr.io/nextcloud-releases/all-in-one:latest
    

    What this command does:

    • --name nextcloud-aio-mastercontainer: Names the container for easy identification
    • --restart always: Automatically restarts if the container crashes
    • --publish 8080:8080: Exposes the AIO management interface (you’ll access this at port 8080)
    • --volume mounts: These tell Docker where to find your actual data and where to store configuration
    • NEXTCLOUD_DATADIR="/srv/nextcloud/data": This critical environment variable tells Nextcloud where to store files - we’ve pointed it to the mounted storage
    • APACHE_PORT=11000: The internal Apache server runs on port 11000 (hidden from the internet, accessed only through the reverse proxy)

    A personal note on the ghcr.io/nextcloud-releases/all-in-one:latest image: Earlier versions of this guide used nextcloud/all-in-one:latest, which is no longer current. The move to GitHub Container Registry happened because it’s more reliable and faster. Always use the ghcr.io version if you’re setting up fresh.

  5. Access the AIO web interface: Once the container starts, open your browser and navigate to:

    1
    
    https://<your-lxc-ip>:8080
    

    You’ll see a self-signed certificate warning - this is normal. Accept it and proceed. The AIO interface will guide you through initial setup.


Step 3: Complete Post-Installation Configuration

Once Nextcloud AIO is running and the web interface is accessible, you’ll see the setup wizard. This is where you configure the domain name, admin account, and optional features. Let me share some guidance based on actual use:

About domain configuration: The AIO interface will ask you for a domain name. This is not optional - Nextcloud requires a proper domain name for HTTPS to work correctly. There’s a good reason (HSTS cookies) why using bare IP addresses causes problems later. Make sure you have a domain set up and pointing to your server before you complete this step.

Choosing optional features: The setup wizard lets you enable Nextcloud Office (for editing documents), Talk (for video calls), and other add-ons. My advice: start minimal. Add features only after you’ve verified the core system is stable. Extra services mean more memory usage and more things to maintain. You can always enable them later through the AIO interface.

Setting the admin account: Choose a strong password. This account has full access to your data, so treat it seriously.

Configuration Steps

  1. Complete the AIO setup wizard: The interface will guide you through selecting your domain, setting the admin password, and choosing which features to enable. Take your time with this - rushing here can cause headaches later.

  2. Let AIO create its internal services: After you submit, AIO will spend 10-15 minutes creating all the internal Docker containers (database, caching, web server, etc.). You can monitor progress through the interface or using Portainer if you’ve installed it. This is normal and expected.

  3. Configure two-factor authentication (strongly recommended): Once Nextcloud is running, log in and enable two-factor authentication. I prefer the TOTP app (like Authy or Google Authenticator) because it works even if your internet connection has issues.

  4. Understand your storage layout: Your actual files are stored at /srv/nextcloud/data (the mounted storage we set up earlier). AIO configuration is at /srv/nextcloud/aio-config. Keeping these separate means you can backup data independently from configuration.

  5. Set up regular backups: This is absolutely critical. AIO includes a built-in backup solution based on BorgBackup. I recommend enabling it immediately and testing a restore to make sure backups actually work before you depend on them.

    From experience: Thinking “I’ll set up backups later” is how people lose data. Set it up now while you don’t desperately need it. Your future self will thank you.


Step 4: Configure the Reverse Proxy (Nginx Proxy Manager)

Now comes the piece that makes everything accessible from outside your home network - the reverse proxy. If you haven’t already set up Nginx Proxy Manager, see this guide.

Why a reverse proxy matters: Without it, you’d have to expose Nextcloud directly to the internet. A reverse proxy sits between your users and Nextcloud, handling SSL certificates, protecting against common attacks, and distributing traffic. Think of it as an intelligent doorman for your server.

After AIO has finished its initial setup and all containers are running, the Nextcloud HTTP server will be listening on port 11000 inside the LXC. The reverse proxy will forward incoming HTTPS requests from your domain to this internal port.

Setting Up the Proxy Host in NPM

  1. Open Nginx Proxy Manager (usually at http://<npm-ip>:81): Log in with your credentials.

  2. Create a new proxy host:
    • Navigate to Proxy HostsAdd Proxy Host
    • Fill in the configuration:
    Setting Value
    Domain Names Your Nextcloud domain (e.g., cloud.example.com)
    Scheme http
    Forward Hostname / IP The IP address of your Nextcloud LXC container
    Forward Port 11000
    Cache Assets OFF
    Block Common Exploits ON
    Websockets Support ON

    About these settings: Block Common Exploits protects against common web attacks. Websockets Support is important for Nextcloud Talk and other real-time features.

  3. Configure SSL/TLS: Switch to the SSL tab:
    • SSL Certificate: Generate a new Let’s Encrypt certificate (NPM handles this automatically)
    • Force SSL: ON (redirects HTTP to HTTPS)
    • HTTP/2 Support: ON (faster connections)
  4. Add advanced configuration: In the Advanced tab, paste this configuration block:

    1
    2
    3
    
    client_body_buffer_size 512k;
    proxy_read_timeout 86400s;
    client_max_body_size 0;
    

    What these lines do:

    • client_body_buffer_size 512k: Prevents buffering issues with larger uploads
    • proxy_read_timeout 86400s: Allows requests to take up to 24 hours (critical for large file uploads)
    • client_max_body_size 0: Removes Nginx’s upload size limit entirely, letting Nextcloud handle it
  5. Save the proxy host.

After these settings are applied, your Nextcloud should now be accessible at your configured domain over HTTPS. The reverse proxy handles SSL termination, meaning all the complexity of certificate management happens transparently.

A reflection: The first time you see your Nextcloud working over your domain name with a valid SSL certificate is quite satisfying. It’s a tangible sign that your self-hosted setup is working.

After you have finished the reverse proxy configuration and installed the certificate, your Nextcloud instance is securely and publicly accessible.


Step 5: Maintaining Your Nextcloud Installation

Self-hosted systems require ongoing care. The good news is that Nextcloud AIO makes maintenance much simpler than it would be otherwise. Here’s what you should know:

Update philosophy: AIO handles updates very differently from traditional software. Instead of updating individual components, AIO updates the entire stack as a unit. This consistency is actually a strength - you don’t have to worry about version incompatibilities.

Regular Maintenance Tasks

  1. Check for Nextcloud updates (monthly): Open the AIO web interface and look for update notifications. When available, you can stop all containers, let AIO download and recreate them with the new version, then start everything again. This process takes maybe 10 minutes and there’s no downtime if you do it correctly.

  2. Monitor ZFS pool health (weekly): If you’re using ZFS, run this occasionally to check the health:
    1
    
    zpool status
    

    You’re looking for anything that doesn’t say “state: ONLINE”. If you see warnings, address them - ZFS is very good at alerting you before data is actually lost.

  3. Backup verification (monthly): Backups are useless if you can’t recover from them. AIO includes a backup integrity check. Run it occasionally to make sure your backups are actually valid. There’s nothing worse than discovering in a crisis that your backups are corrupted.

  4. Disk space monitoring: Keep an eye on available space on both your LXC system disk and your data storage. When storage gets above 80% full, performance can degrade. Plan ahead and add more storage before you’re desperate.

  5. Application-level maintenance: Nextcloud occasionally has built-in maintenance features (database optimization, preview image generation, etc.). Check the administration panel occasionally to see if anything needs attention.

My honest take: If you’re comfortable with Linux basics and have set up your monitoring (many people use Prometheus/Grafana for this), maintenance is straightforward. The most stressful thing you’ll encounter is probably “oh no, I forgot about that backup I was supposed to verify” - so just do it regularly and you’ll be fine.


🆕 UPDATE: What’s New in Nextcloud AIO (January 2026)

Important Changes: The Nextcloud AIO project continues to evolve, and there’s been significant progress since the original publication of this guide. Rather than pretending nothing has changed, I think it’s helpful to highlight what’s new and what you should know if you’re reading this guide in 2026 or later.

Container Registry Migration

The most visible change is the move to GitHub Container Registry (GHCR):

Old way (no longer recommended):

1
docker run ... nextcloud/all-in-one:latest

New way (current standard):

1
docker run ... ghcr.io/nextcloud-releases/all-in-one:latest

This change happened because GHCR is more reliable and faster than Docker Hub. If you’re setting up fresh, always use the ghcr.io URL. If you have an existing installation using the old URL, you should update it - it’s as simple as stopping the container, removing it, and recreating with the new image.

For quite some time, the standard way to install AIO was the docker run command with all its complex flags. The official documentation now strongly recommends using Docker Compose instead. Here’s why: Docker Compose is cleaner, more version-controlled, and easier to modify and maintain.

If you’re deploying AIO to a production system or plan to keep it for years, consider using Docker Compose. The official compose file is available at: https://github.com/nextcloud/all-in-one/blob/main/compose.yaml

A basic Compose setup looks like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
services:
  nextcloud:
    image: ghcr.io/nextcloud-releases/all-in-one:latest
    restart: unless-stopped
    container_name: nextcloud-aio-mastercontainer
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - "8080:8080"
    environment:
      - NEXTCLOUD_DATADIR=/srv/nextcloud/data
      - APACHE_PORT=11000

volumes:
  nextcloud_aio_mastercontainer:

This is much easier to read, track in git, and modify than a long docker run command.

Improved Reverse Proxy Documentation

The official documentation for running AIO behind a reverse proxy has improved significantly. If you’re using something other than Nginx Proxy Manager (say, Caddy or Traefik), there are now detailed, tested examples. The key takeaway: make sure your reverse proxy properly handles the X-Forwarded-* headers, or Nextcloud will get confused about URLs.

Performance and Customization Options

The AIO project now documents several performance tuning options:

  • Memory limits: You can set NEXTCLOUD_MEMORY_LIMIT to tune PHP memory per process
  • Upload limits: NEXTCLOUD_UPLOAD_LIMIT lets you control max file size
  • Execution time: NEXTCLOUD_MAX_TIME controls timeout for long operations

These environment variables can be added to your docker run command or compose file. The official GitHub repo has a full FAQ with examples of each.

Hardware Acceleration Support

If you have compatible hardware, AIO now supports GPU acceleration:

  • AMD/Intel (MESA drivers): Can use /dev/dri for video encoding
  • NVIDIA (experimental): Using the Nvidia Container Toolkit

This is optional and advanced, but it’s worth knowing it exists if you plan to use features like the Memories app with video processing.

Community Containers

Want additional features? The Nextcloud AIO community has created optional containers that extend functionality:

  • Fail2ban: Brute-force protection
  • LLDAP: Lightweight LDAP directory
  • ClamAV: Antivirus scanning
  • Netdata: System monitoring
  • pgAdmin: Database management interface

These aren’t part of the core AIO, but they’re officially supported and well-maintained.

Important: Updates Must Be Manual

This is critical enough to repeat: Never use Watchtower or automatic Docker update tools on Nextcloud AIO. The AIO mastercontainer manages its own update process through the web interface. Using external update tools can break internal dependencies and corrupt your installation.

If you’re running other Docker containers and want to automate their updates, use Watchtower with label-based filtering to explicitly exclude AIO containers.


🧠 Conclusion: Is Self-Hosting Right for You?

Installing Nextcloud AIO in a Proxmox LXC container with Nginx Proxy Manager provides a self-hosted, private cloud solution that gives you complete control over your data. It works well in my setup and many others have reported success with similar configurations.

That said, I want to be honest about the tradeoffs. Self-hosting isn’t the right choice for everyone:

When self-hosting shines:

  • You genuinely care about privacy and data sovereignty
  • You’re comfortable troubleshooting Linux systems
  • You have reliable power and internet (or adequate backups for when you don’t)
  • You’re willing to spend time on maintenance
  • You need long-term cost savings for large amounts of data

When it might not be for you:

  • You expect Slack-like support and 99.99% uptime
  • You’re uncomfortable dealing with server problems
  • Your household lacks basic tech knowledge to restart services
  • You have extremely demanding performance requirements

For personal use (which is what I do), this setup hits a sweet spot. Performance is solid, reliability has been excellent in my experience, and the cost is low after the initial hardware investment. The maintenance burden is manageable - mostly just checking on things occasionally and updating when new versions are available.

The Nextcloud project’s commitment to building a privacy-respecting alternative to commercial cloud services is genuinely valuable. AIO makes that vision accessible to ordinary people without requiring extensive systems administration knowledge.


📚 Further Reading

If you hit problems during your setup, the Nextcloud community forum is genuinely helpful - people there actually care about solving problems, which is refreshing compared to much of the internet.




Want to help fuel more posts? You know what to do:

Buy Me a Coffee at ko-fi.com
This post is licensed under CC BY 4.0 by the author.