improve docs

This commit is contained in:
Christoph Haas 2025-05-04 11:16:46 +02:00
parent 2c8304417b
commit cd60761ea7
4 changed files with 12 additions and 9 deletions

View File

@ -1,10 +1,10 @@
This page provides an overview of **all available configuration options** for WireGuard Portal. This page provides an overview of **all available configuration options** for WireGuard Portal.
You can supply these configurations in a **YAML** file (e.g. `config.yaml`) when starting the Portal. You can supply these configurations in a **YAML** file when starting the Portal.
The path of the configuration file defaults to **config/config.yaml** (or config/config.yml) in the working directory of the executable. The path of the configuration file defaults to `config/config.yaml` (or `config/config.yml`) in the working directory of the executable.
It is possible to override configuration filepath using the environment variable `WG_PORTAL_CONFIG`. It is possible to override the configuration filepath using the environment variable `WG_PORTAL_CONFIG`.
For example: `WG_PORTAL_CONFIG=/etc/wg-portal/config.yaml ./wg-portal`. For example: `WG_PORTAL_CONFIG=/etc/wg-portal/config.yaml ./wg-portal`.
Also, environment variable substitution in the config file is supported. Refer to [syntax](https://github.com/a8m/envsubst?tab=readme-ov-file#docs). Also, environment variable substitution in the config file is supported. Refer to the [syntax](https://github.com/a8m/envsubst?tab=readme-ov-file#docs).
Configuration examples are available on the [Examples](./examples.md) page. Configuration examples are available on the [Examples](./examples.md) page.

View File

@ -13,7 +13,7 @@ A sample docker-compose.yml (managing WireGuard interfaces directly on the host)
--8<-- "docker-compose.yml::18" --8<-- "docker-compose.yml::18"
``` ```
By default, the webserver is listening on port **8888**. By default, the webserver is listening on port **8888** on all available interfaces.
Volumes for `/app/data` and `/app/config` should be used ensure data persistence across container restarts. Volumes for `/app/data` and `/app/config` should be used ensure data persistence across container restarts.
@ -118,7 +118,7 @@ These are official releases of WireGuard Portal. They correspond to the GitHub t
Once these tags show up in this repository, they will never change. Once these tags show up in this repository, they will never change.
For production deployments of WireGuard Portal, we strongly recommend using one of these tags, e.g. **wgportal/wg-portal:2.0.0**, instead of the latest or canary tags. For production deployments of WireGuard Portal, we strongly recommend using one of these tags, e.g. `wgportal/wg-portal:2.0.0`, instead of the latest or canary tags.
If you only want to stay at the same major or major+minor version, use either `v[MAJOR]` or `[MAJOR].[MINOR]` tags. For example `v2` or `2.0`. If you only want to stay at the same major or major+minor version, use either `v[MAJOR]` or `[MAJOR].[MINOR]` tags. For example `v2` or `2.0`.
@ -149,7 +149,7 @@ You should mount those directories as a volume:
A detailed description of the configuration options can be found [here](../configuration/overview.md). A detailed description of the configuration options can be found [here](../configuration/overview.md).
If you want to access configuration files in wg-quick format, you can mount the `/etc/wireguard` directory to a location of your choice. If you want to access configuration files in wg-quick format, you can mount the `/etc/wireguard` directory inside the container to a location of your choice.
Also enable the `config_storage_path` option in the configuration file: Also enable the `config_storage_path` option in the configuration file:
```yaml ```yaml
advanced: advanced:

View File

@ -22,4 +22,5 @@ make build
## Install ## Install
Compiled binary will be available in `./dist` directory. Compiled binary will be available in `./dist` directory.
For installation instructions, check the [Binaries](./binaries.md) section. For installation instructions, check the [Binaries](./binaries.md) section.

View File

@ -13,7 +13,9 @@ To upgrade from a previous SQLite database, start wg-portal like:
./wg-portal-amd64 -migrateFrom=old_wg_portal.db ./wg-portal-amd64 -migrateFrom=old_wg_portal.db
``` ```
You can also specify the database type using the parameter **-migrateFromType**, supported types: mysql, mssql, postgres or sqlite. You can also specify the database type using the parameter **-migrateFromType**.
Supported database types: `mysql`, `mssql`, `postgres` or `sqlite`.
For example: For example:
```shell ```shell
@ -31,5 +33,5 @@ services:
image: wgportal/wg-portal:v2 image: wgportal/wg-portal:v2
# ... other settings # ... other settings
restart: no restart: no
command: ["-migrateFrom=/app/data/wg_portal.db"] command: ["-migrateFrom=/app/data/old_wg_portal.db"]
``` ```