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 (https://nextcloud.com/install/#instructions-server)
  2. copy that file (eg: nextcloud-13.0.5.zip) 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 DATABASE nextcloud DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
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.

Gambatte!

Hahaha Ganbatte :slight_smile:

I think I might have it set up. I followed this guide here: https://websiteforstudents.com/install-nextcloud-on-ubuntu-17-04-17-10-with-apache2-mariadb-and-php

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?