diff --git a/Pre-release/examples/tutorials/auto-updates/index.html b/Pre-release/examples/tutorials/auto-updates/index.html index ebeb3b53..db45e572 100644 --- a/Pre-release/examples/tutorials/auto-updates/index.html +++ b/Pre-release/examples/tutorials/auto-updates/index.html @@ -1249,10 +1249,10 @@
With Docker Compose WireGuard Easy can be updated with a single command:
+With Docker Compose wg-easy
can be updated with a single command:
Replace $DIR
with the directory where your docker-compose.yml
is located.
cd $DIR
-sudo docker compose -f up -d --pull always
+sudo docker compose up -d --pull always
sudo docker stop wg-easy
@@ -1261,7 +1261,7 @@ sudo docker pull <
And then run the docker run -d \ ...
command from Docker Run again.
To update wg-easy
(and every container that has auto updates enabled), you can run the following commands:
To update wg-easy
(and every container that has auto updates enabled), you can run the following command:
sudo podman auto-update
To automatically install & run wg-easy, simply run:
+To automatically install & run ``wg-easy, simply run:
docker run -d \
--net wg \
-e INSECURE=true \
diff --git a/Pre-release/search/search_index.json b/Pre-release/search/search_index.json
index b12ee51a..5ace3c7f 100644
--- a/Pre-release/search/search_index.json
+++ b/Pre-release/search/search_index.json
@@ -1 +1 @@
-{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Welcome to the Documentation for wg-easy
","text":"\u00a0This Documentation is Versioned
Make sure to select the correct version of this documentation! It should match the version of the image you are using. The default version corresponds to the :latest
image tag - the most recent stable release.
This documentation provides you not only with the basic setup and configuration of wg-easy but also with advanced configuration, elaborate usage scenarios, detailed examples, hints and more.
"},{"location":"#about","title":"About","text":"wg-easy
is the easiest way to run WireGuard VPN + Web-based Admin UI.
"},{"location":"#contents","title":"Contents","text":""},{"location":"#getting-started","title":"Getting Started","text":"If you're new to wg-easy, make sure to read the Getting Started chapter first. If you want to look at examples for Docker Run and Compose, we have an Examples page.
"},{"location":"#contributing","title":"Contributing","text":"We are always happy to welcome new contributors. For guidelines and entrypoints please have a look at the Contributing section.
"},{"location":"#migration","title":"Migration","text":"If you are migrating from an older version of wg-easy
, please read the Migration chapter.
"},{"location":"getting-started/","title":"Getting Started","text":"This page explains how to get started with wg-easy. The guide uses Docker Compose as a reference. In our examples, we mount the named volume etc_wireguard
to /etc/wireguard
inside the container.
"},{"location":"getting-started/#preliminary-steps","title":"Preliminary Steps","text":"Before you can get started with deploying your own VPN, there are some requirements to be met:
- You need to have a host that you can manage
- You need to have a domain name or a public IP address
- You need a supported architecture (x86_64, arm64)
"},{"location":"getting-started/#host-setup","title":"Host Setup","text":"There are a few requirements for a suitable host system:
- You need to have a container runtime installed
About the Container Runtime
On the host, you need to have a suitable container runtime (like Docker or Podman) installed. We assume Docker Compose is installed. We have aligned file names and configuration conventions with the latest Docker Compose specification. If you're using podman, make sure to read the related documentation.
"},{"location":"getting-started/#deploying-the-actual-image","title":"Deploying the Actual Image","text":""},{"location":"getting-started/#tagging-convention","title":"Tagging Convention","text":"To understand which tags you should use, read this section carefully. Our CI will automatically build, test and push new images to the following container registry:
- GitHub Container Registry (
ghcr.io/wg-easy/wg-easy
)
All workflows are using the tagging convention listed below. It is subsequently applied to all images.
Event Image Tags cron
on master
nightly
push
a tag (v1.2.3
) 1.2.3
, 1.2
, 1
, latest
When publishing a tag we follow the Semantic Versioning specification. The latest
tag is always pointing to the latest stable release. If you want to avoid breaking changes, use the major version tag (e.g. 15
).
"},{"location":"getting-started/#get-all-files","title":"Get All Files","text":"Issue the following command to acquire the necessary file:
wget \"https://raw.githubusercontent.com/wg-easy/wg-easy/master/docker-compose.yml\"\n
"},{"location":"getting-started/#start-the-container","title":"Start the Container","text":"To start the container, issue the following command:
sudo docker compose up -d\n
"},{"location":"getting-started/#configuration-steps","title":"Configuration Steps","text":"Now follow the setup process in your web browser
"},{"location":"getting-started/#stopping-the-container","title":"Stopping the Container","text":"To stop the container, issue the following command:
sudo docker compose down\n
Using the Correct Commands For Stopping and Starting wg-easy
Use sudo docker compose up / down
, not sudo docker compose start / stop
. Otherwise, the container is not properly destroyed and you may experience problems during startup because of inconsistent state.
That's it! It really is that easy.
If you need more help you can read the Basic Installation Tutorial.
"},{"location":"advanced/api/","title":"API","text":"TODO
"},{"location":"advanced/config/optional-config/","title":"Optional Configuration","text":"TODO
Env Default Example Description PORT
51821
6789
TCP port for Web UI. HOST
0.0.0.0
localhost
IP address web UI binds to. INSECURE
false
true
If access over http is allowed"},{"location":"advanced/metrics/prometheus/","title":"Prometheus","text":"TODO
"},{"location":"advanced/migrate/","title":"Migrate","text":"If you want to migrate from an older version of wg-easy
to the new version, you can find the migration guides listed below.
- Migrate from v14 to v15 : This guide should also work for any version before
v14
.
"},{"location":"advanced/migrate/from-14-to-15/","title":"Migrate from v14 to v15","text":"This guide will help you migrate from v14
to version v15
of wg-easy
.
"},{"location":"advanced/migrate/from-14-to-15/#changes","title":"Changes","text":" - This is a complete rewrite of the
wg-easy
project. Therefore the configuration files and the way you interact with the project have changed. - If you use armv6 or armv7, you can't migrate to
v15
yet. We are working on it. - If you are connecting to the web ui via HTTP, you need to set the
INSECURE
environment variable to true
in the new container.
"},{"location":"advanced/migrate/from-14-to-15/#migration","title":"Migration","text":""},{"location":"advanced/migrate/from-14-to-15/#backup","title":"Backup","text":"Before you start the migration, make sure to backup your existing configuration files.
Go into the Web Ui and click the Backup button, this should download a wg0.json
file.
Or download the wg0.json
file from your container volume to your pc.
You will need this file for the migration
"},{"location":"advanced/migrate/from-14-to-15/#remove-old-container","title":"Remove old container","text":" - Stop the running container
If you are using docker run
docker stop wg-easy\n
If you are using docker-compose
docker-compose down\n
"},{"location":"advanced/migrate/from-14-to-15/#start-new-container","title":"Start new container","text":"Follow the instructions in the Getting Started or Basic Installation guide to start the new container.
In the setup wizard, select that you already already have a configuration file and upload the wg0.json
file you downloaded in the backup step.
"},{"location":"advanced/migrate/from-14-to-15/#done","title":"Done","text":"You have now successfully migrated to v15
of wg-easy
.
"},{"location":"contributing/general/","title":"General Information","text":""},{"location":"contributing/general/#coding-style","title":"Coding Style","text":"When refactoring, writing or altering files, adhere to these rules:
- Adjust your style of coding to the style that is already present! Even if you do not like it, this is due to consistency. There was a lot of work involved in making all files consistent.
- Use
pnpm lint
to check your scripts! Your contributions are checked by GitHub Actions too, so you will need to do this. - Use the provided
.vscode/settings.json
file.
"},{"location":"contributing/general/#documentation","title":"Documentation","text":"Make sure to select nightly
in the dropdown menu at the top. Navigate to the page you would like to edit and click the edit button in the top right. This allows you to make changes and create a pull-request.
Alternatively you can make the changes locally. For that you'll need to have Docker installed. Run
pnpm docs:serve\n
This serves the documentation on your local machine on port 8080
. Each change will be hot-reloaded onto the page you view, just edit, save and look at the result.
"},{"location":"contributing/issues-and-pull-requests/","title":"Issues and Pull Requests","text":"This project is Open Source. That means that you can contribute on enhancements, bug fixing or improving the documentation.
"},{"location":"contributing/issues-and-pull-requests/#opening-an-issue","title":"Opening an Issue","text":"Attention
Before opening an issue, read the README
carefully, study the docs for your version (maybe latest) and your search engine you trust. The issue tracker is not meant to be used for unrelated questions!
When opening an issue, please provide details use case to let the community reproduce your problem.
Attention
Use the issue templates to provide the necessary information. Issues which do not use these templates are not worked on and closed.
By raising issues, I agree to these terms and I understand, that the rules set for the issue tracker will help both maintainers as well as everyone to find a solution.
Maintainers take the time to improve on this project and help by solving issues together. It is therefore expected from others to make an effort and comply with the rules.
"},{"location":"contributing/issues-and-pull-requests/#filing-a-bug-report","title":"Filing a Bug Report","text":"Thank you for participating in this project and reporting a bug. wg-easy is a community-driven project, and each contribution counts!
Maintainers and moderators are volunteers. We greatly appreciate reports that take the time to provide detailed information via the template, enabling us to help you in the best and quickest way. Ignoring the template provided may seem easier, but discourages receiving any support (via assignment of the label meta/no template - no support
).
Markdown formatting can be used in almost all text fields (unless stated otherwise in the description).
Be as precise as possible, and if in doubt, it's best to add more information that too few.
When an option is marked with \"not officially supported\" / \"unsupported\", then support is dependent on availability from specific maintainers.
"},{"location":"contributing/issues-and-pull-requests/#pull-requests","title":"Pull Requests","text":"Motivation
You want to add a feature? Feel free to start creating an issue explaining what you want to do and how you're thinking doing it. Other users may have the same need and collaboration may lead to better results.
"},{"location":"contributing/issues-and-pull-requests/#submit-a-pull-request","title":"Submit a Pull-Request","text":"The development workflow is the following:
- Fork the project
- Write the code that is needed :D
- Document your improvements if necessary
- Commit (and sign your commit), push and create a pull-request to merge into
master
. Please use the pull-request template to provide a minimum of contextual information and make sure to meet the requirements of the checklist.
Pull requests are automatically tested against the CI and will be reviewed when tests pass. When your changes are validated, your branch is merged. CI builds the new :nightly
image every night and your changes will be includes in the next version release.
"},{"location":"examples/tutorials/adguard/","title":"AdGuard Home","text":"TODO
"},{"location":"examples/tutorials/auto-updates/","title":"Auto Updates","text":""},{"location":"examples/tutorials/auto-updates/#docker-compose","title":"Docker Compose","text":"With Docker Compose WireGuard Easy can be updated with a single command:
Replace $DIR
with the directory where your docker-compose.yml
is located.
cd $DIR\nsudo docker compose -f up -d --pull always\n
"},{"location":"examples/tutorials/auto-updates/#docker-run","title":"Docker Run","text":"sudo docker stop wg-easy\nsudo docker rm wg-easy\nsudo docker pull ghcr.io/wg-easy/wg-easy\n
And then run the docker run -d \\ ...
command from Docker Run again.
"},{"location":"examples/tutorials/auto-updates/#podman","title":"Podman","text":"To update wg-easy
(and every container that has auto updates enabled), you can run the following commands:
sudo podman auto-update\n
"},{"location":"examples/tutorials/basic-installation/","title":"Basic Installation","text":""},{"location":"examples/tutorials/basic-installation/#requirements","title":"Requirements","text":" - You need to have a host that you can manage
- You need to have a domain name or a public IP address
- You need a supported architecture (x86_64, arm64)
- You need curl installed on your host
"},{"location":"examples/tutorials/basic-installation/#install-docker","title":"Install Docker","text":"Follow the Docs here: https://docs.docker.com/engine/install/ and install Docker on your host.
"},{"location":"examples/tutorials/basic-installation/#install-wg-easy","title":"Install wg-easy
","text":" - Create a directory for the configuration files (you can choose any directory you like):
DIR=/docker/wg-easy\nsudo mkdir -p $DIR\n
- Download docker compose file
sudo curl -o $DIR/docker-compose.yml https://raw.githubusercontent.com/wg-easy/wg-easy/master/docker-compose.yml\n
- Start
wg-easy
sudo docker-compose -f $DIR/docker-compose.yml up -d\n
"},{"location":"examples/tutorials/basic-installation/#setup-firewall","title":"Setup Firewall","text":"If you are using a firewall, you need to open the following ports:
- UDP 51820 (WireGuard)
- TCP 51821 (Web UI)
These ports can be changed, so if you change them you have to update your firewall rules accordingly.
"},{"location":"examples/tutorials/basic-installation/#setup-reverse-proxy","title":"Setup Reverse Proxy","text":"TODO
"},{"location":"examples/tutorials/basic-installation/#access-the-web-ui","title":"Access the Web UI","text":"Open your browser and navigate to https://<your-domain>:51821
or https://<your-ip>:51821
.
Follow the instructions to set up your WireGuard VPN.
"},{"location":"examples/tutorials/basic-installation/#update-wg-easy","title":"Update wg-easy
","text":"To update wg-easy
to the latest version, run:
sudo docker-compose -f $DIR/docker-compose.yml pull\nsudo docker-compose -f $DIR/docker-compose.yml up -d\n
"},{"location":"examples/tutorials/basic-installation/#auto-update","title":"Auto Update","text":"If you want to enable auto-updates, follow the instructions here: Auto Updates
"},{"location":"examples/tutorials/caddy/","title":"Caddy","text":"TODO
"},{"location":"examples/tutorials/docker-run/","title":"Docker Run","text":"To setup the IPv6 Network, simply run once:
docker network create \\\n -d bridge --ipv6 \\\n -d default \\\n --subnet 10.42.42.0/24 \\\n --subnet fdcc:ad94:bacf:61a3::/64 wg \\\n
To automatically install & run wg-easy, simply run:
docker run -d \\\n --net wg \\\n -e INSECURE=true \\\n --name wg-easy \\\n --ip6 fdcc:ad94:bacf:61a3::2a \\\n --ip 10.42.42.42 \\\n -v ~/.wg-easy:/etc/wireguard \\\n -v /lib/modules:/lib/modules:ro \\\n -p 51820:51820/udp \\\n -p 51821:51821/tcp \\\n --cap-add NET_ADMIN \\\n --cap-add SYS_MODULE \\\n --sysctl net.ipv4.ip_forward=1 \\\n --sysctl net.ipv4.conf.all.src_valid_mark=1 \\\n --sysctl net.ipv6.conf.all.disable_ipv6=0 \\\n --sysctl net.ipv6.conf.all.forwarding=1 \\\n --sysctl net.ipv6.conf.default.forwarding=1 \\\n --restart unless-stopped \\\n ghcr.io/wg-easy/wg-easy:15\n
The Web UI will now be available on http://0.0.0.0:51821
.
\ud83d\udca1 Your configuration files will be saved in ~/.wg-easy
"},{"location":"examples/tutorials/dockerless/","title":"Without Docker","text":"TODO
"},{"location":"examples/tutorials/nginx/","title":"NGINX","text":"TODO
"},{"location":"examples/tutorials/podman/","title":"Podman","text":"This guide will show you how to run wg-easy
with rootful Podman and nftables.
"},{"location":"examples/tutorials/podman/#requirements","title":"Requirements","text":" - Podman installed with version 4.4 or higher
"},{"location":"examples/tutorials/podman/#configuration","title":"Configuration","text":"Create a Folder for the configuration files:
sudo mkdir -p /etc/containers/systemd/wg-easy\nsudo mkdir -p /etc/containers/volumes/wg-easy\n
Create a file /etc/containers/systemd/wg-easy/wg-easy.container
with the following content:
[Container]\nContainerName=wg-easy\nImage=ghcr.io/wg-easy/wg-easy:15\nAutoUpdate=registry\n\nVolume=/etc/containers/volumes/wg-easy:/etc/wireguard:Z\nNetwork=wg-easy.network\nPublishPort=51820:51820/udp\nPublishPort=51821:51821/tcp\n\n# this is used to allow access over HTTP\n# remove this when using a reverse proxy\nEnvironment=INSECURE=true\n\nAddCapability=NET_ADMIN\nAddCapability=SYS_MODULE\nAddCapability=NET_RAW\nSysctl=net.ipv4.ip_forward=1\nSysctl=net.ipv4.conf.all.src_valid_mark=1\nSysctl=net.ipv6.conf.all.disable_ipv6=0\nSysctl=net.ipv6.conf.all.forwarding=1\nSysctl=net.ipv6.conf.default.forwarding=1\n\n[Install]\n# this is used to start the container on boot\nWantedBy=default.target\n
Create a file /etc/containers/systemd/wg-easy/wg-easy.network
with the following content:
[Network]\nNetworkName=wg-easy\nIPv6=true\n
"},{"location":"examples/tutorials/podman/#load-kernel-modules","title":"Load Kernel Modules","text":"You will need to load the following kernel modules
wireguard\nnft_masq\n
Create a file /etc/modules-load.d/wg-easy.conf
with the following content:
wireguard\nnft_masq\n
"},{"location":"examples/tutorials/podman/#start-the-container","title":"Start the Container","text":"sudo systemctl daemon-reload\nsudo systemctl start wg-easy\n
"},{"location":"examples/tutorials/podman/#edit-hooks","title":"Edit Hooks","text":"In the Admin Panel of your WireGuard server, go to the Hooks
tab and add the following hook:
- PostUp
apk add nftables; nft add table inet wg_table; nft add chain inet wg_table postrouting { type nat hook postrouting priority 100 \\; }; nft add rule inet wg_table postrouting ip saddr {{ipv4Cidr}} oifname {{device}} masquerade; nft add rule inet wg_table postrouting ip6 saddr {{ipv6Cidr}} oifname {{device}} masquerade; nft add chain inet wg_table input { type filter hook input priority 0 \\; policy drop \\; }; nft add rule inet wg_table input udp dport {{port}} accept; nft add chain inet wg_table forward { type filter hook forward priority 0 \\; policy drop \\; }; nft add rule inet wg_table forward iifname \"wg0\" accept; nft add rule inet wg_table forward oifname \"wg0\" accept;\n
- PostDown
nft delete table inet wg_table\n
If you don't have iptables loaded on your server, you could see many errors in the logs or in the UI. You can ignore them.
"},{"location":"examples/tutorials/podman/#restart-the-container","title":"Restart the Container","text":"Restart the container to apply the new hooks:
sudo systemctl restart wg-easy\n
"},{"location":"examples/tutorials/traefik/","title":"Traefik","text":"TODO
"}]}
\ No newline at end of file
+{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Welcome to the Documentation for wg-easy
","text":"\u00a0This Documentation is Versioned
Make sure to select the correct version of this documentation! It should match the version of the image you are using. The default version corresponds to the :latest
image tag - the most recent stable release.
This documentation provides you not only with the basic setup and configuration of wg-easy but also with advanced configuration, elaborate usage scenarios, detailed examples, hints and more.
"},{"location":"#about","title":"About","text":"wg-easy
is the easiest way to run WireGuard VPN + Web-based Admin UI.
"},{"location":"#contents","title":"Contents","text":""},{"location":"#getting-started","title":"Getting Started","text":"If you're new to wg-easy, make sure to read the Getting Started chapter first. If you want to look at examples for Docker Run and Compose, we have an Examples page.
"},{"location":"#contributing","title":"Contributing","text":"We are always happy to welcome new contributors. For guidelines and entrypoints please have a look at the Contributing section.
"},{"location":"#migration","title":"Migration","text":"If you are migrating from an older version of wg-easy
, please read the Migration chapter.
"},{"location":"getting-started/","title":"Getting Started","text":"This page explains how to get started with wg-easy. The guide uses Docker Compose as a reference. In our examples, we mount the named volume etc_wireguard
to /etc/wireguard
inside the container.
"},{"location":"getting-started/#preliminary-steps","title":"Preliminary Steps","text":"Before you can get started with deploying your own VPN, there are some requirements to be met:
- You need to have a host that you can manage
- You need to have a domain name or a public IP address
- You need a supported architecture (x86_64, arm64)
"},{"location":"getting-started/#host-setup","title":"Host Setup","text":"There are a few requirements for a suitable host system:
- You need to have a container runtime installed
About the Container Runtime
On the host, you need to have a suitable container runtime (like Docker or Podman) installed. We assume Docker Compose is installed. We have aligned file names and configuration conventions with the latest Docker Compose specification. If you're using podman, make sure to read the related documentation.
"},{"location":"getting-started/#deploying-the-actual-image","title":"Deploying the Actual Image","text":""},{"location":"getting-started/#tagging-convention","title":"Tagging Convention","text":"To understand which tags you should use, read this section carefully. Our CI will automatically build, test and push new images to the following container registry:
- GitHub Container Registry (
ghcr.io/wg-easy/wg-easy
)
All workflows are using the tagging convention listed below. It is subsequently applied to all images.
Event Image Tags cron
on master
nightly
push
a tag (v1.2.3
) 1.2.3
, 1.2
, 1
, latest
When publishing a tag we follow the Semantic Versioning specification. The latest
tag is always pointing to the latest stable release. If you want to avoid breaking changes, use the major version tag (e.g. 15
).
"},{"location":"getting-started/#get-all-files","title":"Get All Files","text":"Issue the following command to acquire the necessary file:
wget \"https://raw.githubusercontent.com/wg-easy/wg-easy/master/docker-compose.yml\"\n
"},{"location":"getting-started/#start-the-container","title":"Start the Container","text":"To start the container, issue the following command:
sudo docker compose up -d\n
"},{"location":"getting-started/#configuration-steps","title":"Configuration Steps","text":"Now follow the setup process in your web browser
"},{"location":"getting-started/#stopping-the-container","title":"Stopping the Container","text":"To stop the container, issue the following command:
sudo docker compose down\n
Using the Correct Commands For Stopping and Starting wg-easy
Use sudo docker compose up / down
, not sudo docker compose start / stop
. Otherwise, the container is not properly destroyed and you may experience problems during startup because of inconsistent state.
That's it! It really is that easy.
If you need more help you can read the Basic Installation Tutorial.
"},{"location":"advanced/api/","title":"API","text":"TODO
"},{"location":"advanced/config/optional-config/","title":"Optional Configuration","text":"TODO
Env Default Example Description PORT
51821
6789
TCP port for Web UI. HOST
0.0.0.0
localhost
IP address web UI binds to. INSECURE
false
true
If access over http is allowed"},{"location":"advanced/metrics/prometheus/","title":"Prometheus","text":"TODO
"},{"location":"advanced/migrate/","title":"Migrate","text":"If you want to migrate from an older version of wg-easy
to the new version, you can find the migration guides listed below.
- Migrate from v14 to v15 : This guide should also work for any version before
v14
.
"},{"location":"advanced/migrate/from-14-to-15/","title":"Migrate from v14 to v15","text":"This guide will help you migrate from v14
to version v15
of wg-easy
.
"},{"location":"advanced/migrate/from-14-to-15/#changes","title":"Changes","text":" - This is a complete rewrite of the
wg-easy
project. Therefore the configuration files and the way you interact with the project have changed. - If you use armv6 or armv7, you can't migrate to
v15
yet. We are working on it. - If you are connecting to the web ui via HTTP, you need to set the
INSECURE
environment variable to true
in the new container.
"},{"location":"advanced/migrate/from-14-to-15/#migration","title":"Migration","text":""},{"location":"advanced/migrate/from-14-to-15/#backup","title":"Backup","text":"Before you start the migration, make sure to backup your existing configuration files.
Go into the Web Ui and click the Backup button, this should download a wg0.json
file.
Or download the wg0.json
file from your container volume to your pc.
You will need this file for the migration
"},{"location":"advanced/migrate/from-14-to-15/#remove-old-container","title":"Remove old container","text":" - Stop the running container
If you are using docker run
docker stop wg-easy\n
If you are using docker-compose
docker-compose down\n
"},{"location":"advanced/migrate/from-14-to-15/#start-new-container","title":"Start new container","text":"Follow the instructions in the Getting Started or Basic Installation guide to start the new container.
In the setup wizard, select that you already already have a configuration file and upload the wg0.json
file you downloaded in the backup step.
"},{"location":"advanced/migrate/from-14-to-15/#done","title":"Done","text":"You have now successfully migrated to v15
of wg-easy
.
"},{"location":"contributing/general/","title":"General Information","text":""},{"location":"contributing/general/#coding-style","title":"Coding Style","text":"When refactoring, writing or altering files, adhere to these rules:
- Adjust your style of coding to the style that is already present! Even if you do not like it, this is due to consistency. There was a lot of work involved in making all files consistent.
- Use
pnpm lint
to check your scripts! Your contributions are checked by GitHub Actions too, so you will need to do this. - Use the provided
.vscode/settings.json
file.
"},{"location":"contributing/general/#documentation","title":"Documentation","text":"Make sure to select nightly
in the dropdown menu at the top. Navigate to the page you would like to edit and click the edit button in the top right. This allows you to make changes and create a pull-request.
Alternatively you can make the changes locally. For that you'll need to have Docker installed. Run
pnpm docs:serve\n
This serves the documentation on your local machine on port 8080
. Each change will be hot-reloaded onto the page you view, just edit, save and look at the result.
"},{"location":"contributing/issues-and-pull-requests/","title":"Issues and Pull Requests","text":"This project is Open Source. That means that you can contribute on enhancements, bug fixing or improving the documentation.
"},{"location":"contributing/issues-and-pull-requests/#opening-an-issue","title":"Opening an Issue","text":"Attention
Before opening an issue, read the README
carefully, study the docs for your version (maybe latest) and your search engine you trust. The issue tracker is not meant to be used for unrelated questions!
When opening an issue, please provide details use case to let the community reproduce your problem.
Attention
Use the issue templates to provide the necessary information. Issues which do not use these templates are not worked on and closed.
By raising issues, I agree to these terms and I understand, that the rules set for the issue tracker will help both maintainers as well as everyone to find a solution.
Maintainers take the time to improve on this project and help by solving issues together. It is therefore expected from others to make an effort and comply with the rules.
"},{"location":"contributing/issues-and-pull-requests/#filing-a-bug-report","title":"Filing a Bug Report","text":"Thank you for participating in this project and reporting a bug. wg-easy is a community-driven project, and each contribution counts!
Maintainers and moderators are volunteers. We greatly appreciate reports that take the time to provide detailed information via the template, enabling us to help you in the best and quickest way. Ignoring the template provided may seem easier, but discourages receiving any support (via assignment of the label meta/no template - no support
).
Markdown formatting can be used in almost all text fields (unless stated otherwise in the description).
Be as precise as possible, and if in doubt, it's best to add more information that too few.
When an option is marked with \"not officially supported\" / \"unsupported\", then support is dependent on availability from specific maintainers.
"},{"location":"contributing/issues-and-pull-requests/#pull-requests","title":"Pull Requests","text":"Motivation
You want to add a feature? Feel free to start creating an issue explaining what you want to do and how you're thinking doing it. Other users may have the same need and collaboration may lead to better results.
"},{"location":"contributing/issues-and-pull-requests/#submit-a-pull-request","title":"Submit a Pull-Request","text":"The development workflow is the following:
- Fork the project
- Write the code that is needed :D
- Document your improvements if necessary
- Commit (and sign your commit), push and create a pull-request to merge into
master
. Please use the pull-request template to provide a minimum of contextual information and make sure to meet the requirements of the checklist.
Pull requests are automatically tested against the CI and will be reviewed when tests pass. When your changes are validated, your branch is merged. CI builds the new :nightly
image every night and your changes will be includes in the next version release.
"},{"location":"examples/tutorials/adguard/","title":"AdGuard Home","text":"TODO
"},{"location":"examples/tutorials/auto-updates/","title":"Auto Updates","text":""},{"location":"examples/tutorials/auto-updates/#docker-compose","title":"Docker Compose","text":"With Docker Compose wg-easy
can be updated with a single command:
Replace $DIR
with the directory where your docker-compose.yml
is located.
cd $DIR\nsudo docker compose up -d --pull always\n
"},{"location":"examples/tutorials/auto-updates/#docker-run","title":"Docker Run","text":"sudo docker stop wg-easy\nsudo docker rm wg-easy\nsudo docker pull ghcr.io/wg-easy/wg-easy\n
And then run the docker run -d \\ ...
command from Docker Run again.
"},{"location":"examples/tutorials/auto-updates/#podman","title":"Podman","text":"To update wg-easy
(and every container that has auto updates enabled), you can run the following command:
sudo podman auto-update\n
"},{"location":"examples/tutorials/basic-installation/","title":"Basic Installation","text":""},{"location":"examples/tutorials/basic-installation/#requirements","title":"Requirements","text":" - You need to have a host that you can manage
- You need to have a domain name or a public IP address
- You need a supported architecture (x86_64, arm64)
- You need curl installed on your host
"},{"location":"examples/tutorials/basic-installation/#install-docker","title":"Install Docker","text":"Follow the Docs here: https://docs.docker.com/engine/install/ and install Docker on your host.
"},{"location":"examples/tutorials/basic-installation/#install-wg-easy","title":"Install wg-easy
","text":" - Create a directory for the configuration files (you can choose any directory you like):
DIR=/docker/wg-easy\nsudo mkdir -p $DIR\n
- Download docker compose file
sudo curl -o $DIR/docker-compose.yml https://raw.githubusercontent.com/wg-easy/wg-easy/master/docker-compose.yml\n
- Start
wg-easy
sudo docker-compose -f $DIR/docker-compose.yml up -d\n
"},{"location":"examples/tutorials/basic-installation/#setup-firewall","title":"Setup Firewall","text":"If you are using a firewall, you need to open the following ports:
- UDP 51820 (WireGuard)
- TCP 51821 (Web UI)
These ports can be changed, so if you change them you have to update your firewall rules accordingly.
"},{"location":"examples/tutorials/basic-installation/#setup-reverse-proxy","title":"Setup Reverse Proxy","text":"TODO
"},{"location":"examples/tutorials/basic-installation/#access-the-web-ui","title":"Access the Web UI","text":"Open your browser and navigate to https://<your-domain>:51821
or https://<your-ip>:51821
.
Follow the instructions to set up your WireGuard VPN.
"},{"location":"examples/tutorials/basic-installation/#update-wg-easy","title":"Update wg-easy
","text":"To update wg-easy
to the latest version, run:
sudo docker-compose -f $DIR/docker-compose.yml pull\nsudo docker-compose -f $DIR/docker-compose.yml up -d\n
"},{"location":"examples/tutorials/basic-installation/#auto-update","title":"Auto Update","text":"If you want to enable auto-updates, follow the instructions here: Auto Updates
"},{"location":"examples/tutorials/caddy/","title":"Caddy","text":"TODO
"},{"location":"examples/tutorials/docker-run/","title":"Docker Run","text":"To setup the IPv6 Network, simply run once:
docker network create \\\n -d bridge --ipv6 \\\n -d default \\\n --subnet 10.42.42.0/24 \\\n --subnet fdcc:ad94:bacf:61a3::/64 wg \\\n
To automatically install & run ``wg-easy, simply run:
docker run -d \\\n --net wg \\\n -e INSECURE=true \\\n --name wg-easy \\\n --ip6 fdcc:ad94:bacf:61a3::2a \\\n --ip 10.42.42.42 \\\n -v ~/.wg-easy:/etc/wireguard \\\n -v /lib/modules:/lib/modules:ro \\\n -p 51820:51820/udp \\\n -p 51821:51821/tcp \\\n --cap-add NET_ADMIN \\\n --cap-add SYS_MODULE \\\n --sysctl net.ipv4.ip_forward=1 \\\n --sysctl net.ipv4.conf.all.src_valid_mark=1 \\\n --sysctl net.ipv6.conf.all.disable_ipv6=0 \\\n --sysctl net.ipv6.conf.all.forwarding=1 \\\n --sysctl net.ipv6.conf.default.forwarding=1 \\\n --restart unless-stopped \\\n ghcr.io/wg-easy/wg-easy:15\n
The Web UI will now be available on http://0.0.0.0:51821
.
\ud83d\udca1 Your configuration files will be saved in ~/.wg-easy
"},{"location":"examples/tutorials/dockerless/","title":"Without Docker","text":"TODO
"},{"location":"examples/tutorials/nginx/","title":"NGINX","text":"TODO
"},{"location":"examples/tutorials/podman/","title":"Podman","text":"This guide will show you how to run wg-easy
with rootful Podman and nftables.
"},{"location":"examples/tutorials/podman/#requirements","title":"Requirements","text":" - Podman installed with version 4.4 or higher
"},{"location":"examples/tutorials/podman/#configuration","title":"Configuration","text":"Create a Folder for the configuration files:
sudo mkdir -p /etc/containers/systemd/wg-easy\nsudo mkdir -p /etc/containers/volumes/wg-easy\n
Create a file /etc/containers/systemd/wg-easy/wg-easy.container
with the following content:
[Container]\nContainerName=wg-easy\nImage=ghcr.io/wg-easy/wg-easy:15\nAutoUpdate=registry\n\nVolume=/etc/containers/volumes/wg-easy:/etc/wireguard:Z\nNetwork=wg-easy.network\nPublishPort=51820:51820/udp\nPublishPort=51821:51821/tcp\n\n# this is used to allow access over HTTP\n# remove this when using a reverse proxy\nEnvironment=INSECURE=true\n\nAddCapability=NET_ADMIN\nAddCapability=SYS_MODULE\nAddCapability=NET_RAW\nSysctl=net.ipv4.ip_forward=1\nSysctl=net.ipv4.conf.all.src_valid_mark=1\nSysctl=net.ipv6.conf.all.disable_ipv6=0\nSysctl=net.ipv6.conf.all.forwarding=1\nSysctl=net.ipv6.conf.default.forwarding=1\n\n[Install]\n# this is used to start the container on boot\nWantedBy=default.target\n
Create a file /etc/containers/systemd/wg-easy/wg-easy.network
with the following content:
[Network]\nNetworkName=wg-easy\nIPv6=true\n
"},{"location":"examples/tutorials/podman/#load-kernel-modules","title":"Load Kernel Modules","text":"You will need to load the following kernel modules
wireguard\nnft_masq\n
Create a file /etc/modules-load.d/wg-easy.conf
with the following content:
wireguard\nnft_masq\n
"},{"location":"examples/tutorials/podman/#start-the-container","title":"Start the Container","text":"sudo systemctl daemon-reload\nsudo systemctl start wg-easy\n
"},{"location":"examples/tutorials/podman/#edit-hooks","title":"Edit Hooks","text":"In the Admin Panel of your WireGuard server, go to the Hooks
tab and add the following hook:
- PostUp
apk add nftables; nft add table inet wg_table; nft add chain inet wg_table postrouting { type nat hook postrouting priority 100 \\; }; nft add rule inet wg_table postrouting ip saddr {{ipv4Cidr}} oifname {{device}} masquerade; nft add rule inet wg_table postrouting ip6 saddr {{ipv6Cidr}} oifname {{device}} masquerade; nft add chain inet wg_table input { type filter hook input priority 0 \\; policy drop \\; }; nft add rule inet wg_table input udp dport {{port}} accept; nft add chain inet wg_table forward { type filter hook forward priority 0 \\; policy drop \\; }; nft add rule inet wg_table forward iifname \"wg0\" accept; nft add rule inet wg_table forward oifname \"wg0\" accept;\n
- PostDown
nft delete table inet wg_table\n
If you don't have iptables loaded on your server, you could see many errors in the logs or in the UI. You can ignore them.
"},{"location":"examples/tutorials/podman/#restart-the-container","title":"Restart the Container","text":"Restart the container to apply the new hooks:
sudo systemctl restart wg-easy\n
"},{"location":"examples/tutorials/traefik/","title":"Traefik","text":"TODO
"}]}
\ No newline at end of file