Set Up Your Private Cloud
Set Up Your Private Cloud
Nextcloud is where your files live.
Think of it as the foundation of your private cloud — a central hub that syncs files to all your devices, accessible from any browser, with mobile apps for iOS and Android. It’s what Dropbox and Google Drive do, except you own it entirely.
Over the years, Nextcloud has grown into a full platform. On top of file sync, it offers a calendar, contacts, document editing, video calls, and dozens of apps through its own app store. For this weekend, we’re focusing on the core: files.
Install Nextcloud
cd ~/docker/nextcloud
nano docker-compose.yml
services:
nextcloud:
image: nextcloud:latest
container_name: nextcloud
volumes:
- nextcloud_data:/var/www/html
- /data/files:/var/www/html/data
environment:
- MYSQL_HOST=nextcloud-db
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=change_this_password # ← change this
- NEXTCLOUD_ADMIN_USER=admin
- NEXTCLOUD_ADMIN_PASSWORD=change_this_too # ← change this
- NEXTCLOUD_TRUSTED_DOMAINS=files.home 192.168.1.100
depends_on:
- nextcloud-db
networks:
- proxy
- internal
restart: unless-stopped
nextcloud-db:
image: mariadb:10.11
container_name: nextcloud-db
volumes:
- nextcloud_db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=change_root_password # ← change this
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=change_this_password # ← match above
networks:
- internal
restart: unless-stopped
nextcloud-cron:
image: nextcloud:latest
container_name: nextcloud-cron
volumes:
- nextcloud_data:/var/www/html
entrypoint: /cron.sh
depends_on:
- nextcloud-db
networks:
- internal
restart: unless-stopped
volumes:
nextcloud_data:
nextcloud_db:
networks:
proxy:
external: true
internal:
driver: bridge
Create the data directory:
sudo mkdir -p /data/files
sudo chown -R www-data:www-data /data/files
Start Nextcloud:
docker compose up -d
First startup takes a few minutes as Nextcloud initializes the database. Open your browser and go to http://files.home.
First Login
Log in with the admin credentials you set in the compose file. You’ll see the Nextcloud dashboard — a clean file manager interface.
Spend a few minutes exploring. The Files section is your main storage. The left sidebar shows your file structure. The top navigation gives you access to other Nextcloud apps.
Important first step: Go to Settings → Administration → Basic settings and set up a background job. Change it from AJAX to Cron — the cron container you added handles this automatically, which is more reliable.
Install the Desktop Sync Client
The desktop sync client makes Nextcloud feel just like Dropbox — a folder on your computer that stays in sync with your server automatically.
Download the Nextcloud desktop client from nextcloud.com/install/#install-clients for your operating system (Windows, Mac, or Linux).
Install and open it. Click “Log in” and enter your server address: http://files.home.
Log in with your admin credentials. Choose which folders to sync and where to sync them on your computer. The default is a Nextcloud folder in your home directory.
Once syncing starts, any file you put in that folder appears on your server. Any file you access from another device appears on your computer. Exactly like Dropbox.
Install the Mobile App
Search for Nextcloud in the App Store or Google Play Store (it’s free). Enter your server URL and credentials. The mobile app lets you browse, upload, and download files from your phone.
For automatic photo backup from your phone to Nextcloud (separate from Immich — Nextcloud is for documents and files, Immich is for photos), you can enable “Auto Upload” in the Nextcloud mobile app settings.
Import Your Files
Copy your Dropbox or Google Drive export into your Nextcloud data folder:
cp -r ~/staging/files/* /data/files/admin/files/
Then tell Nextcloud to scan for the new files:
docker exec -u www-data nextcloud php occ files:scan --all
This may take a few minutes for large file collections. When it finishes, refresh the Nextcloud web interface — all your files will be there.
Organize Your Nextcloud
Create a folder structure that makes sense for your household. Some suggestions:
- Documents — Important papers, PDFs, contracts
- Photos — Non-phone photos (camera imports, scans) — though phone photos live in Immich
- Family — Shared folder for household documents
- Work — Work-related files
You can share individual folders with family members. Right-click any folder and select Share — you can share by username (for other Nextcloud accounts) or generate a link for people who don’t have accounts.
Nextcloud Office (Optional)
Nextcloud can edit documents, spreadsheets, and presentations directly in the browser — like Google Docs, but yours. This requires installing the Collabora Online app.
This is an optional step beyond the core weekend build. If you want it, it’s available in the Nextcloud App Store under Office & Text → Collabora Online. Follow the setup wizard — it will walk you through configuring a Collabora server alongside Nextcloud.
Cactus Commons Media