@@ -15,23 +15,29 @@ are harmless for those not using IPv6.
15
15
To use and enable automatic start by systemd:
16
16
17
17
1 . Create a Docker volume container named ` ovpn-data-NAME ` where ` NAME ` is the
18
- user's choice to describe the use of the container. In the example
19
- configuration given in the [ README] ( /README.md ) ` NAME=data ` .
20
- 2 . Initialize the data container according to the [ docker-openvpn
21
- README] ( /README.md ) , but don't start the container. Stop the Docker
22
- container if started.
18
+ user's choice to describe the use of the container. In this example
19
+ configuration, ` NAME=example ` .
20
+
21
+ OVPN_DATA="ovpn-data-example"
22
+ docker volume create --name $OVPN_DATA
23
+
24
+ 2 . Initialize the data container, but don't start the container :
25
+
26
+ docker run -v $OVPN_DATA:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
27
+ docker run -v $OVPN_DATA:/etc/openvpn --rm -it kylemanna/openvpn ovpn_initpki
28
+
23
29
3 . Download the
[ [email protected] ] ( https://raw.githubusercontent.com/kylemanna/docker-openvpn/master/init/docker-openvpn%40.service )
24
30
file to ` /etc/systemd/system ` :
25
31
26
32
curl -L https://raw.githubusercontent.com/kylemanna/docker-openvpn/master/init/docker-openvpn%40.service | sudo tee /etc/systemd/system/[email protected]
27
33
28
34
4 . Enable and start the service with:
29
35
30
- systemctl enable --now docker-openvpn@NAME .service
36
+ systemctl enable --now docker-openvpn@example .service
31
37
32
38
5 . Verify service start-up with:
33
39
34
- systemctl status docker-openvpn@NAME .service
35
- journalctl --unit docker-openvpn@NAME .service
40
+ systemctl status docker-openvpn@example .service
41
+ journalctl --unit docker-openvpn@example .service
36
42
37
43
For more information, see the [ systemd manual pages] ( https://www.freedesktop.org/software/systemd/man/index.html ) .
0 commit comments