To raise new questions, new possibilities, to regard old problems from a new angle, requires creative imagination and marks real advance in science, Albert Einstein.
We shall defend our island, whatever the cost may be. We shall fight on the beaches, we shall fight on the landing-grounds, we shall fight in the fields and in the streets, we shall fight in the hills. We shall never surrender!, Winston Churchill.
Nextcloud is an open-source software suite that enables users to create their own private cloud storage solutions, offering file hosting, synchronization, and sharing services. It serves as a free alternative to popular platforms like Dropbox and Google Drive, emphasizing privacy and data ownership.
Cutting the cord on traditional subscriptions can save you or your company significant money.
This guide covers the installation and configuration of Nextcloud in a Proxmox LXC container running Ubuntu 24.10, using an Apache web server, PHP 8.3, and MariaDB 11.4. You should read first:
Now everything is ready to run Nextcloud’s setup.
Open your favorite browser and navigate to your NextCloud’s container IP, [http:] + “//” + “dirIP” (e.g., 192.168.1.52/) or https://cloud.justtothepoint.com/
.
You should see the Nextcloud setup page. Admin Account. This is where you’ll create an admin account (Nextcloud’s master login) and connect Nextcloud to the database.
Data folder: By default it shows /var/www/nextcloud/data.
# By default, Nextcloud will store user files in /var/www/nextcloud/data.
# It is recommended to store the data directory outside the web root for security reasons.
# Create a directory and give ownership to www-data.
sudo mkdir -p /var/nc_data
sudo chown www-data:www-data /var/nc_data
If you followed the previous step to create a data directory outside web root (e.g., /var/nc_data), click on Storage & database (if the option is hidden) and change the Data folder path to /var/nc_data
. This way, the Nextcloud PHP app can access files there, but Apache won’t serve them directly since it’s outside /var/www.
Database Setup: Choose MySQL/MariaDB
as the database type. Enter the database user (nextcloud), the password you previously set (YourSecurePassword), and the database name (nextcloud). The host is localhost, and smash the Install button.
Press the Install recommended apps.
When you log into Nextcloud, you’ll see the Dashboard or Files page, which provides quick access to your apps, files, activity feed, and other features.
Click on Files in the top corner to view and manage your files. You can create folders, upload files, and organize your data within the interface.
Upload Files: Drag and drop files into the Files area or click the upload button.
Create Folders: Use the “+ New” button to create folders for better organization.
Preview Files: Click on any file to view a preview, including images, documents, and videos.
Edit Files: Depending on the file type, you can edit documents directly in the browser using integrated apps like Collabora or OnlyOffice.
Delete Files: Select a file and click the trash can icon 🗑️ Delete file to delete it.
Share Files: Select a file or folder, Show sharing options
, Internal shares
(Share files with users or groups within your Nextcloud instance) External shares
(Generate shareable URLs with optional password protection, expiration dates, and download limits) and generate share links.
Installing Apps. To add apps. Click on your profile icon in the top right corner. Select Apps from the dropdown menu. Browse or search for specific apps. Click the Download and enable button to install the app.
Important apps: Collabora Online or OnlyOffice (Real-time document editing and collaboration directly within Nextcloud); Nextcloud Talk (Secure video/audio conferencing with screen sharing and end-to-end encryption); Nextcloud Deck (A project management tool for organizing tasks and projects using Kanban boards); Netxcloud assistant (the primary graphical user interface for interacting with artificial intelligence features in Nextcloud); Nextcloud Mail (To manage your email accounts directly from Nextcloud); Nextcloud Contacts (For managing and synchronizing your contacts); Nextcloud Calendar (To schedule events and manage your calendar); News (an RSS/Atom feed reader for tracking blogs or news sites); Notes (distraction-free notes and writing with Markdown support); Keeweb (Open Keepass stores inside Nextcloud just by clicking on an *.kdbx file in your Nextcloud); Passwords (store, manage, and access all your passwords with easy).
Advanced Configuration: Administration, Theming (customize the look and feel of your Nextcloud instance); Administration, Security, Two-Factor Authentication (2FA) (Enhance security with U2F keys, TOTP apps, or SMS codes).
Make sure that + Apps, Features apps, Two-Factor TOTP Provider is enabled. Go to Personal Settings, Security, Check Enable TOTP
, then scan the QR code with the Google Authentication app on your phone and enter the authentication code. It’s a good practice to Generate backup codes and save them in a safe place (e.g., KeePassXC).
By default Nextcloud uses AJAX cron which is not reliable for real use. We already have the ability to run system cron, which is recommended.
# SSH your LXC container
ssh -Y nmaximo7@192.168.1.40
# Keep the system packages updated
sudo apt update && apt upgrade
# Set up a system cron job to execute Nextcloud’s background tasks
sudo crontab -u www-data -e
# If prompted, choose an editor (nvim). Then add the following line:
*/5 * * * * php -f /var/www/nextcloud/cron.php
# This schedules cron.php to run every 5 minutes.
In Nextcloud’s Administration Settings, Settings, Basic Settings, switch “Background jobs” from Ajax to Cron
and the warning (Some jobs have not been executed since a day ago. Please consider switching to system cron) should disappear.
Nextcloud uses config/config.php (e.g., sudo nvim /var/www/mynextcloud/config/config.php) as its main configuration file.
sudo nvim /var/www/mynextcloud/config/config.php
[...]
# Default Phone Region
'default_phone_region' => 'ES',
# We installed APCu, but to make Nextcloud use it, add the following line:
'memcache.local' => '\\OC\\Memcache\\APCu',
After adding, refresh the Nextcloud Administration, Overview page to ensure the message No memory cache has been configured
is gone.
Email (Gmail). IMAP Settings: imap.gmail.com
; IMAP Port: 993; IMAP User: your_user@gmail.com
; IMAP Password (You need to create an app password). SMTP Settings: imap.gmail.com
; SMTP Port: 587; SMTP User: your_user@gmail.com
; SMTP Password (You need to create an app password).
If you use two factor authentication, you’ll need to generate an app password: Visit https://myaccount.google.com/apppasswords. At the bottom of the page, click the drop-down box labeled Select app, choose the option, Other (Custom name)
. Enter a descriptive name, such as “Nextcloud”, and click Generate.
Calendar. A. Export from Google Calendar. Log in to your Google account and access Google Calendar. Go to Settings, Import & Export, choose Export
, select the desired calendars, and download the .ics file(s). Next (B), let’s import them into Nextcloud. Open the Calendar app in Nextcloud. Click on Calendar settings (usually in the bottom left corner), **Import calendar", and select the .ics file(s) you previously downloaded and import them.
In the left pane of the News app all subscriptions are displayed. By clicking on the + Subscribe button on top of the list you can add new subscriptions, e.g., https://feeds.megaphone.fm/GLT1412515089 (The Joe Rogan Experience). The Nextcloud News Reader App makes it possible to synchronize feeds between Android and the Nextcloud News App.
Check your home (external) public IP hasn’t changed (whatismyip.com). Your domain’s A record (cloud.justtothepoint.com) still points to the old IP (79.144.66.93), but your router now has a new external IP. Update the A record in your DNS provider.
Check container’s IP hasn’t changed: ip a
in the container. If it changed, update the port forwarding rules in your router to point to the new IP.
Ensure your router always assigns the same IP address (192.168.1.40) to your Proxmox container with MAC address by setting a static DHCP lease or DHCP reservation. Log in to your router’s web interface (http://192.168.1.1). Go to Advanced Settings. Select Local Area Network (LAN) Setup or LAN. Look for Advanced Setup or Static IP Lease List, LAN (Local Area Network (LAN) Setup), select Add Entries. Add a new static DHCP lease: MAC Address (Run in your container: ip a
, the MAC address is next to link/ether bc:24:11:5d:1b:34).
Check Apache and Nextcloud container are running. SSH into your container (ssh nmaximo7@192.168.1.40) and run systemctl status apache2
. If not, restart Apache: sudo systemctl restart apache2
.
Firewall or Router Glitch. Re-confirm NAT port forwards in router. Double-check in your router’s NAT table that:
External port 80 ➜ internal 192.168.1.40:80
External port 443 ➜ internal 192.168.1.40:443
Some routers have separate port ranges (like “start” and “end”) – make sure both are exactly 80 (or 443).
NAT Loopback doesn’t always work properly This is a feature of network address translation (NAT) that allows devices on a local network to access services hosted on the same network using the public IP address of the router. Test from external network, try to connect to cloud.justtothepoint.com from outside your network (e.g., using a phone’s LTE data connection, not WiFi because some routers have buggy NAT loopback).
How to Speed Up Propagation Locally. Flush Local DNS Cache: sudo systemd-resolve --flush-cache
(Linux), sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
(macOS), and ipconfig /flushdns
(Windows).
Clear Browser DNS Cache & Restart your router.
# Linux
sudo nvim /etc/hosts, and add
dirPublicIPHome cloud.justtothepoint.com
# Windows
79.147.95.208 cloud.justtothepoint.com