Nextcloud - Getting Started Guide
Nextcloud is a self-hosted platform for file storage, sharing and collaboration - a private alternative to Google Drive and Dropbox that you fully control. This server comes with Nextcloud fully installed and configured with the admin password you specified during the order. All you need to do is point your domain to the server's IP address, and your private cloud is ready to use.
Step 1 - Verify Nextcloud Works
Your server's IP address and root password are shown on the Server Details page in your client panel. Nextcloud is already accessible by IP address - open http://your.server.ip in a browser to verify it works. You should see the Nextcloud login page.
Nextcloud admin login:
- Username:
admin - Password: the Admin Password you entered during the order
The admin panel is available at http://your.server.ip/settings/admin.
Note: Nextcloud login works by username only, not by email. Even if you add an email to your profile later, use admin as the login.
If you placed the server behind a VyOS router on a private network, either configure port forwarding (ports 22, 80 and 443) to make Nextcloud accessible from the internet, or connect over a VPN and reach the server on its private IP.
Step 2 - Point Your Domain to the Server
Go to your domain registrar's DNS settings and create A records pointing to your server's IP address:
| Type | Name | Value |
|---|---|---|
| A | @ | your.server.ip |
| A | www | your.server.ip |
DNS changes usually take a few minutes, but can take up to 24 hours. You can check the status at dnschecker.org.
Step 3 - Access Nextcloud
Once DNS has propagated, your Nextcloud is live:
- Nextcloud:
http://yourdomain.com - Admin panel:
http://yourdomain.com/settings/admin
Log in with username admin and the Admin Password from Step 1.
Step 4 - Enable SSL (Recommended)
Your site works over HTTP by default. To enable HTTPS with a free Let's Encrypt certificate, connect via SSH and run:
ssh root@your.server.ip
/opt/setup/get-ssl.sh
The script will verify DNS, obtain a Let's Encrypt certificate and switch Nextcloud to HTTPS automatically. It will also update the trusted domain setting in Nextcloud. Automatic renewal is already configured.
After completion, your Nextcloud is available at https://yourdomain.com.
Step 5 - Connect Fiberax S3 Storage (Optional)
You can connect your Fiberax S3 storage to Nextcloud as an external folder. This lets you and your users store files directly in S3 - ideal for backups, media, or large datasets.
Prerequisites:
- An active Fiberax S3 Storage service (order from your client panel if you don't have one)
- A bucket created in the S3 panel
- Your S3 credentials (endpoint, Access Key, Secret Key) - find them under S3 Credentials in your S3 service
5.1 Enable the External Storage app
Log in to Nextcloud as admin. Go to the top-right user menu > Apps. Find "External storage support" and click Enable.
5.2 Add your S3 bucket
Go to Settings > Administration > External storages. Click "Add storage" and select "S3 Storage".
Fill in the following fields:
| Field | Value |
|---|---|
| Folder name | Any name (e.g. "S3Storage") |
| External storage | S3 Storage |
| Authentication | Access key |
| Bucket | Your bucket name from the S3 panel |
| Hostname | Your S3 endpoint (e.g. s3.w1.fiberax.com) |
| Port | Leave empty (defaults to 443) |
| Region | Leave empty |
| Storage Class | Leave empty |
| Enable SSL | ✓ Checked |
| Enable Path Style | ✓ Checked |
| Enable multipart copy | ✓ Checked |
| Access Key | Your Access Key from S3 Credentials |
| Secret Key | Your Secret Key from S3 Credentials |
| Available for | All users, or select specific users/groups |
Important: Enable Path Style must be checked for Fiberax S3. Without it, Nextcloud will fail to connect. Leave Port, Region and Storage Class empty.
5.3 Verify the connection
After saving, a green circle appears next to the mount if the connection is successful. Your users will see the S3 folder in their Files app.
Tip: You can also use S3 Service Accounts instead of your main Access Key. Create a service account in the S3 panel with read-only or read-write access to a specific bucket - this is more secure for shared environments.
Step 6 - Use an External Database (Optional)
By default, Nextcloud uses a local MariaDB database on the same server. This works well for most use cases. However, if you need to scale - for example, when the number of users or files grows significantly - you can move the database to a separate server.
Benefits of an external database:
- Database gets dedicated CPU and RAM - Nextcloud stays responsive under heavy load
- Independent scaling - upgrade the database server or Nextcloud server separately
- Separate backups - easier to restore database and application independently
6.1 Prepare the external database
On your external database server (a separate server or Managed MySQL service), create a database and user for Nextcloud:
CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER 'nextcloud'@'%' IDENTIFIED BY 'your_strong_password';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'%';
FLUSH PRIVILEGES;
6.2 Export data from local database
SSH into your Nextcloud server and export the current database:
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
source /root/.nc_credentials
mysqldump -u nextcloud -p"$nc_mysql_pass" nextcloud > /tmp/nextcloud-db.sql
6.3 Import data to external database
mysql -h db.server.ip -u nextcloud -p nextcloud < /tmp/nextcloud-db.sql
6.4 Update Nextcloud configuration
Edit /var/www/nextcloud/config/config.php and change the database settings:
'dbtype' => 'mysql',
'dbhost' => 'db.server.ip',
'dbname' => 'nextcloud',
'dbuser' => 'nextcloud',
'dbpassword' => 'your_strong_password',
Replace db.server.ip with the IP address of your database server. If both servers are in the same virtual data center, use the private IP for better performance and security.
6.5 Verify and disable local database
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
sudo -u www-data php /var/www/nextcloud/occ status
If Nextcloud shows installed: true and works in the browser, the migration is successful. You can then stop the local MariaDB to free up resources:
systemctl stop mariadb
systemctl disable mariadb
Important: Keep the /tmp/nextcloud-db.sql backup until you confirm everything works. Make sure the external database server allows connections from your Nextcloud server's IP address.
Post-Installation
SSL Certificate Renewal
Let's Encrypt certificates are valid for 90 days. Automatic renewal is configured. You can test it with:
certbot renew --dry-run
Fail2Ban - Brute-Force Protection
Your server comes with Fail2Ban pre-configured to protect both SSH and Nextcloud from brute-force attacks.
| Rule | Max Attempts | Ban Duration |
|---|---|---|
| SSH | 5 failed logins | 10 minutes |
| Nextcloud | 5 failed logins | 1 hour |
Useful commands:
# Check banned IPs
fail2ban-client status nextcloud
fail2ban-client status sshd
# Unban an IP
fail2ban-client set nextcloud unbanip 1.2.3.4
If you accidentally lock yourself out, connect via VNC console in your client panel and unban your IP.
Service Management
Nextcloud stack runs via systemd. Common commands:
# Check service status
systemctl status apache2
systemctl status mariadb
systemctl status redis
systemctl status php8.3-fpm
# Restart services
systemctl restart apache2
systemctl restart php8.3-fpm
Updating Nextcloud
When a new version is available, you'll see a notification in the admin panel. You can update through the web interface (Settings > Administration > Overview) or via SSH:
sudo -u www-data php /var/www/nextcloud/updater/updater.phar
sudo -u www-data php /var/www/nextcloud/occ upgrade
Desktop and Mobile Clients
Nextcloud offers sync clients for all platforms:
- Desktop: Windows, macOS, Linux - download at nextcloud.com/install
- Mobile: Android (Google Play / F-Droid), iOS (App Store)
When setting up the client, enter your Nextcloud URL (e.g. https://yourdomain.com) and log in with your credentials.
Adding Users
Go to Settings > Users to create accounts for your team. Each user gets their own storage space, calendar, contacts and can access shared folders including S3 storage.
Useful Apps
Extend Nextcloud from the built-in App Store (Apps in the top-right menu):
| App | What it does |
|---|---|
| Nextcloud Office | Edit documents, spreadsheets and presentations in browser |
| Talk | Audio/video calls and chat |
| Calendar (pre-installed) | Shared calendars with CalDAV sync |
| Contacts (pre-installed) | Address book with CardDAV sync |
| Deck | Kanban-style project boards |
| Notes | Markdown note-taking |
What's Pre-Configured
- Caching: APCu (local) + Redis (distributed and file locking) via Unix socket
- Background jobs: System cron every 5 minutes (recommended by Nextcloud)
- File uploads: Up to 16 GB per file
- PHP memory: 512 MB
- Apps: Calendar and Contacts are pre-installed
Server Credentials
MariaDB credentials are stored in /root/.nc_credentials. Nextcloud is pre-configured to use them.
Software Included
| Component | Version |
|---|---|
| Ubuntu | 24.04 LTS |
| Apache | 2.4 |
| MariaDB | 10.11 |
| PHP (FPM) | 8.3 |
| Redis | 7.0 |
| Nextcloud | Latest |
| Certbot | Latest |
| Fail2Ban | 1.0 |
Troubleshooting
| Problem | Solution |
|---|---|
| Nextcloud doesn't open in browser | Check that your domain's A record points to the server IP. Use dnschecker.org to verify |
| SSL script fails | DNS probably hasn't propagated yet. Wait 10-15 minutes and run /opt/setup/get-ssl.sh again |
| "Access through untrusted domain" | Your domain is not in the trusted list. SSH in and run:sudo -u www-data php /var/www/nextcloud/occ config:system:set trusted_domains 1 --value=yourdomain.com |
| S3 storage shows red/yellow indicator | Check that Enable Path Style is checked. Verify endpoint, bucket name and credentials in your S3 panel |
| Forgot admin password | SSH in and run:sudo -u www-data php /var/www/nextcloud/occ user:resetpassword admin |
| Slow performance | Redis caching is pre-configured. Check that it's running: systemctl status redis |
| Can't upload large files | PHP limits are pre-configured to 16 GB. If you need to adjust, edit /etc/php/8.3/fpm/conf.d/99-nextcloud.ini and restart PHP-FPM: systemctl restart php8.3-fpm |
| Blocked by Fail2Ban | Use VNC console in your client panel to unban your IP |
| Forgot root password | Use VNC console in your client panel to reset it |