Project: Nextcloud

I’ve installed nextcloud before, but I’ve had to use duckdns.org to get a subdomain.
But now I’ve got the domain, and this is how I’ve set it up!

First, you’ll need to create a share for your cloud.
I’ve named it Nextcloud, since I’m using Nextcloud.
I’ve also enabled cache on it.

Then you need to install MariaDB, and create a MYSQL password.

Normally you’d use to console directly into the container, but that has never worked for me, so I’m using PuTTY to do it.
Then I’ve typed
docker exec -it mariadb bash
to bash into it.

From here, I’ve typed:
mysql -uroot -p
Then it will ask for the MYSQL password you created.
Mine is messed up, since I made it with a password generator.
When you’ve typed in the password, it will welcome you to MariaDB.

Now you need to create a user.
Type:
CREATE USER 'username' IDENTIFIED by 'password';
Replace username and password with the user you want.
I’ve named mine nextcloud.
It should say “Query OK” at the beginning of the sentence after the command.

Then you’ll need a database.
Type
CREATE DATABASE IF NOT EXISTS databasename;
I’ve chosen “nextcloud” as my database name.
It should say “Query OK” at the beginning of the sentence after the command.

Now you need to grant privileges on your database, to your user.
Type
GRANT ALL PRIVILEGES ON databasename.* TO 'username' IDENTIFIED BY 'password';
To me, that’ll be
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud' IDENTIFIED BY 'password';
And I’m not showing the password.
It should say “Query OK” at the beginning of the sentence after the command.

That’s what you need to do in the console.

Then you’ll need to install nextcloud. I’ve used the one from “linuxserver“.
Then I’ve changed the port from “443” to “444” in the container.

At the login screen, you’ll be asked to create an admin account.
Fill in the information.
Now click on “Storage and database”.
Select “MySQL/MariaDB” and fill out the information for your database user, database password (password for the database user), the database name, and where’s it’s located.
It could be 10.10.20.100:3306 if the Maria DB is hosted on the IP 10.10.20.100 with the port of 3306.
I’ve unchecked “Install recommended apps” because I want to add the things myself that I want.

That’s pretty much it. I will get around to part 2 regarding the domain setup for the next one, since they sort of linked to each other, at least in my setup.

Author Nanobug
Published
Categories nanonet Projects
Views 55

Comments

No Comments

Leave a Reply

Blog & news subscription

Loading