Adding smbclient connection data via cli during setup

Good morning,

I am a fairly new Nextcloud user. My current setup is the latest version of Nextcloud installed as a docker using docker-compose into a virtual Ubuntu 20.04 server. Everything works great at this time using google and forums to guide me through the process. However, I am a tinkerer… I am scripting this as an automated install from an intranet web server, so if something happens to my Nextcloud appliance and/or a backup, I can quickly spin up a new instance. To make this task simple, all data is being stored on a separate bare metal machine running openmedia server using the smbclient to connect. I have already scripted the addition of the smbclient into my docker-compose build scheme; now I would like to automate the addition of my 6 smbclient connections. I understand that If possible I more than likely couldn’t add the password, but this is easily corrected by going in and modifying each one to a global username/password via gui once finished.
So the question is; once Nextcloud is installed, is there anyway to add the smbclient connection data via the cli using the occ or similar command?

Thanks in advance,
Mike

Hi @Michael_Schwartz, yes this is possible via occ.
Here is an example how to do this for local external storage: vm/smbserver.sh at 072244f77d7b7a76bfa0f14753661bd96731491a · nextcloud/vm · GitHub
Hope it gives you some inspiration :slight_smile: