Skip to content

Commit b0f88d2

Browse files
committed
Update readme-vars for install script
1 parent 260655e commit b0f88d2

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

readme-vars.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,60 @@ param_ports:
3232
- {external_port: "443", internal_port: "443", port_desc: "WebUI"}
3333
readonly_supported: false
3434
nonroot_supported: false
35+
# optional container parameters
36+
opt_param_usage_include_env: true
37+
opt_param_env_vars:
38+
- {env_var: "DB_TYPE", env_value: "sqlite", desc: "Specify the type of database to be used (valid values: 'sqlite', 'mysql', 'pgsql') (valid only for first run)"}
39+
- {env_var: "DB_HOST", env_value: "localhost", desc: "Set this to the database host. (valid only for first run)"}
40+
- {env_var: "DB_NAME", env_value: "nextcloud", desc: "Set this to the database name. (valid only for first run)"}
41+
- {env_var: "DB_USER", env_value: "nextcloud", desc: "Set this to the database user. (valid only for first run)"}
42+
- {env_var: "DB_PASS", env_value: "", desc: "Set this to the database password. (minimum 4 characters & non-alphanumeric passwords must be properly escaped). (valid only for first run)"}
43+
- {env_var: "ADMIN_USER", env_value: "admin", desc: "Specify the admin account name. (valid only for first run and while setting password)"}
44+
- {env_var: "ADMIN_PASS", env_value: "", desc: "Specify the password for the nextcloud admin account. (resets password every start if set) (automated setup generates a random password if empty)"}
3545
# application setup block
3646
app_setup_block_enabled: true
3747
app_setup_block: |
3848
Access the webui at `https://<your-ip>:443`, for more information check out [Nextcloud]({{ project_url }}).
3949
4050
Note: `occ` should be run without prepending with `sudo -u abc php` or `sudo -u www-data php` ie; `docker exec -it nextcloud occ maintenance:mode --off`
4151
52+
### Automated installation (optional)
53+
54+
NOTE changing any of the `DB_` variables after the container has set up Nextcloud has no effect, edit the config file instead.
55+
56+
NOTE if you want to use (`DB_TYPE`, `DB_HOST`, `DB_NAME`, `DB_USER`, `DB_PASS`) **all five** of these variables need to be set you cannot pick and choose.
57+
However, you can use the defaults if they match your setup.
58+
59+
This is completely optional and can be skipped.
60+
If the `ADMIN_PASS` variable is empty, a random password will be generated while the automated installation runs.
61+
You can find this password in the logs.
62+
63+
### Loading passwords and users from files
64+
65+
All env values can be set in a file:
66+
67+
```path
68+
/config/env
69+
```
70+
71+
Using the following format:
72+
73+
```env
74+
DB_TYPE="mysql"
75+
DB_HOST="mariadb_container_name"
76+
DB_NAME="nextcloud"
77+
DB_USER="nextcloud"
78+
DB_PASS="MySuperL0ngPW"
79+
ADMIN_PASS="MyEv3nB3tt3rPW"
80+
```
81+
82+
These settings can be mixed and matched with Docker ENV settings as you require, but the settings in the file will always take precedence.
83+
84+
### Resetting admin password
85+
86+
The admin's password will be set on container start, if the `ADMIN_PASS` env variable is set.
87+
This allows an easy password reset, but keep in mind that changes via Nextcloud will be overridden.
88+
4289
### Updating Nextcloud
4390
4491
Updating Nextcloud is done by pulling the new image, and recreating the container with it.

0 commit comments

Comments
 (0)