mirror of
https://github.com/zyclonite/zerotier-docker.git
synced 2025-02-21 03:00:48 +01:00
update documentation to describe router-mode environment variables
Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
This commit is contained in:
parent
226cf83004
commit
7f6239fae4
72
README.md
72
README.md
@ -41,6 +41,78 @@ It is the implementation of the local network router [paper](https://zerotier.at
|
|||||||
|
|
||||||
That will start the zero-one, establish connection and build the NAT+router once the `zt` interface is up.
|
That will start the zero-one, establish connection and build the NAT+router once the `zt` interface is up.
|
||||||
|
|
||||||
|
##### Environment variables
|
||||||
|
|
||||||
|
The following environment variables are supported:
|
||||||
|
|
||||||
|
* `TZ` – timezone support. Example:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
TZ=Australia/Sydney
|
||||||
|
```
|
||||||
|
|
||||||
|
Defaults to `Etc/UTC` if omitted.
|
||||||
|
|
||||||
|
* `PUID` + `PGID` – user and group IDs for ownership of persistent store. Example:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
PUID=1000
|
||||||
|
PGID=1000
|
||||||
|
```
|
||||||
|
|
||||||
|
If omitted, `PUID` defaults to user ID 999, while `PGID` defaults to group ID 994. These variables are only used to ensure consistent ownership on each launch. They do not affect how the container *runs.* Absent a `user:` directive, the container runs as root and does not downgrade its privileges.
|
||||||
|
|
||||||
|
* `ZEROTIER_ONE_LOCAL_PHYS` - controls which physical interfaces participate in network address translation (NAT). Examples:
|
||||||
|
|
||||||
|
- Use only the physical Ethernet interface (this is also the default of the variable is omitted):
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
ZEROTIER_ONE_LOCAL_PHYS=eth0
|
||||||
|
```
|
||||||
|
|
||||||
|
- If your computer only has WiFi active:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
ZEROTIER_ONE_LOCAL_PHYS=wlan0
|
||||||
|
```
|
||||||
|
|
||||||
|
- If your computer has both Ethernet and WiFi interfaces active and you wish to be able to route through each interface:
|
||||||
|
|
||||||
|
- if using `docker run`:
|
||||||
|
|
||||||
|
``` console
|
||||||
|
--env ZEROTIER_ONE_LOCAL_PHYS="eth0 wlan0"
|
||||||
|
```
|
||||||
|
|
||||||
|
- if using `docker-compose`:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
environment:
|
||||||
|
- ZEROTIER_ONE_LOCAL_PHYS=eth0 wlan0
|
||||||
|
```
|
||||||
|
|
||||||
|
* `ZEROTIER_ONE_USE_IPTABLES_NFT` - controls the command the container uses to set up NAT forwarding. Example:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
ZEROTIER_ONE_USE_IPTABLES_NFT=true
|
||||||
|
```
|
||||||
|
|
||||||
|
Defaults to `false` if omitted. Try `true` if NAT does not seem to be working.
|
||||||
|
|
||||||
|
* `ZEROTIER_ONE_NETWORK_ID` – auto-join network on first launch. Example:
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
ZEROTIER_ONE_NETWORK_ID=565758596a6b6c44
|
||||||
|
```
|
||||||
|
|
||||||
|
This variable is only effective on first launch. There is no default if it is omitted. It is the equivalent of running the following command after the container first starts:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker exec zerotier zerotier-cli join 565758596a6b6c44
|
||||||
|
```
|
||||||
|
|
||||||
|
It does not matter whether you use this environment variable or the `join` command, you still need to authorize the computer in ZeroTier Central.
|
||||||
|
|
||||||
#### Source
|
#### Source
|
||||||
|
|
||||||
https://github.com/zyclonite/zerotier-docker
|
https://github.com/zyclonite/zerotier-docker
|
||||||
|
Loading…
Reference in New Issue
Block a user