diff --git a/crates/common/src/manager/boot.rs b/crates/common/src/manager/boot.rs index 60792a27..91aa3973 100644 --- a/crates/common/src/manager/boot.rs +++ b/crates/common/src/manager/boot.rs @@ -293,11 +293,13 @@ fn quickstart(path: impl Into) { } } - let admin_pass = thread_rng() - .sample_iter(Alphanumeric) - .take(10) - .map(char::from) - .collect::(); + let admin_pass = std::env::var("STALWART_INITIAL_ADMIN_PASSWORD").unwrap_or_else(|_| { + thread_rng() + .sample_iter(Alphanumeric) + .take(10) + .map(char::from) + .collect::() + }); std::fs::write( path.join("etc").join("config.toml"),