Skip to main content

Installing NextCloud on CasaOS

The method used here uses 2 containers for setup. The first container is the official NextCloud Cocker container. The second container is the official MariaDB container, but, because of some issues with the :latest tag at the time of writing, we'reyou goingmay need to use the :10.5 tag.

You can download the .json files for this project over on Patreon.

Database Install

PleaseThe reviewfirst thesething .jsonwe filesneed before youto do anythingis withsetup thema sodatabase that you can see what they contain. Only usefor the filesNextCloud if you are comfortable with their contents.container.

ToFrom get started, you'll login to yourthe CasaOS dashboarddashboard, click the + App button and then look forclick the "+Custom App"Install buttonbutton.

on

On the rightnext sidepage, fill out the boxes with the following information:

  • Docker Image: yobasystems/alpine-mariadb:latest
  • App Name: NextCloud Database
  • Icon URL: Leave it as is or change it to an icon URL you want to use
  • Web UI: 3306
  • Network: bridge
  • Ports: 3306:3306
  • Volumes:
    • /home/databases/NextCloudDB:/var/lib/mysql
  • Environmental Variables:
    • MYSQL_ROOT_PASSWORD:password
    • MYSQL_DATABASE:nextcloud
    • MYSQL_USER:nextcloud
    • MYSQL_PASSWORD:password
  • Restart: Always

Everything else can be left as-is.

The location of the screen.

volume

Installing MariaDB

Click "+ App".

Click "Custom Install" at the bottom of the modal window that pops up.

In the new window, you're goingneeds to lookbe at the top right for the "X"changed to close the window. DON'T click that. Instead, click the square with the arrow in it that is to the left of the "X".

A window titled "Import" will pop up and there will be 2 tabs. The first is "Docker CLI" and the other is "App File".

Click "App File".

Upload the ncdb.json file. This is the database that you're going to use for your NextCloud setup.

Click "Submit".

Next, you should see a screen that says, "AutoFill only helps you to complete most of the configuration." Click the botton to move to the next step.

If you are already using port 3306 on your setup, you can change the "Host" port from 3306 to something else.

You can change the "Host" volume to move the storage to whereverwhere you want onto store your server.databases.

Be sure to change the MYSQL_ROOT_PASSWORDpassword and the MYSQL_PASSWORDfields to something othermore than password. The MYSQL_DATABASE and MYSQL_USER can stay as nextcloud if you want.secure.

At this point you can either change other settings as you need or clickClick the "Install"Install button at the bottom. 

Now you just need toand wait for the container to deploy.

NextCloud Install

NOTE:From Tothe installCasaOS ondashboard, aclick Raspberrythe Pi+ 4,App thisbutton processand then click the Custom Install button.

On the next page, fill out the boxes with the following information:

  • Docker Image: nextcloud:latest
  • App Name: NextCloud
  • Icon URL: Leave it as is theor same,change butit you'llto an icon URL you want to use
  • this
  • Web databaseUI: instead.8181
  • Network: bridge
  • Ports: 8181:80
  • Volumes:
    • /home/configs/NextCloud/WWW:/var/www/html
    • /home/configs/NextCloud/Apps:/var/www/html/custom_apps
    • /home/configs/NextCloud/Configs:/var/www/html/config
    • /home/configs/NextCloud/Data:/var/www/html/data
  • Environmental Variables:
    • MYSQL_DATABASE:nextcloud
    • MYSQL_USER:nextcloud
    • MYSQL_PASSWORD:password
    • MYSQL_HOST:192.168.1.130:3306
  • Restart: Always

Everything else can be left as-is.

Installing

The NextCloud

location of the volumes need to be changed to where you want to store your databases.

NowThe thatMYSQL_HOST IP address should be the IP Address of your CasaOS server where the database is installed,installed.

you

Be cansure moveto onto installingchange the NextCloudpassword app.fields to match your database setup

Click "+ App".

Click "Custom Install" at the bottomInstall of the modal window that pops up.

In the new window, you're going to look at the top right for the "X" to close the window. DON'T click that. Instead, click the square with the arrow in it that is to the left of the "X".

A window titled "Import" will pop up and there will be 2 tabs. The first is "Docker CLI" and the other is "App File".

Click "App File".

Upload the nextcloud.json file. This is the NextCloud application that you're going to use for your NextCloud setup.

Click "Submit".

Next, you should see a screen that says, "AutoFill only helps you to complete most of the configuration." Click the botton to move to the next step.

If you are already using port 8181 on your setup, you can change the "Host" port from 8181 to something else.

You can change the "Host" volume to move the storage to wherever you want on your server.

If you changed any of the following on your database, be sure to match those settings in the Environment Variables on this page:

  • MYSQL_ROOT_PASSWORD
  • MYSQL_PASSWORD
  • MYSQL_DATABASE
  • MYSQL_USER

Change the MYSQL_HOST value to the IP of your server and make sure to leave the port on there as 3306 (unless you changed it in the database setup) so that it should look something like: 192.168.1.108:3306

Click "Install"button and wait for the container to deploy.

Once the container has deployed, you can clickgo to http://192.168.1.130:8181 (of course change the "NextCloud"IP icon onand the dashboard and it should take youport to ayour NextCloudsetup).

screen

You'll thatbe asks youasked to create ana adminuser usernameaccount. andDo password.

Enter the credentials you want for the admin accountthat and then tickdecide or untick the box below based on whether or notif you want to install the recommended apps.apps by checking or unchecking the appropriate box. 

ClickThen click "Finish setup".Setup" and wait for the application to install.

If everything goes well, you will NOT see any errors. There will be a spinning circle in the middle of the screen for a few moments and then you'll be taken to the welcome screen for NextCloud.

If you get an error, be sure to read what it says and correct any errors that it tells you that it has encountered and then try the setup again.