Where to store your data Newbie here please help

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): replace me
Operating system and version (eg, Ubuntu 20.04): replace me
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): replace me

The issue you are facing: data is on /var/www/oh80s, and I want it to be on my raid configuration.
can i mount my raid that is at /dev/md/0 to /var/www/oh80s so my data can be stored on that raid or will this mess things up?
I know i have to copy everything from the var path to the dev and change the ownership of the folder. what I want to do is have my data on my raid not on my small hard drive. I have not logged into my nextcloud to make a user yet. I see there is a data path there but dont want to change anything because everything points to /var/www/oh80s right now.

Is this the first time you’ve seen this error? (Y/N):

Steps to replicate it:

  1. data currently at /var/www/oh80s
  2. I want my data to be at on my raid which is at /dev/md/0

The output of your Nextcloud log in Admin > Logging: have NOT Logged in yet!! Too Scared!


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'ocntykp6d7ux',

``` i dont think it has been populated as i have not logged in to nextcloud web browser yet. 

The output of your Apache/nginx/system log in `/var/log/____`:

PASTE HERE I didnt have a /var/log for ngix that i could find


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE No errors I want to move where the data where all my files will be kept on. Im only using this as a file cloud server.

Before you deploy Nextcloud, you need to get your operating system, storage partitions, and automatic mounting all functioning. The specifics vary a bit by OS distribution.

What are you running this on?

im running on Ubuntu latest version.

Which data do you want on the RAID device?
During initial setup you can set the data directory location - recommendation is not in the NC www directory but somewhere else.
Database location depends on your DB config - I’m not aware of any nice ways of changing that with MariaDB (and haven’t tried with the others)
Nextcloud www is wherever you extract the files to.

This is all stuff to decide and prepare before you install the DB and Nextcloud, and should be possible to set up at filesystem level. For what it’s worth I install under /srv/nextcloud/www and /srv/nextcloud/data as I don’t like to run “server” processes under /var and it also lets me use btrfs snapshots for extremely quick backups.

How have you got the raid device configured? I wouldn’t expect it store files directly at /dev/md/0 but then I don’t use software raid so it’s not something I’ve played with.
A common dirty hack is to use symlinks under /var/www to point at where the data really is, but test it before doing it on a real system!

I would like all my files i store (mostly video projects) to be on the raid. im really new to all this so alot i shouldnt even be doing but this was supposed to be cheep and ez. lol but all i want to do is use nextcloud as a file server so i can have an app to use as a portal for the files sharing. I installed everything on to a ssd drive of 250g. I created a raid its under dev/md/0p1 formated ext4 and was going to mount it at /mnt/raid/nextcloud. I have Not logged into nextcloud to create the first account because i wanted to make sure the files i store were going to be on the raid instead of the ssd 250g drive. im sure there are a few files i could print out for you that would explain all this im just not sure which ones. My problem is its been so long since i messed w/this stuff im getting mixed up mounting and config files. i went through on the install and did set up a config file for my apache server

Add Apache virtual host for Nextcloud
sudo nano /etc/apache2/sites-available/oh80s
<VirtualHost *:80>
DocumentRoot /var/www/oh80s
ServerName oh80server
<Directory “/var/www/oh80s/”>
Options MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all

TransferLog /var/log/apache2/oh80s_access.log
ErrorLog /var/log/apache2/oh80s_error.log

i think i should of set this up but made the path where i mounted the raid at /mnt/raid/nextcould. but im not sure if this would mess up anything in the database server or nextcloud. When I go to the servers ip in a browser i get the create admin account and there is a place for storage & data that has /var/www/oh80s/data but i havent done anything to this point. I was thinking i may have reinstall the db server again and change this file to the mount point /mnt/raid/nextcloud (and yes there is a dir those folders.)

Im probably making this way harder than i should sorry.
Thanks for any help, i see theres not a lot ppl wanting to help over the dumb things.

Your datadirectory is where your files will be stored. It will be the bulk of your consumed disk space. Sounds like you’ve gotten your raid drive mounted in the OS. So you should be able to just tell Nextcloud to use the RAID mount point /mnt/raid/nextcloud as it’s datadirectory.

If you do that (which will be simplest probably), the NC application code itself will remain in your documentroot (/var/www/oh80s). If you would prefer to install NC itself (i.e. in addition to its data) onto your RAID mount point, than I’d instead suggest using /mnt/raid/nextcloudas your documentroot (and installing NC itself there). Then using a folder under there `(/mnt/raid/nextcloud/data) as your datadirectory.

Your database on the other handed will be far smaller. If you must have it located on your raid partition too that’ll require some extra work. NC won’t be involved in that part (NC just talks to the db and the db handles it’s own storage). The specifics will depend on what database you’re going with.