Nextcloud is a self-hosted alternative to Google Drive, Dropbox, and Microsoft 365. You get file sync, calendar, contacts, and even a full office suite (Collabora) under your own domain, on your own server. No third party reads your data.

There are two ways to run Nextcloud on GoZen Host: a quick install on shared hosting (with limitations), or a full-featured deployment on a VPS.

Option 1: Nextcloud on Shared Hosting (Quick Start)

This is the fastest path. Softaculous installs Nextcloud in one click through cPanel. Good for personal use or small teams who want cloud storage without managing a server.

Installation

  1. Log into cPanel
  2. Open Softaculous Apps Installer
  3. Search for Nextcloud
  4. Click Install
  5. Choose your domain or subdomain (e.g., cloud.yourdomain.com)
  6. Set admin username and password
  7. Click Install

You’ll have a working Nextcloud instance in under a minute.

Limitations on Shared Hosting

Shared hosting runs Nextcloud, but with tradeoffs:

  • No Collabora/OnlyOffice: the built-in office suite (document editing, spreadsheets) requires a separate server process. Shared hosting can’t run it
  • PHP worker limits: CloudLinux caps concurrent connections. If multiple users sync large files simultaneously, you’ll hit entry process limits
  • No Redis: without in-memory caching, Nextcloud’s interface feels sluggish under load
  • Storage caps: your Nextcloud files count toward your hosting plan’s disk quota

For personal use with a few users, this works fine. For a team or anything beyond basic file sync, use a VPS.

This is the recommended setup. You get the full Nextcloud experience: Collabora for document editing, Redis for speed, and no resource caps.

ComponentMinimumNotes
CPU4 vCPUsCollabora needs CPU for document rendering
RAM6 GBNextcloud + MariaDB + Redis + Collabora
Storage100 GB NVMeScale based on how much data your team stores
OSUbuntu LTS (24.04)Best community support for Nextcloud + Docker

Start with a GoZen VPS at these specs. You can scale up storage and RAM later without reinstalling.

Step 1: Prepare the Server

SSH into your VPS and update everything:

  sudo apt update && sudo apt upgrade -y
  

Install Docker and Docker Compose:

  # Install Docker
curl -fsSL https://get.docker.com | sudo sh

# Add your user to the docker group
sudo usermod -aG docker $USER

# Install Docker Compose plugin
sudo apt install docker-compose-plugin -y

# Verify
docker --version
docker compose version
  

Log out and back in for the group change to take effect.

Step 2: Set Up the Project

Create a directory for Nextcloud:

  mkdir -p ~/nextcloud && cd ~/nextcloud
  

Create a docker-compose.yml file:

  services:
  db:
    image: mariadb:11
    container_name: nextcloud-db
    restart: always
    volumes:
      - db_data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: CHANGE_THIS_ROOT_PASSWORD
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_PASSWORD: CHANGE_THIS_DB_PASSWORD

  redis:
    image: redis:7-alpine
    container_name: nextcloud-redis
    restart: always

  app:
    image: nextcloud:stable
    container_name: nextcloud-app
    restart: always
    ports:
      - "8080:80"
    volumes:
      - nextcloud_data:/var/www/html
    environment:
      MYSQL_HOST: db
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_PASSWORD: CHANGE_THIS_DB_PASSWORD
      REDIS_HOST: redis
      NEXTCLOUD_TRUSTED_DOMAINS: cloud.yourdomain.com
      OVERWRITEPROTOCOL: https
    depends_on:
      - db
      - redis

volumes:
  db_data:
  nextcloud_data:
  

Step 3: Start Nextcloud

  docker compose up -d
  

Docker pulls the images and starts everything. First run takes a few minutes. Check that all containers are running:

  docker compose ps
# All three should show "Up"
  

Nextcloud is now running on port 8080. But don’t access it directly - set up a reverse proxy with SSL first.

Step 4: Set Up a Reverse Proxy with SSL

