Technical Anshu
Tutorials Blog
Nextcloud Install

Install Nextcloud on Ubuntu in One Step Complete Guide

One command installs the whole stack - web server, database, PHP and Nextcloud itself. This guide takes that easy start and finishes it properly, so your private cloud is safe and usable from day one.

By Technical AnshuUbuntu ServerSelf HostedFull setup
Watch the full video - the one-step Nextcloud install on Ubuntu, step by step

Most Nextcloud guides begin with a long shopping list: install Apache, install MariaDB, tune PHP, create a database, set permissions - and one wrong step anywhere breaks the whole thing. The video above uses the other road: the official Nextcloud snap package, where a single command installs everything together. The honest line, before we start: one step installs it, but a handful of short steps make it truly yours - an admin account created safely, your address registered, and HTTPS switched on. This page covers the install and those finishing steps, in order.

Terminal - the whole install is one command
$ sudo apt update $ sudo snap install nextcloud
Apache web serverInside the package
MySQL databaseInside the package
PHP runtimeInside the package
Future updatesAutomatic by default
Example install flow - the snap carries the full stack, so there is nothing else to install first (version details vary)
1

What the One Step Actually Installs

A snap is a complete app bundle. The Nextcloud snap packs Nextcloud itself plus the Apache web server, a MySQL database and the PHP runtime it needs, all pre-configured to work together. It is maintained by the Nextcloud snap team, and Nextcloud's own admin manual describes the idea as install and forget - the package also updates itself to new stable releases automatically.

The trade is choice. The snap is deliberately opinionated: Apache and MySQL are fixed, file locations are fixed, and deep custom tuning is limited compared to a hand-built server. For a home or small-office cloud, that trade is almost always worth it - you give up knobs you would never touch and gain an install that works in minutes.

2

Step 1 - Run the One Command

On a fresh Ubuntu server or desktop, update the package list first, then install:

  1. sudo apt update
  2. sudo snap install nextcloud
  3. Wait for the download and setup to finish - the snap starts its services by itself
  4. Check the result with snap changes nextcloud, then open the server address in a browser: http://YOUR-SERVER-IP

If the Nextcloud page loads, the stack is alive. Do not create the admin account in a hurry from the browser yet - the next step shows the safer order.

3

Step 2 - Create the Admin Account the Safe Way

On first visit, the web page offers to create the admin account. That works, but until somebody does it, anyone who can reach the page first could claim it. On your own home network the risk is small; on any shared network, create the account from the terminal instead:

  1. sudo nextcloud.manual-install admin YourStrongPassword - replace both words with your own admin name and a long password
  2. Now open the server address and log in with that account

Either way, this admin account is the master key of your cloud. Use a password you do not reuse anywhere else, and keep it in a password manager.

4

Step 3 - Register Your Address as a Trusted Domain

Nextcloud only answers requests that arrive through addresses it trusts. Open it through a new IP or domain name and it shows an Access through untrusted domain page instead of the login. Fix it once, from the terminal:

  1. See the current list: sudo nextcloud.occ config:system:get trusted_domains
  2. Add your server IP: sudo nextcloud.occ config:system:set trusted_domains 1 --value=192.168.1.50 (use your real IP)
  3. Add your domain name, if you have one, at the next index: sudo nextcloud.occ config:system:set trusted_domains 2 --value=cloud.example.com

Notice the tool: on the snap, every Nextcloud command-line job runs through sudo nextcloud.occ. You will meet it again in the warnings and backup guides of this series.

5

Step 4 - Turn On HTTPS

A login page over plain HTTP sends passwords across the network readable to anyone in between. If your server has a domain name pointing at it, the snap can fetch and install a free Let's Encrypt certificate by itself:

  1. sudo nextcloud.enable-https lets-encrypt
  2. Answer the email and domain questions - the snap does the rest and restarts on HTTPS

No domain yet? The snap also offers sudo nextcloud.enable-https self-signed, which encrypts the connection but shows a browser warning because the certificate proves nothing about who you are. For use inside your own home that is acceptable for a start; for access from outside, get the real certificate - the outside-access guide in this series covers the full safe setup.

6

Step 5 - Prove It Works, Then Stop and Plan Week One

Finish the install day with a real proof, not just a login screen:

  1. Upload one photo and one document from the browser
  2. Install the free Nextcloud app on your phone and log in - upload one photo from there too
  3. Download both files back and open them

That round trip proves storage, database and sync are all healthy. What the one step has not done: your files still sit on the system disk, there is no backup yet, updates will arrive on the snap's schedule, and the admin settings still show warnings. Each of those has its own short guide in this series - do them in the first week, before real files move in.

🔴 The one red line: never leave a fresh install reachable from the internet with only a password between strangers and your files. HTTPS, a strong admin password and two-factor authentication come before outside access, not after.

Watch the One-Step Install in the Video

The full install, live on screen - the command, the first login and the setup screens, exactly as they appear.

Watch Full Video
Frequently Asked Questions

Is the snap version the full Nextcloud?

Yes. It is the same Nextcloud server software everyone else installs - the snap simply packages it together with Apache, MySQL and PHP, pre-configures them, and manages updates for you. What you give up is deep customisation, not features your family or small team will miss.

How long does the one-step install take?

On a normal internet connection the download and install usually finish in a few minutes. Creating the admin account, registering your address and enabling HTTPS adds perhaps ten more minutes - most of it typing, not waiting.

Can I move from the snap to a manual install later?

Yes, but treat it as a migration, not a switch: the snap ships export and import commands that back up the whole instance - data, database and settings - so you can restore it onto a differently-built server. Most home and small-office users never need to; the snap keeps maintaining itself.

This guide is based on the Technical Anshu Nextcloud install video - stuck on a step? Ask in the video comments and you will get a reply.