From 4e578fcb7123243ea739cc85283b7130d7626164 Mon Sep 17 00:00:00 2001 From: Bernd Storath <999999bst@gmail.com> Date: Thu, 13 Mar 2025 10:11:23 +0100 Subject: [PATCH] add docs --- .../advanced/config/unattended-setup.md | 30 +++++++++++++++++++ src/server/database/sqlite.ts | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 docs/content/advanced/config/unattended-setup.md diff --git a/docs/content/advanced/config/unattended-setup.md b/docs/content/advanced/config/unattended-setup.md new file mode 100644 index 00000000..18736167 --- /dev/null +++ b/docs/content/advanced/config/unattended-setup.md @@ -0,0 +1,30 @@ +--- +title: Unattended Setup +--- + +If you want to run the setup without any user interaction, e.g. with a tool like Ansible, you can use these environment variables to configure the setup. + +These will only be used during the first start of the container. After that, the setup will be disabled. + +| Env | Example | Description | Group | +| ---------------- | ----------------- | --------------------------------------------------------- | ----- | +| `INIT_ENABLED` | `true` | Enables the below env vars | 0 | +| `INIT_USERNAME` | `admin` | Sets admin username | 1 | +| `INIT_PASSWORD` | `Se!ureP%ssw` | Sets admin password | 1 | +| `INIT_DNS` | `1.1.1.1,8.8.8.8` | Sets global dns setting | 2 | +| `INIT_IPV4_CIDR` | `10.8.0.0/24` | Sets ipv4 cidr | 3 | +| `INIT_IPV6_CIDR` | `2001:0DB8::/32` | sets ipv6 cidr | 3 | +| `INIT_HOST` | `vpn.example.com` | host clients will connect to | 4 | +| `INIT_PORT` | `51820` | port clients will connect to and wireguard will listen on | 4 | + +/// warning | Variables have to be used together + +If variables are in the same group, you have to set them both. For example, if you set `INIT_IPV4_CIDR`, you also have to set `INIT_IPV6_CIDR`. +/// + +/// note | Password security + +The initial password is not checked for complexity. Make sure to set a secure password. + +Its recommended to remove the variables after the setup is done to prevent the password from being exposed. +/// diff --git a/src/server/database/sqlite.ts b/src/server/database/sqlite.ts index 3add4d53..301a0fc8 100644 --- a/src/server/database/sqlite.ts +++ b/src/server/database/sqlite.ts @@ -69,7 +69,7 @@ async function initialSetup(db: DBServiceType) { const setup = await db.general.getSetupStep(); if (setup.done) { - DB_DEBUG('Warning: Setup already done. Skiping initial setup.'); + DB_DEBUG('Setup already done. Skiping initial setup.'); return; }