Skip to content

Commit ee14907

Browse files
committed
fix typos in standalone package based installation tutorial
1 parent 24e6e1d commit ee14907

File tree

1 file changed

+36
-31
lines changed

1 file changed

+36
-31
lines changed

admin-and-features/setting-up-your-instance/standalone-package-based-installation.md

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ We will cover system requirements, additional dependencies, installation steps,
1717
Examples will be made by using [**Debian 12**](https://www.debian.org/releases/stable/releasenotes) **and Ubuntu based system.**
1818

1919
{% hint style="info" %}
20-
We also provide **RPM packages** -the procedure is similar to the one for installing DEB packages. If you need help installing RPM packages[ this guide offers help.](https://phoenixnap.com/kb/how-to-install-rpm-file-centos-linux)
20+
We also provide **RPM packages** - the procedure is similar to the one for installing DEB packages. If you need help installing RPM packages[ this guide offers help.](https://phoenixnap.com/kb/how-to-install-rpm-file-centos-linux)
2121
{% endhint %}
2222

2323
### Hardware Requirements
@@ -51,7 +51,7 @@ Defguard core uses PostgreSQL database, so if you do not have installed and conf
5151
First of all, install postgresql:
5252

5353
```
54-
# apt install postgresql
54+
apt install postgresql
5555
```
5656

5757
Now you can launch a default user and create a new superuser for your database. We create user, password and database with name `defguard`, beacuse this is by default in `/etc/defguard/core.conf`, you can change whatever you want.
@@ -65,33 +65,36 @@ postgres=# CREATE DATABASE defguard;
6565
After creating a user and database we can connect our new user to this database. To make it easier to connect now and then, we could try to add auth file
6666

6767
```
68-
# echo 'localhost:5432:defguard:defguard:defguard' >> ~/.pgpass # <hostname>:<port>:<database>:<user>:<password>
68+
# echo 'localhost:5432:defguard:defguard:defguard' >> ~/.pgpass
6969
# chmod 600 ~/.pgpass
7070
# psql -d defguard -h localhost -U defguard
71-
defguard=# exit # for now we can leave it, the purpose of this connection is to verify your user is able to communicate with database
71+
defguard=# exit
7272
```
7373

74+
- we created `.pgpass` file that consist of `<hostname>:<port>:<database>:<user>:<password>`
75+
- we connected into the `defguard` database to verify `defguard` user can communicate with the database
76+
7477
#### NGINX
7578

7679
To expose our services in the server we need to configure a reverse proxy server. For this we will use nginx web server with ssl certificates for enabling https protocol.
7780

7881
To get started, we need to install:
7982

8083
```
81-
# apt install nginx certbot
84+
apt install nginx certbot
8285
```
8386

8487
Enable nginx service
8588

8689
```
87-
# systemctl enable nginx.service
88-
# systemctl start nginx.service
90+
systemctl enable nginx.service
91+
systemctl start nginx.service
8992
```
9093

9194
Disable all default domains:
9295

9396
```
94-
# unlink /etc/ngins/sites-enabled/default
97+
unlink /etc/nginx/sites-enabled/default
9598
```
9699

97100
## Installing packages
@@ -101,25 +104,25 @@ Disable all default domains:
101104
Navigate to [core repository release](https://github.com/DefGuard/defguard/releases) and choose version of core package that you want to obtain that has debian package and then swap `<version>` in the following command:
102105

103106
```
104-
# wget https://github.com/DefGuard/defguard/releases/download/<version>/defguard-<version>-x86_64-unknown-linux-gnu.deb
107+
wget https://github.com/DefGuard/defguard/releases/download/<version>/defguard-<version>-x86_64-unknown-linux-gnu.deb
105108
```
106109

107110
Example:
108111

109112
```
110-
# wget https://github.com/DefGuard/defguard/releases/download/v0.11.0/defguard-0.11.0-x86_64-unknown-linux-gnu.deb
113+
wget https://github.com/DefGuard/defguard/releases/download/v0.11.0/defguard-0.11.0-x86_64-unknown-linux-gnu.deb
111114
```
112115

113116
You can also download directly from the Github realse page, but please note that you should know the path where this could be storead after downloading. Once the package is downloaded, install it using dpkg:
114117

115118
```
116-
# dpkg -i <path_to_package>/defguard-<version>-x86_64-unknown-linux-gnu.deb
119+
dpkg -i <path_to_package>/defguard-<version>-x86_64-unknown-linux-gnu.deb
117120
```
118121

119122
Example:
120123

121124
```
122-
# dpkg -i defguard-0.11.0-x86_64-unknown-linux-gnu.deb
125+
dpkg -i defguard-0.11.0-x86_64-unknown-linux-gnu.deb
123126
```
124127

125128
You can check is core installed properly:
@@ -146,13 +149,13 @@ Example:
146149
You can also download directly from the Github realse page, but please note that you should know the path where this could be storead after downloading. Once the package is downloaded, install it using dpkg:
147150

148151
```
149-
# dpkg -i <path_to_package>/defguard-gateway_<version>_x86_64-unknown-linux-gnu.deb
152+
dpkg -i <path_to_package>/defguard-gateway_<version>_x86_64-unknown-linux-gnu.deb
150153
```
151154

152155
Example:
153156

154157
```
155-
# dpkg -i defguard-gateway_0.7.0_x86_64-unknown-linux-gnu.deb
158+
dpkg -i defguard-gateway_0.7.0_x86_64-unknown-linux-gnu.deb
156159
```
157160

158161
You can check is core installed properly:
@@ -167,25 +170,25 @@ defguard-gateway 0.7.0
167170
Navigate to [proxy repository release](https://github.com/DefGuard/proxy/releases) and choose version of core package that you want to obtain that has debian package and then swap `<version>` in the following command:
168171

169172
```
170-
# wget https://github.com/DefGuard/proxy/releases/download/<version>>/defguard-proxy-<version>-x86_64-unknown-linux-gnu.deb
173+
wget https://github.com/DefGuard/proxy/releases/download/<version>>/defguard-proxy-<version>-x86_64-unknown-linux-gnu.deb
171174
```
172175

173176
Example:
174177

175178
```
176-
# wget https://github.com/DefGuard/proxy/releases/download/v0.5.0/defguard-proxy-0.5.0-x86_64-unknown-linux-gnu.deb
179+
wget https://github.com/DefGuard/proxy/releases/download/v0.5.0/defguard-proxy-0.5.0-x86_64-unknown-linux-gnu.deb
177180
```
178181

179182
You can also download directly from the Github realse page, but please note that you should know the path where this could be storead after downloading. Once the package is downloaded, install it using dpkg:
180183

181184
```
182-
# dpkg -i <path_to_package>/defguard-proxy-<version>-x86_64-unknown-linux-gnu.deb
185+
dpkg -i <path_to_package>/defguard-proxy-<version>-x86_64-unknown-linux-gnu.deb
183186
```
184187

185188
Example:
186189

187190
```
188-
# dpkg -i defguard-proxy-0.5.0-x86_64-unknown-linux-gnu.deb
191+
dpkg -i defguard-proxy-0.5.0-x86_64-unknown-linux-gnu.deb
189192
```
190193

191194
You can check is core installed properly:
@@ -202,12 +205,14 @@ defguard-proxy 0.5.0
202205
Before we run defguard and configure the reverse proxy, first let's prepare SSL certificates that will be used by the NGINX service. We will generate a certificate for two domains we use in this example: _my-service.defguard.net_ and _enroll.defguard.net_:
203206

204207
```
205-
# certbot certonly --non-interactive --agree-tos --standalone --email [email protected] -d my-server.defguard.net -d enroll.defgurd.net
208+
certbot certonly --non-interactive --agree-tos --standalone --email [email protected] -d my-server.defguard.net -d enroll.defgurd.net
206209
```
207210

208211
Certbot will generate certificate in fullchain.pem and privkey.pem in path:
209212

210-
&#x20;`/etc/letsencrypt/live/my-server.defguard.net.`
213+
&#x20;`/etc/letsencrypt/live/my-server.defguard.net`
214+
215+
&#x20;`/etc/letsencrypt/live/enrolldefguard.net`
211216

212217
### Core - the control plain
213218

@@ -280,14 +285,14 @@ DATABASE_URL="postgresql://defguard:defguard@localhost/defguard"
280285
After changes, you can simply enable and start your defguard core service:
281286

282287
```
283-
# systemctl enable defguard.service
284-
# systemctl start defguard.service
288+
systemctl enable defguard.service
289+
systemctl start defguard.service
285290
```
286291

287292
To see logs, type journalctl command:
288293

289294
```
290-
# journalctl -u defguard.service
295+
# journalctl -u defguard.service | tail -n 50
291296
Jul 29 13:57:15 defguard-testing systemd[1]: Started defguard.service - defguard core service.
292297
Jul 29 13:57:15 defguard-testing defguard[2776504]: 2024-07-29T11:57:15.738420Z INFO defguard: Starting defguard
293298
Jul 29 13:57:15 defguard-testing defguard[2776504]: 2024-07-29T11:57:15.743079Z INFO defguard::db: Initializing DB pool
@@ -362,7 +367,7 @@ ln -s /etc/nginx/sites-available/my-server.defguard.net.conf /etc/nginx/sites-en
362367
Restart nginx.service to activated changes:
363368

364369
```
365-
# systemctl reload nginx.service
370+
systemctl reload nginx.service
366371
```
367372

368373
Test your domain on another terminal tab
@@ -471,8 +476,8 @@ Now we can run gateway service with configuration above:
471476

472477
```
473478
# systemctl enable defguard-gateway.service
474-
# systemctl start defgaurd-gateway.service
475-
# journalctl -u defguard-gateway.service
479+
# systemctl start defguard-gateway.service
480+
# journalctl -u defguard-gateway.service | tail -n 50
476481
[2024-07-27T16:37:56Z INFO defguard_gateway::gateway] Starting defguard gateway version 0.7.0 with configuration: Config { token: "***", name: Some("Gateway on server X"), grpc_url: "https://my-server.defguard.net:444/", userspace: false, grpc_ca: None, stats_period: 60, ifname: "wg0", pidfile: None, use_syslog: false, syslog_facility: "LOG_USER", syslog_socket: "/var/run/log", config_path: None, pre_up: None, post_up: None, pre_down: None, post_down: None, health_port: None }
477482
[2024-07-27T16:37:56Z INFO defguard_gateway::gateway] gRPC server connection setup done.
478483
[2024-07-27T16:37:56Z INFO defguard_wireguard_rs::wgapi_linux] Creating interface wg0
@@ -501,7 +506,7 @@ To run proxy service (for [remote onboarding & enrollment](../../help/enrollment
501506
```
502507
# systemctl enable defguard-proxy.service
503508
# systemctl start defguard-proxy.service
504-
# journalctl -u defguard-proxy.service
509+
# journalctl -u defguard-proxy.service | tail -n 50
505510
2024-07-27T16:53:58.584154Z INFO defguard_proxy::tracing: Tracing initialized
506511
2024-07-27T16:53:58.584233Z INFO defguard_proxy::http: Starting Defguard proxy server
507512
2024-07-27T16:53:58.584371Z INFO defguard_proxy::http: Skipping rate limiter setup
@@ -516,7 +521,7 @@ To run proxy service (for [remote onboarding & enrollment](../../help/enrollment
516521
Please note that [we already have issued the enrollemnt domain SSL certificate](standalone-package-based-installation.md#generating-ssl-certificates).
517522
{% endhint %}
518523

519-
Create config file `/etc/nginx/site-available/enroll.defguard.net.conf`, example config file for _enroll.defguard.net_ should look like this:
524+
Create config file `/etc/nginx/sites-available/enroll.defguard.net.conf`, example config file for _enroll.defguard.net_ should look like this:
520525

521526
```
522527
upstream defguard-proxy {
@@ -582,8 +587,8 @@ server {
582587
Enable configuration and restart nginx:
583588

584589
```
585-
# ln -s /etc/nginx/sites-available/enroll.defguard.conf /etc/nginx/sites-enabled/enroll.defguard.conf
586-
# systemctl restart nginx.service
590+
ln -s /etc/nginx/sites-available/enroll.defguard.conf /etc/nginx/sites-enabled/enroll.defguard.conf
591+
systemctl restart nginx.service
587592
```
588593

589594
#### Enabling Proxy service in the Core
@@ -651,7 +656,7 @@ DATABASE_URL="postgresql://defguard:defguard@localhost/defguard"
651656
Reload changes in `/etc/defguarc/core.conf`
652657

653658
```
654-
# systemctl restart defguard.service
659+
systemctl restart defguard.service
655660
```
656661

657662
{% hint style="success" %}

0 commit comments

Comments
 (0)