wg-access-server

by chynten

Helm chartv0.4.0App v0.4.6

A Wireguard VPN Access Server

About this chart

Installing the Chart

To install the chart with the release name my-release:

$ helm install my-release --repo https://place1.github.io/wg-access-server wg-access-server

The command deploys wg-access-server on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

By default an in-memory wireguard private key will be generated and devices will not persist between pod restarts.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Example values.yaml

config:
  wireguard:
    externalHost: "<loadbalancer-ip>"

# wg access server is an http server without TLS. Exposing it via a loadbalancer is NOT secure!
# Uncomment the following section only if you are running on private network or simple testing.
# A much better option would be TLS terminating ingress controller or reverse-proxy.
# web:
#   service:
#     type: "LoadBalancer"
#     loadBalancerIP: "<loadbalancer-ip>"

wireguard:
  config:
    privateKey: "<wireguard-private-key>"
  service:
    type: "LoadBalancer"
    loadBalancerIP: "<loadbalancer-ip>"

persistence:
  enabled: true

ingress:
  enabled: true
  hosts: ["vpn.example.com"]
  tls:
    - hosts: ["vpn.example.com"]
      secretName: "tls-wg-access-server"

All Configuration

KeyTypeDefaultDescription
configobject{}inline wg-access-server config (config.yaml)
web.service.typestring"ClusterIP"
wireguard.config.privateKeystring""A wireguard private key. You can generate one using $ wg genkey
wireguard.service.typestring"ClusterIP"
ingress.enabledboolfalse
ingress.hostsstringnil
ingress.tlslist[]
ingress.annotationsobject{}
persistence.enabledboolfalse
persistence.existingClaimstring""Use existing PVC claim for persistence instead
persistence.sizestring"100Mi"
persistence.subPathstring""
persistence.annotationsobject{}
persistence.accessModes[0]string"ReadWriteOnce"
strategy.typestring"Recreate"
resourcesobject{}pod cpu/memory resource requests and limits
nameOverridestring""
fullnameOverridestring""
affinityobject{}
nodeSelectorobject{}
tolerationslist[]
image.pullPolicystring"IfNotPresent"
image.repositorystring"place1/wg-access-server"
imagePullSecretslist[]

Deploy wg-access-server with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has wg-access-server on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartwg-access-server is pinned at v0.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply