Nextcloud on Ubuntu 24.04

This image runs Nextcloud on Ubuntu 24.04 with the web server, PHP and database already configured, so the server is ready for its admin account the moment it boots. Nextcloud lists 512 MB as its minimum, but with calendars, previews and a few users, 2~4 GB of RAM is the realistic size.

Image facts

Image
Nextcloud on Ubuntu 24.04
Type
App image (Ubuntu 24.04 with the app set up)
Architectures
x86-64 and Arm64 (all four families)
Price
Free on every plan
Login
root over SSH with your key, or a one-time root password
Locations
All 15

Sizes that suit it

PlanWhySizePer monthOrder from
P2One to three users with documents and calendars1 vCPU, 2 GB RAM, 40 GB NVMe$6.95$41.70 for 6 months
S4A family or small office in Europe, 40 GB2 vCPU, 4 GB RAM, 40 GB NVMe$4.25$51.00 for 12 months
S8Photo libraries up to about 60 GB4 vCPU, 8 GB RAM, 80 GB NVMe$6.35$76.20 for 12 months

What is installed on the Nextcloud image?

The image contains a current Nextcloud server release unpacked into the web root, a web server configured for it, PHP-FPM with the modules Nextcloud checks for (gd, intl, bcmath, gmp, imagick, zip, curl, xml, mbstring), a database for Nextcloud with its own user, and APCu as the local memory cache. Background jobs are set to run from the system cron instead of piggybacking on page loads, which is what the Nextcloud admin manual recommends.

All files live on the local NVMe disk of your plan: what you buy as disk is what you have as cloud storage, minus a few GB for the system.

How do I finish setup and log in for the first time?

Browse to http://your-server-ip/. Nextcloud shows its setup page where you create the admin account; the database connection is already prepared by the image, so it usually asks only for a username and password. Anything else the image generated for you is listed in the message of the day after you log in over SSH.

After the first login, go to Administration settings, Overview. That page runs Nextcloud's own security and setup checks and lists any warning in plain words, such as a missing domain or HTTPS. Work through it once and come back after every major upgrade.

Command-line administration uses occ, run as the web server user from the Nextcloud folder: sudo -u www-data php occ status prints the version and confirms maintenance mode is off.

How much RAM, CPU and disk does Nextcloud really need?

Nextcloud states a 512 MB minimum, and a single user who only syncs documents does get by on that. Real use asks for more: the web interface, thumbnail generation for photos, the calendar and contacts apps and several sync clients polling at once make 2 GB a comfortable floor for one to three people and 4 GB right for a family or small office.

CPU matters mostly when previews are generated, for example after you upload a phone's photo library. Two vCPU handle that in the background without the web interface going slow.

Disk is the real sizing question. Count what you want to store, add a third for growth, file versions and the trash bin, and pick the plan from that. S8 gives 4 vCPU, 8 GB RAM, 80 GB NVMe, S16 gives 8 vCPU, 16 GB RAM, 160 GB NVMe and S32 reaches 16 vCPU, 32 GB RAM, 320 GB NVMe. We do not sell attachable volumes, so a bigger library later means a bigger plan and a data move.

How do I add a domain, HTTPS and the right firewall rules?

Sync clients and phone apps expect HTTPS, so a domain is part of a working Nextcloud. Point an A record at the server and do three things:

  1. Add the name to trusted_domains with sudo -u www-data php occ config:system:set trusted_domains 1 --value=cloud.example.com.
  2. Get a certificate with Certbot and the plugin that matches the web server on the image.
  3. Set overwrite.cli.url to the HTTPS address so links in emails and shares are correct.

Open only 22, 80 and 443. The database listens locally and should stay that way. Nextcloud has brute-force protection built in; adding fail2ban on the web server log and two-factor authentication (the TOTP app is in the app store) for the admin account closes the remaining gap.

What is the right way to back up Nextcloud?

A consistent backup needs three parts taken together: the data directory, the database and the config/config.php file, which holds the instance secret and password salt. The manual sequence is:

sudo -u www-data php occ maintenance:mode --on\n# dump the database and copy the data and config folders\nsudo -u www-data php occ maintenance:mode --off

For large libraries, a deduplicating tool such as restic or borg pushing to another machine keeps nightly runs short, because unchanged files are not sent again.

The backup add-on is a simpler extra layer: seven daily copies of the whole disk for $1.27 a month on S8. Disk copies reach back only seven days, so a file deleted and missed for longer is gone from them; Nextcloud's own trash bin and file versions cover that case.

How do I upgrade Nextcloud safely?

Nextcloud is not upgraded with apt; it has its own updater. The admin page shows when a new release is available, and you can run it in the browser or, more reliably for large installs, from the shell with sudo -u www-data php updater/updater.phar followed by occ upgrade if it asks.

Major versions must be taken one at a time: going from 29 to 31 means 29 to 30, then 30 to 31. Check that your installed apps support the new major version before you start; the updater lists the ones it will disable.

PHP, the web server and the database come from Ubuntu and update with apt upgrade. Before a large Ubuntu update or a Nextcloud major upgrade, the daily disk copy from the backup add-on is your quick undo.

Which plan and city should I use for Nextcloud?

Choose by storage first and location second. People in Europe get the most disk for the money on the Shared vCPU plans in the seven European cities: S8 at $6.35 a month holds 80 GB of NVMe. Outside Europe, the Performance plans give twice the disk of a Shared plan with the same memory: 2 vCPU, 4 GB RAM, 80 GB NVMe on P4, in all 15 cities.

Watch the traffic allowance if several people sync large folders from America or Asia: P4 includes 1 TB outgoing a month there, and every extra TB costs $0.72. In Europe every plan includes 20 TB, which no file cloud for a family will use up.

Nextcloud on Ubuntu 24.04 questions

Is Nextcloud on 1 GB of RAM usable?

For one person syncing documents, yes. Photo previews, calendars and several clients need 2 GB or more, so P2 is the lowest plan we suggest.

Can I add more storage later?

Not to the same server: we do not sell volumes or in-place resizing. Order a plan with more disk and move the data folder and database across.

Does the image include Nextcloud Office or Talk?

They are not set up by default. Both can be installed from the Nextcloud app store; Office needs extra memory, so plan for 4 GB or more.

Why does Nextcloud say "access through untrusted domain"?

The name you used is not in trusted_domains. Add it with occ config:system:set trusted_domains as shown above.

How do phones and desktops connect?

Install the Nextcloud client, enter your HTTPS address and log in. Clients sync over port 443, so no extra firewall ports are needed.

Can I use Arm plans for Nextcloud?

Yes, the image boots on the Arm family too, with A8 giving 4 vCPU, 8 GB RAM, 80 GB NVMe in four European cities.

Start a Nextcloud server

Choose Nextcloud on Ubuntu 24.04 when you create the server, or rebuild an existing one with it.