nextcloud / nextcloud/server

Pass passwords to `occ maintenance:install` via files/stdin/env variables

Open
#6,185 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: install and update
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Hej

I use this command to finish my installation:

sudo -u www-data php occ maintenance:install --database "mysql" --database-name "nextcloud"  --database-user "root" --database-pass "password" --admin-user "admin" --admin-pass "password"

This is working perfectly fine. :-)

But as I want to script this I'd like to avoid adding visible password credentials of database user (root) in this script. MySQL has an option called -defaults-file to handle this. Is it poissible to use it with this 'occ command' as well?

If not, what possibilities do I have to reach the same result like the occ command?

Kind regards
/neph

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the occ maintenance:install entry point and how its database and admin password options are handled. Define the supported non-visible credential inputs from the issue and verify that scripted installation works without exposing passwords in command arguments or scripts.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.