Access to nextcloud database

NethServer Version: 8
Module: Nextcloud, Webserver

I installed Nextcloud via Software-Center, and now I would like to access the nextcloud’s database.

Furthermore, I would like to now how to upload files into my Webserver (installed via Software-Center). I have already installed SFTPGo and successfully added a virtual host. The idea is to access from nextcloud to a site hosted on my Webserver via the Nextcloud-App “External Sites”.

In this external-sites I would like to implement links which refer to a collabora-office-document and that is why I need to access the nextcloud database.

Thanks in advance for any recommendations.

Hello DOminic and Welcome to NEthserver Community FOrums, we are happy to have you onbaord.

I would like to know, is it your first time making use of Nextcloud for Document MAnageemnt.

From your description, it seems you have a Web Application/PAge as well as nextcloud.

you would like to Implement the website as an external site for your nextcloud instance

this Extermal Sie, refers to your collabora files, hosted within NExtcloud, is this the case, or did i miss something.

I am happy to report that you have no need to access the nextcloud backend database. Collabora is available within NEthserver that can be added into your nextcloud instance to manage and open your files

Unless you have other needs, then you might be required to Add PhPMyadmin or the lighter version Adminer into your nextcloud instance, with the credentials for your nextcloud credentials.

Hello Martin.

Thank you for your answer.

No it is not my first time. I have already used it before inside my Ubuntu Client.

How do I add phpmyadmin to my nextcloud instance?
And how would you link to collabora files inside a external site?

this statement i do not clearly understand

Nevermind. How do I add phpmyadmin to my nextcloud instance?

USing this Example NS8-Generic Containers-: Install Uptime-kuma - App - NethServer Community

Read through this, it might provide some Idea I cant fully document the entire process where i am at the moment

It seems (and I am interested too) how access containers easily directly to ‘do stuff’. There should be a module for that, “Just say’n”

What do you mean a module to access containers and do stuff

Well, if there was a module that provides access to individual containers:

  1. Select which continer from dropdown of all containers
  2. Drop in the container with a webconsole alike
  3. Do what you need to do

So e.g. an example to replace this manual command:

podman exec -ti postgres psql -U odoo

But more convenient for the admin/user to access containers


Ag now i understand, Makes sense, COuld also be administrative limited from the web console based on the loggedin user and what Apps they are allowed to manage.

So good for both security, as well as imporving eae of use and manageemnt, Which is the focus of NS8

1 Like

Going off topic here…
For some reason the idea reminded me about cntr… not that it matters for this case as not easy for the sysadmin and no web-console…

1 Like

Don’t we all :wink:

Access your Webserver AppVirtual hosts.
Open SFTGo WebClient link (user and password shown on the information symbol, next to the link).

User’s password can be changed from the user icon on the top right of SFTGo WebClient:

For instance, with an index.html file dropped in to the root of the virtual host:

Otherwise add the full URL of the desired page.
Might not work without a valid certificate.


why do you need phpmyadmin, a cli access to database is not enough ?

Thank you so much, that solved the second part of my issue.

Would have been enough, but phpmyadmin is more convenient and I didn’t know how to access via CLI either. So if someone is wondering how to do this here is my solution:

First, access to the nextcloud db container via:

runagent -m nextcloud1 podman exec -ti nextcloud-db /bin/sh

then continue with following commands to view nextcloud database (default password is “nextcloud”):

su -
mysql -u nextcloud -p nextcloud
select * from oc_filecache;

These commands allowed me to access to a table inside the nextcloud database which contains all filenames and indices.

Thank you all for your support.


Try directly

runagent -m nextcloud1 podman exec -ti nextcloud-db mysql -u nextcloud -pnextcloud


Worked out fine! Thanks! Even faster than my method.

If you want to start a phpmyadmin container one way could be possible but we need manual steps

  • Open a new port in the nextcloud pod (systemd template to avoid to be overwritten by an update)
  • Make a virtualhost or path route to this port manually
  • Start a phpmyadmin container inside the pod
  • Write a systemd service if you want the phpmyadmin container permanent or start and stop manually the container

Thanks for the advice.

For now I am fine with CLI, as I won’t access too often. But your idea could help others who would like to give it a try or have a personal need.

1 Like