Step 1. Installing OS and Snap 🛠️
- Install Ubuntu.
- Don’t forget to check Install OpenSSH server (to be able to copy commands).
- When it boots up, connect via SSH (PowerShell):
ssh user@IP-ADDRESS
Step 2. One Command Magic (Snap) 🫰
We use the Snap package manager. It will download Nextcloud, a pre-configured database, the Apache web server, and PHP all in one piece. This is the “bulletproof” way. Type in the console:
sudo snap install nextcloud(Wait a couple of minutes while it downloads and extracts the archive). When you see a checkmark or “installed”, the server is up.
Step 3. Initial Setup (Creating Admin) 👤
We need to create the main user directly from the console so we don’t struggle with the web interface at the initial stage.
Replace admin and password with your own (choose a stronger password!):
sudo nextcloud.manual-install admin passwordIf it says Nextcloud was successfully installed, you’re already the owner of your own cloud!
Step 4. Allow Access (Trusted Domains) 🔓
Nextcloud has (justifiably) paranoid security. By default it only allows access from the IP it’s running on. But we’ll be accessing it from a real computer.
We need to add the server’s IP to the “Trusted” list. Check your IP with ip addr (e.g., 10.0.1.50).
Enter the command to allow access from this IP:
sudo nextcloud.occ config:system:set trusted_domains 1 --value=10.0.1.50(Replace 10.0.1.50 with the real IP of your VirtualBox VM!)
Step 5. Logging into the Cloud ☁️
- Open a browser on your real PC.
- Enter the address:
http://10.0.1.50(or whatever IP the VM has). - Enter login
adminand your password. You should see a beautiful interface with files, folders, and a welcome message.
Step 6. Enable Encryption (In One Line) 🔒
Since we used Snap, this is straightforward. We’ll create a “Self-signed Certificate”. The browser will grumble that it “doesn’t know the issuer”, but traffic will be encrypted and intercepting the password will be impossible.
- Connect via SSH to the Nextcloud server.
- Enter the command:
sudo nextcloud.enable-https self-signedStep 7. Verification ✅
- Now in the browser enter the address with
https://at the start:https://10.0.1.50(your IP). - The browser will show a scary window: “Your connection is not private”.
- This is normal! We issued the certificate ourselves, not bought it.
- Click Advanced → Proceed to… (unsafe). If you see the Nextcloud interface — congratulations, encryption is enabled!