Deploy Nextcloud on Ubuntu — self-hosted Google Drive alternative with file sync, calendar, contacts, video calls, and 200+ apps.
PHP_UPLOAD_LIMIT=16G to remove the default 10 MB restriction. Use cron (not Ajax) for background jobs in production.Grab the automated bash script from GitHub to follow along with the video.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/files/nextcloud/nextcloud-ubuntu.sh
chmod +x nextcloud-ubuntu.sh
sudo bash nextcloud-ubuntu.sh
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/files/nextcloud/nextcloud-ubuntu.sh
chmod +x nextcloud-ubuntu.sh
The script installs Docker if needed, then sets up Nextcloud with PostgreSQL and a 16 GB upload limit automatically.
sudo bash nextcloud-ubuntu.sh
Open your browser and navigate to:
http://<your-server-ip>:8080
Connect your devices to your Nextcloud instance using the official sync clients.
# Desktop sync client: https://nextcloud.com/install/#install-clients
# Mobile: search "Nextcloud" on App Store / Google Play
# Connect to your server:
# Server URL: https://your-domain.com
# Username: admin (set during install)
# Password: (auto-generated — shown after install script completes)
| Port | Purpose |
|---|---|
| 8080 | Nextcloud Web UI |
| 5432 | PostgreSQL (internal) |
Nextcloud is the world's most popular self-hosted cloud platform — a complete replacement for Google Drive, Google Calendar, Google Contacts, and Google Meet rolled into one. It runs on your server and gives you full ownership of your data. The file sync engine is as reliable as Dropbox; the calendar and contacts sync via CalDAV/CardDAV with every mobile OS; the video conferencing (Nextcloud Talk) works without any third-party service; and the app store adds 200+ integrations including Collabora Office for real-time document editing, OnlyOffice, end-to-end encryption, password manager, and more. For individuals and teams who want to leave the Google and Microsoft cloud ecosystem while losing none of the functionality, Nextcloud is the definitive choice.
Your files on Google Drive are processed by Google's AI for ad targeting, subject to US government data requests, and permanently deleted if you stop paying. Nextcloud runs on hardware you own, in a jurisdiction you choose, with encryption you control. The desktop sync client is indistinguishable from Dropbox in daily use — files appear in your system tray and sync automatically. The Nextcloud mobile app backs up your photos automatically, just like Google Photos, but to your own server.
Nextcloud serves on port 8080 by default. Always proxy through Nginx Proxy Manager with a valid TLS certificate — Nextcloud requires HTTPS for WebDAV sync clients and the mobile app to work correctly. PostgreSQL (5432) is internal. For external access, open port 443 on the firewall and point the Nextcloud client to your HTTPS domain. Nextcloud sends WebDAV sync on port 443 when accessed via HTTPS.
FileBrowser (lightweight file manager only — no sync clients or apps), Seafile (sync-focused, faster sync engine, no app ecosystem), Owncloud (Nextcloud predecessor — fewer features, smaller community), Syncthing (peer-to-peer sync with no central server). Nextcloud is the most complete self-hosted cloud platform; the others trade features for simplicity.
Skip Nextcloud if you only need file sync without the app ecosystem — Seafile or Syncthing are faster and lighter for pure sync. Also avoid it with less than 2 GB RAM and a slow single-core server — Nextcloud's PHP stack performs poorly on minimal hardware. If you only need to share files temporarily without ongoing sync, a simple FileBrowser instance is far simpler to run.
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
Google Drive runs on Google's servers — your data is subject to Google's privacy policy, US government data requests, and Google's service terms. Nextcloud runs on your server with full data ownership. Functionally, the experience is very similar: desktop sync folder, mobile app with auto photo backup, web interface for file management, link sharing, and collaborative editing. The main trade-off is that you are responsible for uptime, backup, and updates — Google handles that for Drive.
Yes. Install the Collabora Online or OnlyOffice app from the Nextcloud App Store. Collabora Online is based on LibreOffice and supports .docx, .xlsx, .pptx editing in the browser. OnlyOffice has higher Microsoft Office compatibility for complex formatting. Both support real-time collaborative editing with multiple users. You need a separate Collabora or OnlyOffice server (or use the built-in Nextcloud Office app for basic editing).
On Android: install DAVx5 from F-Droid or Google Play, add an account with your Nextcloud URL (https://your-domain/remote.php/dav/), and sync. On iOS: go to Settings → Calendar → Accounts → Add Account → Other → Add CalDAV Account — enter https://your-domain/remote.php/dav/ with your Nextcloud credentials. Both the Calendar and Contacts (CardDAV) apps use the same base URL.
The install script sets PHP_UPLOAD_LIMIT=16G, allowing uploads up to 16 GB. This covers virtually all common use cases including large video files and disk images. For uploads above this limit, use the Nextcloud desktop client which splits large files automatically and resumes interrupted uploads. WebDAV clients (Cyberduck, WinSCP) also bypass the browser upload limit for very large transfers.
Install the Nextcloud app on iOS or Android and enable Auto Upload in Settings. The app monitors your camera roll and uploads new photos to a designated Nextcloud folder (default: InstantUpload/Photos) whenever connected to Wi-Fi (and optionally on mobile data). Photos are organised by date automatically. Unlike Google Photos, no AI analysis or facial recognition is applied unless you install the optional Nextcloud Recognize app.
Yes. Nextcloud has comprehensive sharing: share a folder with a specific user (they see it in their own file browser), share with a group, share externally via a public link with optional password and expiry date, or share with other Nextcloud servers via Federated Cloud Sharing. Per-item permissions (view only, edit, create, delete, reshare) are granular. Share management is in the web interface and visible in the desktop client.
Nextcloud Talk is a built-in video conferencing and messaging app — think Zoom, WhatsApp, and Slack combined, running on your server. It supports 1:1 and group video calls, screen sharing, end-to-end encryption, file sharing within calls, and persistent chat rooms. Performance depends on your server hardware — for small teams (under 10 participants) a standard VPS handles it well. For larger calls, a TURN server is needed for participants behind NAT.
Yes — this is one of its primary use cases. Create user accounts for each family member or team member. Each user gets their own storage quota, file space, and personal calendar. Shared family albums, household calendars, and document collaboration all work out of the box. For a family of 4–6, a 2-core VPS with 2 GB RAM and a 500 GB disk provides a comfortable Nextcloud experience for files, photos, and calendar sync.