diff options
-rw-r--r-- | server/initializers/installer.ts | 2 | ||||
-rw-r--r-- | support/doc/production.md | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/server/initializers/installer.ts b/server/initializers/installer.ts index 127449577..33970f0fa 100644 --- a/server/initializers/installer.ts +++ b/server/initializers/installer.ts | |||
@@ -128,6 +128,8 @@ async function createOAuthAdminIfNotExist () { | |||
128 | 128 | ||
129 | // Our password is weak so do not validate it | 129 | // Our password is weak so do not validate it |
130 | validatePassword = false | 130 | validatePassword = false |
131 | } else if (process.env.PT_INITIAL_ROOT_PASSWORD) { | ||
132 | password = process.env.PT_INITIAL_ROOT_PASSWORD | ||
131 | } else { | 133 | } else { |
132 | password = passwordGenerator(16, true) | 134 | password = passwordGenerator(16, true) |
133 | } | 135 | } |
diff --git a/support/doc/production.md b/support/doc/production.md index 2eba6e6a3..4f20cf140 100644 --- a/support/doc/production.md +++ b/support/doc/production.md | |||
@@ -204,6 +204,9 @@ logs. You can set another password with: | |||
204 | $ cd /var/www/peertube/peertube-latest && NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root | 204 | $ cd /var/www/peertube/peertube-latest && NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production npm run reset-password -- -u root |
205 | ``` | 205 | ``` |
206 | 206 | ||
207 | Alternatively you can set the environment variable `PT_INITIAL_ROOT_PASSWORD`, | ||
208 | to your own administrator password, although it must be 6 characters or more. | ||
209 | |||
207 | ### What now? | 210 | ### What now? |
208 | 211 | ||
209 | Now your instance is up you can: | 212 | Now your instance is up you can: |