Changes for page Configuring a VPS machine from scratch
Last modified by Alexandru Pentilescu on 2024/07/22 21:37
From version 10.1
edited by Alexandru Pentilescu
on 2024/07/22 21:05
on 2024/07/22 21:05
Change comment:
There is no comment for this version
To version 3.2
edited by Alexandru Pentilescu
on 2022/11/13 22:05
on 2022/11/13 22:05
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -8,11 +8,6 @@ 8 8 ))) 9 9 ))) 10 10 11 -(% class="col-xs-12 col-sm-4" %) 12 -((( 13 -{{box title="**Contents**"}}{{toc /}}{{/box}} 14 -))) 15 - 16 16 (% class="row" %) 17 17 ((( 18 18 (% class="col-xs-12 col-sm-8" %) ... ... @@ -45,28 +45,6 @@ 45 45 Ultimately, the argument for or against using root access is mostly a philosophical one, rather than a technical one. There is no right or wrong answer to this question. Rather, each answer brings its own advantages and disadvantages to the table. What really matters is what you're more comfortable with using in the end. 46 46 Moreover, using a sudoers user rather than root is not inherently a guarantee for system safety either and should not be taken as a leeway for running suspicious executable files from the internet either, as privilege escalation bugs have existed in the Linux kernel since its own inception. 47 47 48 -= Install the necessary utilities = 49 -Install docker, postfix and nginx, which are all utilities you will be using consistently, from this point on. 50 - 51 -Afterwards, install the certbot-plugin-gandi plugin to enable automatic certificate renewals using gandi. This may require you to install pip3 as well, first. 52 - 53 -One the plugin is installed, just do: 54 - 55 -{{code language="bash"}} 56 -certbot certonly --authenticator dns-gandi --dns-gandi-credentials /etc/letsencrypt/gandi/gandi.ini -n -d 'transistor.one,*.transistor.one' --agree-tos --email=alexandru.pentilescu@disroot.org 57 -{{/code}} 58 - 59 -The contents of /etc/lets/encrypt/gandi/gandi.ini should look like the following: 60 -# live dns v5 api key 61 -dns_gandi_api_key=<gandi_api_key> 62 - 63 -The <gandi_api_key> token should be replaced with the actual API key generated from the Gandi website for your account. 64 - 65 -= Setting up an SMTP server = 66 -This will be required for all the future things you will be doing on the server. 67 - 68 -Moreover, this is not an easy task and will be a little time consuming. Please consult the documentation [[here>>https://wiki.transistor.one/bin/view/Guides/How%20to%20setup%20a%20postfix%20SMTP%20server/]] 69 - 70 70 = Setting up automatic updates = 71 71 72 72 System updates are a necessity for modern day operating systems and on linux, especially, there's a constant need to run such updates regurarly to avoid the risk of running vulnerable software that can be exploited by rogue malware. ... ... @@ -134,36 +134,18 @@ 134 134 135 135 This instructs the package to reboot the whole system, automatically, whenever an update requires it, the next time the system clock reaches this specific configured time. I set mine to reboot the system, whenever an update requires it, at 2AM. You may change the time to whichever fits your needs. 136 136 137 -= Installingdocker =110 +== Sub-paragraph == 138 138 139 - Docker isalmost anirreplaceablepiece ofsoftware thatwillbecriticaltoyourwhole infrastructure.Dockereedsto beinstalled onthe systemproperly.Inorderodoso,pleasefollowtheguide[[here>>https://docs.docker.com/engine/install/ubuntu/]]112 +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 140 140 141 -= Force postfix tobind to non-local IP addresses on start=114 +== Sub-paragraph == 142 142 143 -If we plan on using our SMPT server to relay emails coming from our docker containers, we will have to force postfix to bind to an IP address that's different from localhost. This needs to be done because, if we configure postfix to only bind to localhost, it will effectively be unreachable to our docker containers and they will not be able to use it as a relay. 144 -In order to allow for postfix to bind to non-local addresses, we have to add the following configuration file /etc/sysctl.d/80-network.conf with the following contents: 145 - 146 -{{code language="ini"}} 147 -net.ipv4.ip_nonlocal_bind = 1 148 -net.ipv6.ip_nonlocal_bind = 1 149 -{{/code}} 150 - 151 -Honestly, the "ipv6" line is unnecessary for our purposes, but I'm adding it anyway. After this file is added, after reboot, postfix will be able to bind itself to nonlocal addresses successfully. 152 - 153 -= Installing Grafana and all the other necessary components = 154 -System monitoring is genuinely important. As such, having some pretty graphs to look at that monitor various stats of the server can be quite useful. 155 -To this end, we will set up Grafana as our graphs dashboard where we will visualize all of the relevant metrics of the system, as well as Prometheus as the data aggregator and Node Exporter, as the data collector. 156 - 157 -Let's get started! 158 - 159 -== Installing node exporter == 160 -Use wget or any other utility to grab the latest version of node exporter. 161 - 162 -{{code language="bash"}} 163 -wget https://github.com/prometheus/node_exporter/releases/download/v0.15.2/node_exporter-0.15.2.linux-amd64.tar.gz 164 -{{/code}} 165 - 116 +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 166 166 ))) 167 167 168 168 169 - 120 +(% class="col-xs-12 col-sm-4" %) 121 +((( 122 +{{box title="**Contents**"}}{{toc /}}{{/box}} 123 +))) 124 +)))