How do I use the web installer to install to my local machine?

Okay I know this sounds like a weird question but here’s the deal. Last month I bought a new Windows laptop and decided to turn my old desktop into a fulltime Linux personal cloud webserver.

I installed NextCloud and it was extremely easy, it took me like 5 minutes, and I was able to do it without having a domain name etc. I could create a public link and then access the linked file from my phone while it had wifi turned off, just using mobile data.

I decided to try some other desktop environments and wound up screwing up my installation. So I swept the slate clean with a fresh install of Kubuntu 18.04. I then switched it back over to Gnome after decided that I liked it better.

Then I decided I wanted to reinstall NextWeb. But… I can’t find find the original tutorial I used.

I’m not entirely sure how I installed it… but I vaguely remember it being the webinstaller, because I remember thinking how running a php file to install it was kind of genius in it’s simplicity and it reminded me of when I have to use manually uploaded php files to clone over wordpress databases on my portfolio website.

This is locally hosted, on a physical machine in my apartment. I… don’t know a whole bunch about development, I’m a designer learning development, but I can’t run the php file from my browser. I’m pretty sure that I have to run it off a sever but the only way I’ve done that in the past is on Windows using Wordpress specific virtual machine containerized versions of MAMP.

So I’m really confused on what I did. It was so easy!

I thought… maybe it was an appimage or a snap? But I can’t find any tutorials on how to install from an appimage, and when I tried installing from the snap it’s nothing like I remember my installation process before. For one, wherever the snap installs NextCloud, the actual physical files were inside a folder at $Home called “NextCloud” and installing with snap does not do that.

Every other tutorial I find also talks about requiring a domain name etc, and I don’t remember that at all.

Yes, I will get a domain name and https etc etc. But for right now I’m just trying to get it running on my lcoal network off my local machine and I can’t figure out how I did it previously. I’ve googled high and low, and I’ve checked multiple browser histories but I can’t find the original tutorial, and nothing in the official installation documentation looks familiar.

I could also try to do a normal manual installation from the deb package but the only one I can see instructions for online is the 16.04 version.

Here is how I did it in my CentOS 6.9 server, which is a guest on a Win-10 host. I am using VirtualBox.

  1. download nextcloud server (
  2. copy that file (eg: to /var/www/html/ and unzip.
    chmod -R 755 nextcloud && chown -R apache nextcloud (nextcloud is the folder created after I unzipped)
  3. create database and user for next cloud:

create user nextcloud@localhost identified by ‘your!#123password!’;
grant all privileges on nextcloud.* to nextcloud@localhost;
flush privileges;
4. Go to http://localhost/nextcloud/
5. set up admin name, password and select the database name, password, etc on that installation page
6. you are good to go!

This set up process couldn’t have been easier. As you yourself said, “extremely easy”… so what precisely is not working?

Hi t420s, I’m actually talking about the webinstaller, not the archive installation. The archive installation might also be very easy to use, so I’m going to try and do what you’ve written out here with it, but it’s a bit different of a process from what I remember doing. I’ll see what I can do though.

Okay so I copied stuff over etc and ran the first command you listed but I got an error code saying invalid user: ‘apache’

Not sure what that means. Other than apache isn’t a user I guess? Doesn’t Ubuntu come with apache installed?

I try apache -h and I get a message asking if I meant apache2. Should I run the command but with apache2 instead?

the user name is not apache. the user name is www-data on ubuntu.

Excellent, thank you Reiner_Nippes!

The next step of the guide is CREATE DATABASE nextcloud DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; create user nextcloud@localhost identified by ‘your!#123password!’;

Which if I’m guessing correctly is meant to be psuedo code? Because when I run it I get an error saying “create is not a valid command” from terminal.

this is sql. understood by mysql. not by the bash. (your normal command line.)

try mysql -u root

Sorry was away taking a call.

I entered the command and got this in return.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Okay bingo. Issue was that mysql wasn’t installed. Got that installed. I’m now inside mysql. I’ll run the sql commands

Okay so I enter go into mysql and I use the CREATE DATABASE command and that seems fine. I think I can confirm it works because if I try running it again, the terminal response is that I can’t create a database called nextcloud because one already exists.

Then I try the create user command. At first I misunderstood and I just copy and pasted the command straight, but the terminal said that there was a syntax problem with ‘your’. That made me realize that the ‘yourpassword etc etc’ was meant as a variable for me to put my personal password in. I’m suposed to be creating a new user with a password, I guess?

So I guess it the same password as my root/user account. And ran it, but it said I needed to check MySQL version to see what the syntax is. I looked that up and found a stack overflow that suggested putting quotes or parentheses around the exclamation point. I don’t know why that is but I’m guessing that mysql has to escape character exclamation points? Anyway, I tried both of those, and they ran fine but said “0 queries effected”

I then ran the next command to grant privielges, and then I ran the command for flush privileges. Each time they ran fine but they also said “0 queries effected”.

And then I clicked localhost/nextcloud and it did not work. yeah. so not sure what’s going on.

I could also try the ansible build that Reiner_Nippes sent me but I’m going to see if I can figure out a normal standard installation first just because I feel like I should know how this works. I’m going to take another shot at this TechReport tutorial I found.

oof… but yeah if anybody knows any other things I should troubleshoot too, please let me know.

This is way more difficult than I remember. How on earth did I install it last time???

Sorry, I was not clear about the commands.
R.N., thanks for lending a hand!

You are in right track, just a few steps away.

My advice to you is to get comfortable with basics of running a db server in linux (your preferred distribution, mine is CentOS, your seems to be Ubuntu? But that should not be a problem!).

At the minimum, you need to be comfortable to (re)start and stop a service (the service name of mysql daemon in CentOS is mysqld, google for its equivalent name in your distribution), (re)set password for the root user, create a database, create tables in that database, create a new non-root user, assign privileges to that new user (means, how to allow read/write access for that user to that database).

For our purpose here, the nextcloud installation will create the necessary tables for you, you just need to create a database and a user who can use that database.

Please learn the above tasks in small steps. There are many tutorials on the web on how to create mysql database server.

Also learn how to verify.
For example, if you ran a script to create database, tables, user(s), first verify that they have been created.

When you are done with these stuff, the rest is just a few clicks away.


Hahaha Ganbatte :slight_smile:

I think I might have it set up. I followed this guide here:

I also set up my DNS with a subdomain pointed to my machines IP4 which I think is what I’m supposed to do.

I haven’t been able to see the login and admin installation start up page etc in the browser yet but that could just be a delay in my DNS. It says on their website that it can take up to 30 minutes to refresh.

I also got some weird results when I ran this series of commands:
sudo a2ensite nextcloud.conf
sudo a2enmod rewrite
sudo a2enmod headers
sudo a2enmod env
sudo a2enmod dir
sudo a2enmod mime

So I’m not entirely sure if it actually ended up writing correctly or not. It kept telling me I needed to restart my apache2 server but when I ran the command for that the terminal would hang for a good bit

I’ve made a fresh thread here because I have figured out how to launch the php setup file locally and I think that this might work. I’ve got a localhost apache server running. How can I run the setup-nextcloud.php from it?