Install Nginx and Certbot:

  sudo apt install nginx certbot python3-certbot-nginx -y
  

Create an Nginx config for Nextcloud:

  sudo nano /etc/nginx/sites-available/nextcloud
  
  server {
    listen 80;
    server_name cloud.yourdomain.com;

    client_max_body_size 10G;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
  

Enable the site and get an SSL certificate:

  sudo ln -s /etc/nginx/sites-available/nextcloud /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

# Get SSL certificate
sudo certbot --nginx -d cloud.yourdomain.com
  

Certbot will configure HTTPS automatically and set up auto-renewal.

Step 5: Complete Setup

  1. Open https://cloud.yourdomain.com in your browser
  2. Create your admin account
  3. Nextcloud detects the database and Redis configuration from Docker automatically

Step 6: Add Collabora (Office Suite)

Collabora lets you edit documents, spreadsheets, and presentations directly in Nextcloud - like Google Docs, but self-hosted.

Add Collabora to your docker-compose.yml:

    collabora:
    image: collabora/code
    container_name: nextcloud-collabora
    restart: always
    ports:
      - "9980:9980"
    environment:
      - aliasgroup1=https://cloud.yourdomain.com:443
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
    cap_add:
      - MKNOD
  

Run docker compose up -d to start Collabora.

Add an Nginx config block for Collabora:

  sudo nano /etc/nginx/sites-available/collabora
  
  server {
    listen 80;
    server_name office.yourdomain.com;

    location / {
        proxy_pass http://127.0.0.1:9980;
        proxy_set_header Host $host;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}
  
  sudo ln -s /etc/nginx/sites-available/collabora /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginx
sudo certbot --nginx -d office.yourdomain.com
  

Then in Nextcloud:

  1. Go to Apps > install Nextcloud Office
  2. Go to Administration Settings > Nextcloud Office
  3. Select Use your own server
  4. Enter: https://office.yourdomain.com
  5. Save

You now have a complete self-hosted Google Workspace alternative.

Keeping It Updated

Docker (VPS)

  cd ~/nextcloud
docker compose pull
docker compose up -d
  

This pulls the latest images and restarts the containers. Nextcloud runs its database migrations automatically.

Shared Hosting

Softaculous handles updates. Go to Softaculous > Installations > click the update icon next to Nextcloud.

Backups

VPS

Back up both the Docker volumes and the database:

  # Stop Nextcloud (optional, for consistency)
docker compose stop app

# Back up data volume
docker run --rm -v nextcloud_nextcloud_data:/data -v $(pwd):/backup alpine tar czf /backup/nextcloud-data-$(date +%Y%m%d).tar.gz /data

# Back up database
docker exec nextcloud-db mysqldump -u root -pYOUR_ROOT_PASSWORD nextcloud > nextcloud-db-$(date +%Y%m%d).sql

# Start Nextcloud
docker compose start app
  

Store backups offsite. Use GoZen’s VPS snapshots for full-server backups.

Shared Hosting

Backuply handles this automatically on GoZen shared hosting. Your Nextcloud files and database are included in the daily offsite backups.

Troubleshooting

ProblemFix
Upload fails for large filesIncrease client_max_body_size in Nginx config. Also check PHP upload limits (upload_max_filesize, post_max_size)
“Access through untrusted domain”Add your domain to NEXTCLOUD_TRUSTED_DOMAINS in docker-compose.yml, then recreate the container
Slow interfaceCheck that Redis is running (docker compose ps). Without Redis, Nextcloud uses file-based locking, which is slow
Collabora won’t connectMake sure office.yourdomain.com has a valid SSL certificate and the proxy config includes WebSocket upgrade headers
Sync client can’t connectCheck if port 443 is open in your firewall (sudo ufw allow 443)
508 on shared hostingToo many concurrent sync connections. Reduce sync frequency in the desktop client or move to a VPS

What to Do Next

Last updated 07 Apr 2026, 00:00 +0200. history

Was this page helpful?