Skip to content

Commit 4c4a754

Browse files
committed
Updated docs
1 parent dbdb9fd commit 4c4a754

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ Ensure any volume directories on the host are owned by the same user you specify
9595

9696
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
9797

98-
```
99-
$ id username
100-
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
98+
``` bash
99+
id username
100+
# uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
101101
```
102102

103103
## Configuration
@@ -118,9 +118,9 @@ In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as bel
118118
If you are new to containers please see rather [Detailed first setup guide](docs/SetupGuide.md), because it includes more detailed description.
119119

120120
1. Init configuration directory with initial config files:
121-
121+
122122
``` bash
123-
docker run -it --rm --cap-add NET_ADMIN -v </path/to/config>:/config slocomptech/openvpn:latest bash
123+
docker run -it --rm --cap-add NET_ADMIN -e SKIP_APP=true -v </path/to/config>:/config slocomptech/openvpn:latest bash
124124
```
125125

126126
2. Edit `vars` file. (See [docs](https://github.com/OpenVPN/easy-rsa/blob/master/doc/EasyRSA-Advanced.md))
@@ -130,10 +130,10 @@ If you are new to containers please see rather [Detailed first setup guide](docs
130130
ovpn pki init [nopass] # Inits PKI
131131
```
132132

133-
4. Setup OpenVPN config based on example `basic_nat` with configuration wizard or put your config in `/config/openvpn/openvpn.conf`:
133+
4. Setup OpenVPN config based on example `basic` with configuration wizard or put your config in `/config/openvpn/openvpn.conf`:
134134

135135
``` bash
136-
ovpn example basic_nat
136+
ovpn example basic
137137
#Out interface [eth0]: <interface connected to the Internet>
138138
#Protocol udp, tcp, udp6, tcp6 [udp]:
139139
#VPN network [10.0.0.0]:
@@ -150,6 +150,8 @@ If you are new to containers please see rather [Detailed first setup guide](docs
150150
``` bash
151151
# Generates client certificates (put in client-confs directory)
152152
ovpn subject add <name> [nopass]
153+
# Generate .ovpn manually (generated in client-configs)
154+
ovpn subject gen-ovpn <name>
153155
```
154156

155157
8. Exit container with `exit`, then it will destroy itself.
@@ -200,4 +202,6 @@ See [CHANGELOG](CHANGELOG.md)
200202
- [EasyRSA](https://github.com/OpenVPN/easy-rsa/blob/master/doc/EasyRSA-Readme.md)
201203
- [EasyRSA vars](https://github.com/OpenVPN/easy-rsa/blob/master/doc/EasyRSA-Advanced.md)
202204
- [OpenVPN](https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage)
205+
- [OpenVPN getting started](https://community.openvpn.net/openvpn/wiki/GettingStartedwithOVPN)
206+
- [OpenVPN how to](https://openvpn.net/community-resources/how-to/)
203207
- [s6](https://skarnet.org/software/s6)

docs/SetupGuide.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ This is simple setup guide to help you get started. It uses the simplest configu
88

99
``` bash
1010
# Starts temporary container, soo you will be able to generate intial config files and opens bash shell in container
11-
docker run -it --rm --cap-add NET_ADMIN -v </path/to/config>:/config slocomptech/openvpn:latest bash
11+
docker run -it --rm --cap-add NET_ADMIN -e SKIP_APP=true -v </path/to/config>:/config slocomptech/openvpn:latest bash
1212
```
13-
14-
2. At this point you will have bash shell which runs in container. Now run following commands to **setup your PKI**:
13+
2. Edit `vars` file
14+
3. At this point you will have bash shell which runs in container. Now run following commands to **setup your PKI**:
1515

1616
``` bash
1717
ovpn pki init [nopass] # Inits PKI
@@ -91,10 +91,10 @@ This is simple setup guide to help you get started. It uses the simplest configu
9191

9292
**Note:** You can generate PKI without password, just use `nopass` option.
9393

94-
3. Setup OpenVPN config based on example `basic_nat` with configuration wizard:
94+
4. Setup OpenVPN config based on example `basic` with configuration wizard:
9595

9696
``` bash
97-
ovpn enconf basic_nat
97+
ovpn enconf basic
9898
#Out interface [eth0]: <interface connected to the Internet>
9999
#Protocol udp, tcp, udp6, tcp6 [udp]:
100100
#VPN network [10.0.0.0]:
@@ -105,27 +105,29 @@ This is simple setup guide to help you get started. It uses the simplest configu
105105
```
106106

107107
**Note:** If you are using this container for production use your Public IP (if you don't know it, check with `whatsmyip` website and make sure it is **static**, for testing purposes at home, you can use local IP).
108+
5. Generate server certificate
108109

109-
4. Enable **port forwarding** on your router so OpenVPN server will be accessible from the internet.
110-
5. Add clients to your server
110+
``` bash
111+
ovpn subject add server server [nopass] # First server is name
112+
```
113+
114+
6. Enable **port forwarding** on your router so OpenVPN server will be accessible from the internet.
115+
7. Add clients to your server
111116

112117
``` bash
113118
# Generates client certificates
114-
ovpn client add <name> [nopass]
115-
116-
# Generates client config file and saves it to /config/tmp
117-
ovpn client ovpn <name>
119+
ovpn subject add <name> client [nopass]
118120

119-
# OR BETTER SOLLUTION: Run outside container
120-
docker exec -it <container name> ovpn client ovpnp <name> > <config file>.ovpn
121+
# Manually generates client config file and saves it to /config/client-configs
122+
ovpn subject gen-ovpn <name>
121123
```
122124

123125
**Note:** Client config files MUST be transported to your devices via **SECURE** method such as USB (email is considered **INSECURE**).
124126

125-
5. Exit container with `exit`, then it will destroy itself.
126-
6. Now you can create config file outside container, mentioned above.
127-
7. If you need to access bash shell again (to add another client after server was started) just use `docker exec -it <container name> bash`.
128-
8. Start container using normal command:
127+
8. Exit container with `exit`, then it will destroy itself.
128+
9. Now you can create config file outside container, mentioned above.
129+
10. If you need to access bash shell again (to add another client after server was started) just use `docker exec -it <container name> bash`.
130+
11. Start container using normal command:
129131

130132
``` bash
131133
docker run \

0 commit comments

Comments
 (0)