From b9a9617e8a019a2abb47f19b0195bdcdb0abebb4 Mon Sep 17 00:00:00 2001 From: hiddej Date: Sun, 4 Jul 2021 23:44:39 +0200 Subject: test1 --- selfhost.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 selfhost.html diff --git a/selfhost.html b/selfhost.html new file mode 100644 index 0000000..f75c5f0 --- /dev/null +++ b/selfhost.html @@ -0,0 +1,21 @@ + + + + Self hosting – LandChad.net + + + + + + + +

Self hosting

+ +
+

Choosing a server

+

Test test test

+

+
+ + + -- cgit v1.2.3 From c71d3a99afb105d63f7da88c094c08cd26489ed0 Mon Sep 17 00:00:00 2001 From: hiddej Date: Mon, 5 Jul 2021 01:04:48 +0200 Subject: first texts --- selfhost.html | 21 ---------------- selfhosting.html | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 21 deletions(-) delete mode 100644 selfhost.html create mode 100644 selfhosting.html diff --git a/selfhost.html b/selfhost.html deleted file mode 100644 index f75c5f0..0000000 --- a/selfhost.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - Self hosting – LandChad.net - - - - - - - -

Self hosting

- -
-

Choosing a server

-

Test test test

-

-
-
LandChad.net
Because Everyone should be an Internet LandChad.
  • chad
  • RSS
  • BTC
  • XMR
  • Github
  • - - diff --git a/selfhosting.html b/selfhosting.html new file mode 100644 index 0000000..43084d7 --- /dev/null +++ b/selfhosting.html @@ -0,0 +1,77 @@ + + + + Self hosting – LandChad.net + + + + + + + +

    Self hosting

    + +
    +

    Introduction

    +

    When you have a(n old) computer lying around, and you have cheap electricity and a good internet connection, self hosting might be a good option for you.

    +

    Why would you choose selfhosting?

    +
      +
    • + You have control over the hardware, and you can upgrade your server in the future. For example: if you host a file server and your hard drive goes full, you can simply add another hard drive or upgrade it. +
    • +
    • + No bandwith limits, storage limits, etc. (some VPSes have this) +
    • +
    • + It can be cheaper than using a VPS. This is only the case if you got the server for really cheap and your electricity is cheap. +
    • +
    • + You can have a media server to consoom your content (for example with Jellyfin). You can technically do this on a VPS, but that will be more expensive than self hosting. If you have a media server, you can stream media from your server to more devices. (I recommend just downloading it on your device, but if you have multiple devices, this could be a good solution) +
    • +
    + +

    Hardware

    + +

    What kind of hardware should you choose?

    +

    If you pay your own electricity bill, power consumption is a big factor. Most old laptop computers are ideal in the sense that they don't use a lot of power, and if the battery still works, you have a built-in UPS! The bad thing is, is that most old laptop computers aren't that powerful, and they lack in upgradability. (you shouldn't really be using anything older than 2006, and I recommend at least a power equivalant of a Core 2 CPU) +

    +

    + If you can find an energy efficient desktop (under 100W), that is a great option. They are pretty upgradable and they don't use a lot of power. They can also be pretty cheap, but old laptops are usually cheaper. If you can afford new hardware, and are willing to build a PC, you can find really power effecient CPU/motherboard combos, and they can be cheap. For example the Celeron J3060. I recommend a low wattage power supply or an effecient one for these kinds of builds. +

    +

    + Of course, if you don't pay your electricity bill or cost is not a problem for you, you can use just about any old desktop. +

    +

    Usecases

    +

    Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle transcoding video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example the Athlon 200GE or 3000G are good and efficient choices for these builds. +

    +

    Getting started

    +

    Installing Debian

    +

    Once you have the machine, you can install the OS. I recommend Debian, as all of the guides on this website are Debian specific. Debian just werks as a server OS.

    +

    +

    You'll need to burn a Debian install image onto a USB flash drive or a CD. You can download the image here, and you can also find information on how to burn the image onto a USB flash drive or CD there. +

    +

    +While installing, do not install any desktop environment, but do install the SSH server. +

    +

    Port forwaring

    +

    Every time you are going to use a port, you need to forward it. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just port forwarding, differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your IP address is, is ifconfig. This shows a lot of network info, but it will also show your local IP address needed for port forwarding. +

    +

    Basic ports:

    +
      +
    • + SSH: port 22 (open this port if you want to admin your server outside your network) +
    • +
    • + HTTP: port 80 (open this port if you want basic webserver functionality) +
    • +
    • + HTTPS: port 443 (you should open this port if you are setting up a webserver) +
    • + +

      Static or dynamic IP address

      + + +
    +
    LandChad.net
    Because Everyone should be an Internet LandChad.
  • chad
  • RSS
  • BTC
  • XMR
  • Github
  • + + -- cgit v1.2.3 From 65152d3f99500500669c28cb279bd27f9984e7fb Mon Sep 17 00:00:00 2001 From: hiddej Date: Mon, 5 Jul 2021 01:06:26 +0200 Subject: first texts --- selfhosting.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfhosting.html b/selfhosting.html index 43084d7..92a6bf4 100644 --- a/selfhosting.html +++ b/selfhosting.html @@ -65,8 +65,9 @@ While installing, do not install any desktop environment, but do install the SSH HTTP: port 80 (open this port if you want basic webserver functionality)
  • - HTTPS: port 443 (you should open this port if you are setting up a webserver) + HTTPS: port 443 (you should open this port if you are setting up a webserver because encryption)
  • +

    Static or dynamic IP address

    -- cgit v1.2.3 From 4cc656f18033868c54657f9eaf77a34a0f06298b Mon Sep 17 00:00:00 2001 From: hidde-j <70572982+hidde-j@users.noreply.github.com> Date: Mon, 5 Jul 2021 14:12:04 +0200 Subject: finalize --- selfhosting.html | 182 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 104 insertions(+), 78 deletions(-) diff --git a/selfhosting.html b/selfhosting.html index 92a6bf4..67f3de7 100644 --- a/selfhosting.html +++ b/selfhosting.html @@ -1,78 +1,104 @@ - - - - Self hosting – LandChad.net - - - - - - - -

    Self hosting

    - -
    -

    Introduction

    -

    When you have a(n old) computer lying around, and you have cheap electricity and a good internet connection, self hosting might be a good option for you.

    -

    Why would you choose selfhosting?

    -
      -
    • - You have control over the hardware, and you can upgrade your server in the future. For example: if you host a file server and your hard drive goes full, you can simply add another hard drive or upgrade it. -
    • -
    • - No bandwith limits, storage limits, etc. (some VPSes have this) -
    • -
    • - It can be cheaper than using a VPS. This is only the case if you got the server for really cheap and your electricity is cheap. -
    • -
    • - You can have a media server to consoom your content (for example with Jellyfin). You can technically do this on a VPS, but that will be more expensive than self hosting. If you have a media server, you can stream media from your server to more devices. (I recommend just downloading it on your device, but if you have multiple devices, this could be a good solution) -
    • -
    - -

    Hardware

    - -

    What kind of hardware should you choose?

    -

    If you pay your own electricity bill, power consumption is a big factor. Most old laptop computers are ideal in the sense that they don't use a lot of power, and if the battery still works, you have a built-in UPS! The bad thing is, is that most old laptop computers aren't that powerful, and they lack in upgradability. (you shouldn't really be using anything older than 2006, and I recommend at least a power equivalant of a Core 2 CPU) -

    -

    - If you can find an energy efficient desktop (under 100W), that is a great option. They are pretty upgradable and they don't use a lot of power. They can also be pretty cheap, but old laptops are usually cheaper. If you can afford new hardware, and are willing to build a PC, you can find really power effecient CPU/motherboard combos, and they can be cheap. For example the Celeron J3060. I recommend a low wattage power supply or an effecient one for these kinds of builds. -

    -

    - Of course, if you don't pay your electricity bill or cost is not a problem for you, you can use just about any old desktop. -

    -

    Usecases

    -

    Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle transcoding video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example the Athlon 200GE or 3000G are good and efficient choices for these builds. -

    -

    Getting started

    -

    Installing Debian

    -

    Once you have the machine, you can install the OS. I recommend Debian, as all of the guides on this website are Debian specific. Debian just werks as a server OS.

    -

    -

    You'll need to burn a Debian install image onto a USB flash drive or a CD. You can download the image here, and you can also find information on how to burn the image onto a USB flash drive or CD there. -

    -

    -While installing, do not install any desktop environment, but do install the SSH server. -

    -

    Port forwaring

    -

    Every time you are going to use a port, you need to forward it. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just port forwarding, differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your IP address is, is ifconfig. This shows a lot of network info, but it will also show your local IP address needed for port forwarding. -

    -

    Basic ports:

    -
      -
    • - SSH: port 22 (open this port if you want to admin your server outside your network) -
    • -
    • - HTTP: port 80 (open this port if you want basic webserver functionality) -
    • -
    • - HTTPS: port 443 (you should open this port if you are setting up a webserver because encryption) -
    • -
    - -

    Static or dynamic IP address

    - - -
    -
    LandChad.net
    Because Everyone should be an Internet LandChad.
  • chad
  • RSS
  • BTC
  • XMR
  • Github
  • - - + + + + Self hosting – LandChad.net + + + + + + + +

    Self hosting

    + +
    +

    Introduction

    +

    When you have a(n old) computer lying around, and you have cheap electricity and a good internet connection, self hosting might be a good option for you.

    +

    Why would you choose selfhosting?

    +
      +
    • + You have control over the hardware, and you can upgrade your server in the future. For example: if you host a file server and your hard drive goes full, you can simply add another hard drive or upgrade it. +
    • +
    • + No bandwith limits, storage limits, etc. (some VPSes have this) +
    • +
    • + It can be cheaper than using a VPS. This is only the case if you got the server for really cheap and your electricity is cheap. +
    • +
    • + You can have a media server to consoom your content (for example with Jellyfin). You can technically do this on a VPS, but that will be more expensive than self hosting. If you have a media server, you can stream media from your server to more devices. (I recommend just downloading it on your device, but if you have multiple devices, this could be a good solution) +
    • +
    + +

    Hardware

    + +

    What kind of hardware should you choose?

    +

    If you pay your own electricity bill, power consumption is a big factor. Most old laptop computers are ideal in the sense that they don't use a lot of power, and if the battery still works, you have a built-in UPS! The bad thing is, is that most old laptop computers aren't that powerful, and they lack in upgradability. (you shouldn't really be using anything older than 2006, and I recommend at least a power equivalant of a Core 2 CPU) +

    +

    If you can find an energy efficient desktop (under 100W), that is a great option. They are pretty upgradable and they don't use a lot of power. They can also be pretty cheap, but old laptops are usually cheaper. If you can afford new hardware, and are willing to build a PC, you can find really power effecient CPU/motherboard combos, and they can be cheap. For example the Celeron J3060. I recommend a low wattage power supply or an effecient one for these kinds of builds.

    +

    Of course, if you don't pay your electricity bill or cost is not a problem for you, you can use just about any old desktop.

    +

    Usecases

    +

    Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle transcoding video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example the Athlon 200GE or 3000G are good and efficient choices for these builds. +

    +

    Getting started

    +

    Installing Debian

    +

    Once you have the machine, you can install the OS. I recommend Debian, as all of the guides on this website are Debian specific. Debian just werks as a server OS.

    +

    +

    You'll need to burn a Debian install image onto a USB flash drive or a CD. You can download the image here, and you can also find information on how to burn the image onto a USB flash drive or CD there. +

    +

    +While installing, do not install any desktop environment, but do install the SSH server. +

    +

    Port forwaring

    +

    Every time you are going to use a port, you need to forward it. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just port forwarding, differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your IP address is, is ifconfig. This shows a lot of network info, but it will also show your local IP address needed for port forwarding. +

    +

    Basic ports:

    +
      +
    • + SSH: port 22 (open this port if you want to admin your server outside your network) +
    • +
    • + HTTP: port 80 (open this port if you want basic webserver functionality) +
    • +
    • + HTTPS: port 443 (you should open this port if you are setting up a webserver because encryption) +
    • +
    + +

    Static or dynamic IP address

    +

    If you want to selfhost, make sure you have a static IP address, or you can change your dynamic IP address to a static one. Refer to your router settings, some ISPs will have options on this here. If you can't find anything on this, get in touch with your ISP.

    +

    Once you've made sure you have a static IP address, you can find out what the IP address is with various websites. You can use a search engine to easily find this out. Write this down as you'll need it later.

    +

    Once you're done, you can pretty much follow every guide on this website, the only difference is that you'll need to forward the ports you'll be using for the server.

    +

    Finding the ports you'll need to forward

    +

    If you need to know what port you'll need to forward, there's a command for that. Just type netstat -tulpn in your servers command line. If you want to see the name of the programs, you need to run it as a root user. You can do this by putting sudo before the command.

    +
    
    +Local Address                    State       PID/Program name
    +0.0.0.0:25                       LISTEN      887/master
    +0.0.0.0:1883                     LISTEN      22452/mosquitto
    +0.0.0.0:445                      LISTEN      798/smbd
    +0.0.0.0:993                      LISTEN      381/dovecot
    +127.0.0.1:3306                   LISTEN      560/mysqld
    +0.0.0.0:587                      LISTEN      887/master
    +0.0.0.0:139                      LISTEN      798/smbd
    +127.0.1.1:12301                  LISTEN      412/opendkim
    +0.0.0.0:143                      LISTEN      381/dovecot
    +0.0.0.0:465                      LISTEN      887/master
    +0.0.0.0:22                       LISTEN      472/sshd
    +:::25                            LISTEN      887/master
    +:::443                           LISTEN      1769/apache2
    +:::1883                          LISTEN      22452/mosquitto
    +:::445                           LISTEN      798/smbd
    +
    +

    Example output

    + +

    In this example, if you need to find the port number from dovecot, you can look for it in the Program name column. Then you can see in the local address that the reported local address is 0.0.0.0:993. You need to look for the part after the semicolon. In this case it's 993. So you'll need to forward port 993.

    + + +Next: Connect Your Domain and Server + +
    +

    Written by hiddej +

    +
    LandChad.net
    Because Everyone should be an Internet LandChad.
  • chad
  • RSS
  • BTC
  • XMR
  • Github
  • + + -- cgit v1.2.3 From 418aa2f2e293fb39cc77aec4fde9e8aefd78cd3c Mon Sep 17 00:00:00 2001 From: hidde-j <70572982+hidde-j@users.noreply.github.com> Date: Mon, 5 Jul 2021 15:40:11 +0200 Subject: corrections --- selfhosting.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/selfhosting.html b/selfhosting.html index 67f3de7..3e2391d 100644 --- a/selfhosting.html +++ b/selfhosting.html @@ -23,7 +23,7 @@ No bandwith limits, storage limits, etc. (some VPSes have this)
  • - It can be cheaper than using a VPS. This is only the case if you got the server for really cheap and your electricity is cheap. + It can be cheaper than using a VPS. This only is the case if you got the server for really cheap and your electricity is cheap.
  • You can have a media server to consoom your content (for example with Jellyfin). You can technically do this on a VPS, but that will be more expensive than self hosting. If you have a media server, you can stream media from your server to more devices. (I recommend just downloading it on your device, but if you have multiple devices, this could be a good solution) @@ -33,13 +33,15 @@

    Hardware

    What kind of hardware should you choose?

    -

    If you pay your own electricity bill, power consumption is a big factor. Most old laptop computers are ideal in the sense that they don't use a lot of power, and if the battery still works, you have a built-in UPS! The bad thing is, is that most old laptop computers aren't that powerful, and they lack in upgradability. (you shouldn't really be using anything older than 2006, and I recommend at least a power equivalant of a Core 2 CPU) +

    If you pay your own electricity bill, power consumption is a big factor. Most old laptop computers are ideal in the sense that they don't use a lot of power, and if the battery still works, you have a built-in UPS! The bad thing is, most old laptop computers aren't that powerful, and they lack in upgradability. (you shouldn't really be using anything older than 2006, and I recommend at least a performance equivalant of a Core 2 CPU)

    -

    If you can find an energy efficient desktop (under 100W), that is a great option. They are pretty upgradable and they don't use a lot of power. They can also be pretty cheap, but old laptops are usually cheaper. If you can afford new hardware, and are willing to build a PC, you can find really power effecient CPU/motherboard combos, and they can be cheap. For example the Celeron J3060. I recommend a low wattage power supply or an effecient one for these kinds of builds.

    +

    If you can find an energy efficient desktop (under 100W), that is a great option. They are pretty upgradable and they don't use a lot of power. They can also be pretty cheap, but old laptops are usually cheaper. If you can afford new hardware, and are willing to build a PC, you can find really power effecient CPU/motherboard combos, and they can be cheap, for example the Celeron J3060. I recommend a low wattage power supply or an effecient one for these kinds of builds. Pico PSUs are pretty tiny and efficient solutions in these builds.

    Of course, if you don't pay your electricity bill or cost is not a problem for you, you can use just about any old desktop.

    Usecases

    -

    Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle transcoding video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example the Athlon 200GE or 3000G are good and efficient choices for these builds. +

    Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle transcoding video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example the Athlon 200GE or 3000G are good and efficient choices for these builds.

    +

    + If you need a lot of storage, go for a case with a lot of mounts for hard drives, this way you can easily mount multiple hard drives. Pros of multiple hard drives are redundancy and speed. Cons could be that they create more heat and noise. You can't use a laptop if you want multiple drives, except if you use a hard drive caddy for the CD/DVD drive bay. Some business laptops even support RAID 1 (redundancy) and 0 (speed and more storage, but you lose your files if one hard drive breaks) this way.

    Getting started

    Installing Debian

    Once you have the machine, you can install the OS. I recommend Debian, as all of the guides on this website are Debian specific. Debian just werks as a server OS.

    @@ -50,7 +52,7 @@ While installing, do not install any desktop environment, but do install the SSH server.

    Port forwaring

    -

    Every time you are going to use a port, you need to forward it. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just port forwarding, differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your IP address is, is ifconfig. This shows a lot of network info, but it will also show your local IP address needed for port forwarding. +

    Every time you are going to use a port, you need to forward it. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just port forwarding, differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your servers IP address is, is to run ifconfig on your server. This shows a lot of network info, but it will also show your local IP address needed for port forwarding.

    Basic ports:

      -- cgit v1.2.3 From b4a32fe8d01b66f6dd6a911a10d5ce32379ea68e Mon Sep 17 00:00:00 2001 From: hidde-j <70572982+hidde-j@users.noreply.github.com> Date: Tue, 6 Jul 2021 10:03:11 +0200 Subject: Language corrections and feedback Plus some extra information. --- selfhosting.html | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/selfhosting.html b/selfhosting.html index 3e2391d..ce762d6 100644 --- a/selfhosting.html +++ b/selfhosting.html @@ -36,23 +36,20 @@

      If you pay your own electricity bill, power consumption is a big factor. Most old laptop computers are ideal in the sense that they don't use a lot of power, and if the battery still works, you have a built-in UPS! The bad thing is, most old laptop computers aren't that powerful, and they lack in upgradability. (you shouldn't really be using anything older than 2006, and I recommend at least a performance equivalant of a Core 2 CPU)

      If you can find an energy efficient desktop (under 100W), that is a great option. They are pretty upgradable and they don't use a lot of power. They can also be pretty cheap, but old laptops are usually cheaper. If you can afford new hardware, and are willing to build a PC, you can find really power effecient CPU/motherboard combos, and they can be cheap, for example the Celeron J3060. I recommend a low wattage power supply or an effecient one for these kinds of builds. Pico PSUs are pretty tiny and efficient solutions in these builds.

      -

      Of course, if you don't pay your electricity bill or cost is not a problem for you, you can use just about any old desktop.

      +

      Of course, if you don't pay your electricity bill or cost is not a problem for you, you can use just about any old desktop (as long as it's not from the 90's, I recommend at least a Core 2 chip again, or an Athlon 64 X2).

      Usecases

      -

      Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle transcoding video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example the Athlon 200GE or 3000G are good and efficient choices for these builds. -

      +

      Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle to transcode video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example, the Athlon 200GE or 3000G are good and efficient choices for these builds. They are decent CPUs, but also have a built in GPU that will transcode video just fine.

      - If you need a lot of storage, go for a case with a lot of mounts for hard drives, this way you can easily mount multiple hard drives. Pros of multiple hard drives are redundancy and speed. Cons could be that they create more heat and noise. You can't use a laptop if you want multiple drives, except if you use a hard drive caddy for the CD/DVD drive bay. Some business laptops even support RAID 1 (redundancy) and 0 (speed and more storage, but you lose your files if one hard drive breaks) this way.

      + If you need a lot of storage, go for a case with a lot of mounts for hard drives, this way you can easily mount multiple hard drives. Pros of multiple hard drives are redundancy and speed. Cons could be that they create more heat and noise. You can't use a laptop if you want multiple drives, except if you use a hard drive caddy for the CD/DVD drive bay. Some business laptops even support RAID 1 (redundancy) and RAID 0 (speed and more storage, but you lose your files if one hard drive breaks) this way.

      Getting started

      Installing Debian

      Once you have the machine, you can install the OS. I recommend Debian, as all of the guides on this website are Debian specific. Debian just werks as a server OS.

      You'll need to burn a Debian install image onto a USB flash drive or a CD. You can download the image here, and you can also find information on how to burn the image onto a USB flash drive or CD there.

      -

      -While installing, do not install any desktop environment, but do install the SSH server. -

      +

      While installing Debian, do not install any desktop environment. But install an SSH server when you get the chance. Also leave webserver unchecked, even if you want to use it as a webserver. You'll have a chance to install this later.

      Port forwaring

      -

      Every time you are going to use a port, you need to forward it. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just port forwarding, differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your servers IP address is, is to run ifconfig on your server. This shows a lot of network info, but it will also show your local IP address needed for port forwarding. +

      Every time you are going to set up a new server program, you need to forward a port corresponding to that program. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just called port forwarding, this differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your servers IP address is, is to run ifconfig on your server. This shows a lot of network info, but it will also show your local IP address needed for port forwarding.

      Basic ports:

        @@ -68,13 +65,12 @@ While installing, do not install any desktop environment, but do install the SSH

      Static or dynamic IP address

      -

      If you want to selfhost, make sure you have a static IP address, or you can change your dynamic IP address to a static one. Refer to your router settings, some ISPs will have options on this here. If you can't find anything on this, get in touch with your ISP.

      +

      If you want to host your server at home, make sure you have a static IP address, or you can change your dynamic IP address to a static one. Refer to your router settings, some ISPs will have options on this here. If you can't find anything on this, get in touch with your ISP.

      Once you've made sure you have a static IP address, you can find out what the IP address is with various websites. You can use a search engine to easily find this out. Write this down as you'll need it later.

      Once you're done, you can pretty much follow every guide on this website, the only difference is that you'll need to forward the ports you'll be using for the server.

      Finding the ports you'll need to forward

      If you need to know what port you'll need to forward, there's a command for that. Just type netstat -tulpn in your servers command line. If you want to see the name of the programs, you need to run it as a root user. You can do this by putting sudo before the command.

      -
      
      -Local Address                    State       PID/Program name
      +
      Local Address                    State       PID/Program name
       0.0.0.0:25                       LISTEN      887/master
       0.0.0.0:1883                     LISTEN      22452/mosquitto
       0.0.0.0:445                      LISTEN      798/smbd
      @@ -89,11 +85,10 @@ Local Address                    State       PID/Program name
       :::25                            LISTEN      887/master
       :::443                           LISTEN      1769/apache2
       :::1883                          LISTEN      22452/mosquitto
      -:::445                           LISTEN      798/smbd
      -
      +:::445 LISTEN 798/smbd

      Example output

      -

      In this example, if you need to find the port number from dovecot, you can look for it in the Program name column. Then you can see in the local address that the reported local address is 0.0.0.0:993. You need to look for the part after the semicolon. In this case it's 993. So you'll need to forward port 993.

      +

      In this example, if you need to find the port number from dovecot, you can look for it in the Program name column. Then you can see in the local address column that the reported local address is 0.0.0.0:993. You need to look for the part after the semicolon. In this case it's 993. So you'll need to forward port 993.

      Next: Connect Your Domain and Server -- cgit v1.2.3 From 631185d7d8f0c11b19397878760c0a53e7d8aa7c Mon Sep 17 00:00:00 2001 From: hiddej Date: Wed, 7 Jul 2021 07:35:40 +0200 Subject: Added downsides --- selfhosting.html | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/selfhosting.html b/selfhosting.html index ce762d6..63589ed 100644 --- a/selfhosting.html +++ b/selfhosting.html @@ -30,6 +30,23 @@
    +

    Downsides

    +

    Some possible downsides of choosing to host at home could be:

    +
      +
    • + Your ISP not approving of what you're doing. Some ISP's do not condone you hosting at home. Usually when this is the case, it could be harder if you want to forward ports, or it could be impossible to get a static IP address. Check your ISP's terms of service. Sometimes, it will say that hosting a webserver, email server, and more, is not allowed. +
    • +
    • + Security. Opening your network to the public could bring security risks. For example, never open a Samba server to the public, because it's a pretty old protocol and it has some security vulnerabilities. Be sure you are forwarding the right port, and don't just forward random ports to the internet. Also, if you are getting DDoSed, your ISP will temporarily shut down your whole internet connection. +
    • +
    • + When setting up an email server, it can be way harder to not have your email show up as spam in other's people email. If you use a VPS, this is way easier. +
    • +
    • + Space and noise. Of course, this differs per server. +
    • +
    +

    For me, the upsides outweighed the downsides, which is why I chose to host at home. But, this differs with each person and scenario. Go and research what your exact situation is, before trying anything. Otherwise you'll have to face some bad surprises.

    Hardware

    What kind of hardware should you choose?

    @@ -90,7 +107,6 @@

    In this example, if you need to find the port number from dovecot, you can look for it in the Program name column. Then you can see in the local address column that the reported local address is 0.0.0.0:993. You need to look for the part after the semicolon. In this case it's 993. So you'll need to forward port 993.

    - Next: Connect Your Domain and Server
    -- cgit v1.2.3 From 7dbd1f02cbf9c3fdf89ef78c607a2fe81ee68082 Mon Sep 17 00:00:00 2001 From: hiddej Date: Sun, 11 Jul 2021 12:12:21 +0200 Subject: Downsides vary from user to user --- selfhosting.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfhosting.html b/selfhosting.html index 63589ed..6f546ca 100644 --- a/selfhosting.html +++ b/selfhosting.html @@ -43,9 +43,10 @@ When setting up an email server, it can be way harder to not have your email show up as spam in other's people email. If you use a VPS, this is way easier.
  • - Space and noise. Of course, this differs per server. + Space, power consumption and noise. Of course, this differs per server.
  • +

    Your mileage may vary, go and check each of these points and see if selfhosting is the right choice for you. Try and calculate your power consumption and see if your electricity cost is not too expensive.

    For me, the upsides outweighed the downsides, which is why I chose to host at home. But, this differs with each person and scenario. Go and research what your exact situation is, before trying anything. Otherwise you'll have to face some bad surprises.

    Hardware

    -- cgit v1.2.3 From 5dbbab1509508f888b688b9449d9ab0476f9b53a Mon Sep 17 00:00:00 2001 From: hiddej Date: Thu, 15 Jul 2021 09:35:47 +0200 Subject: ISPs blocked ports --- selfhosting.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/selfhosting.html b/selfhosting.html index 6f546ca..9e23b7a 100644 --- a/selfhosting.html +++ b/selfhosting.html @@ -37,7 +37,9 @@ Your ISP not approving of what you're doing. Some ISP's do not condone you hosting at home. Usually when this is the case, it could be harder if you want to forward ports, or it could be impossible to get a static IP address. Check your ISP's terms of service. Sometimes, it will say that hosting a webserver, email server, and more, is not allowed.
  • - Security. Opening your network to the public could bring security risks. For example, never open a Samba server to the public, because it's a pretty old protocol and it has some security vulnerabilities. Be sure you are forwarding the right port, and don't just forward random ports to the internet. Also, if you are getting DDoSed, your ISP will temporarily shut down your whole internet connection. + This can also include blocked ports. ISPs can block certain ports to the world. Sometimes ISPs only block 445/139 (which is for the better as Samba, using these ports isn't really secure and it's outdated). But some ISPs (sadly) block crucial ports like 80 and/or 443. You need to check this before trying anything. If this is the case, a way to get around it is to get another ISP or use an alternative port. A great website to check this is: canyouseeme.org. You can also check if you did the port forwaring correctly here.
  • +
  • + Security. Opening your network to the public could bring security risks. For example, never open a Samba server to the public, because it's a pretty old protocol, and it has some security vulnerabilities. Be sure you are forwarding the right port, and don't just forward random ports to the internet. Also, if you are getting DDoSed, your ISP will temporarily shut down your whole internet connection.
  • When setting up an email server, it can be way harder to not have your email show up as spam in other's people email. If you use a VPS, this is way easier. @@ -46,7 +48,7 @@ Space, power consumption and noise. Of course, this differs per server.
  • -

    Your mileage may vary, go and check each of these points and see if selfhosting is the right choice for you. Try and calculate your power consumption and see if your electricity cost is not too expensive.

    +

    Your mileage may vary, go and check each of these points, and see if selfhosting is the right choice for you. Try and calculate your power consumption and see if your electricity cost is not too expensive.

    For me, the upsides outweighed the downsides, which is why I chose to host at home. But, this differs with each person and scenario. Go and research what your exact situation is, before trying anything. Otherwise you'll have to face some bad surprises.

    Hardware

    -- cgit v1.2.3 From 32b513eaec7427904b6862d0904a1ecddb0cb11e Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Sun, 29 Aug 2021 15:40:30 -0400 Subject: selfhosting convertion from dos & 2 rss --- index.html | 1 + rss.xml | 142 +++++++++++++++++++++++++++++--- selfhosting.html | 240 +++++++++++++++++++++++++++---------------------------- 3 files changed, 250 insertions(+), 133 deletions(-) diff --git a/index.html b/index.html index 724bac4..f5bd05e 100644 --- a/index.html +++ b/index.html @@ -60,6 +60,7 @@ img { border: none ;}
  • Using ufw as a firewall.
  • Create a Gemini Capsule.
  • Standalone Certbot Certificates
  • +
  • Selfhosting on your own server at home

    "Build your own platform!"

    diff --git a/rss.xml b/rss.xml index ec35f02..72a66ab 100644 --- a/rss.xml +++ b/rss.xml @@ -15,6 +15,122 @@ + +Self hosting +https://landchad.net/selfhosting.html +https://landchad.net/selfhosting.html +Sun, 29 Aug 2021 15:35:48 -0400 +

    Self hosting

    + +
    +

    Introduction

    +

    When you have a(n old) computer lying around, and you have cheap electricity and a good internet connection, self hosting might be a good option for you.

    +

    Why would you choose selfhosting?

    +
      +
    • + You have control over the hardware, and you can upgrade your server in the future. For example: if you host a file server and your hard drive goes full, you can simply add another hard drive or upgrade it. +
    • +
    • + No bandwith limits, storage limits, etc. (some VPSes have this) +
    • +
    • + It can be cheaper than using a VPS. This only is the case if you got the server for really cheap and your electricity is cheap. +
    • +
    • + You can have a media server to consoom your content (for example with Jellyfin). You can technically do this on a VPS, but that will be more expensive than self hosting. If you have a media server, you can stream media from your server to more devices. (I recommend just downloading it on your device, but if you have multiple devices, this could be a good solution) +
    • +
    + +

    Downsides

    +

    Some possible downsides of choosing to host at home could be:

    +
      +
    • + Your ISP not approving of what you're doing. Some ISP's do not condone you hosting at home. Usually when this is the case, it could be harder if you want to forward ports, or it could be impossible to get a static IP address. Check your ISP's terms of service. Sometimes, it will say that hosting a webserver, email server, and more, is not allowed. +
    • +
    • + This can also include blocked ports. ISPs can block certain ports to the world. Sometimes ISPs only block 445/139 (which is for the better as Samba, using these ports isn't really secure and it's outdated). But some ISPs (sadly) block crucial ports like 80 and/or 443. You need to check this before trying anything. If this is the case, a way to get around it is to get another ISP or use an alternative port. A great website to check this is: canyouseeme.org. You can also check if you did the port forwaring correctly here.
    • +
    • + Security. Opening your network to the public could bring security risks. For example, never open a Samba server to the public, because it's a pretty old protocol, and it has some security vulnerabilities. Be sure you are forwarding the right port, and don't just forward random ports to the internet. Also, if you are getting DDoSed, your ISP will temporarily shut down your whole internet connection. +
    • +
    • + When setting up an email server, it can be way harder to not have your email show up as spam in other's people email. If you use a VPS, this is way easier. +
    • +
    • + Space, power consumption and noise. Of course, this differs per server. +
    • +
    +

    Your mileage may vary, go and check each of these points, and see if selfhosting is the right choice for you. Try and calculate your power consumption and see if your electricity cost is not too expensive.

    +

    For me, the upsides outweighed the downsides, which is why I chose to host at home. But, this differs with each person and scenario. Go and research what your exact situation is, before trying anything. Otherwise you'll have to face some bad surprises.

    +

    Hardware

    + +

    What kind of hardware should you choose?

    +

    If you pay your own electricity bill, power consumption is a big factor. Most old laptop computers are ideal in the sense that they don't use a lot of power, and if the battery still works, you have a built-in UPS! The bad thing is, most old laptop computers aren't that powerful, and they lack in upgradability. (you shouldn't really be using anything older than 2006, and I recommend at least a performance equivalant of a Core 2 CPU) +

    +

    If you can find an energy efficient desktop (under 100W), that is a great option. They are pretty upgradable and they don't use a lot of power. They can also be pretty cheap, but old laptops are usually cheaper. If you can afford new hardware, and are willing to build a PC, you can find really power effecient CPU/motherboard combos, and they can be cheap, for example the Celeron J3060. I recommend a low wattage power supply or an effecient one for these kinds of builds. Pico PSUs are pretty tiny and efficient solutions in these builds.

    +

    Of course, if you don't pay your electricity bill or cost is not a problem for you, you can use just about any old desktop (as long as it's not from the 90's, I recommend at least a Core 2 chip again, or an Athlon 64 X2).

    +

    Usecases

    +

    Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle to transcode video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example, the Athlon 200GE or 3000G are good and efficient choices for these builds. They are decent CPUs, but also have a built in GPU that will transcode video just fine.

    +

    + If you need a lot of storage, go for a case with a lot of mounts for hard drives, this way you can easily mount multiple hard drives. Pros of multiple hard drives are redundancy and speed. Cons could be that they create more heat and noise. You can't use a laptop if you want multiple drives, except if you use a hard drive caddy for the CD/DVD drive bay. Some business laptops even support RAID 1 (redundancy) and RAID 0 (speed and more storage, but you lose your files if one hard drive breaks) this way.

    +

    Getting started

    +

    Installing Debian

    +

    Once you have the machine, you can install the OS. I recommend Debian, as all of the guides on this website are Debian specific. Debian just werks as a server OS.

    +

    +

    You'll need to burn a Debian install image onto a USB flash drive or a CD. You can download the image here, and you can also find information on how to burn the image onto a USB flash drive or CD there. +

    +

    While installing Debian, do not install any desktop environment. But install an SSH server when you get the chance. Also leave webserver unchecked, even if you want to use it as a webserver. You'll have a chance to install this later.

    +

    Port forwaring

    +

    Every time you are going to set up a new server program, you need to forward a port corresponding to that program. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just called port forwarding, this differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your servers IP address is, is to run ifconfig on your server. This shows a lot of network info, but it will also show your local IP address needed for port forwarding. +

    +

    Basic ports:

    +
      +
    • + SSH: port 22 (open this port if you want to admin your server outside your network) +
    • +
    • + HTTP: port 80 (open this port if you want basic webserver functionality) +
    • +
    • + HTTPS: port 443 (you should open this port if you are setting up a webserver because encryption) +
    • +
    + +

    Static or dynamic IP address

    +

    If you want to host your server at home, make sure you have a static IP address, or you can change your dynamic IP address to a static one. Refer to your router settings, some ISPs will have options on this here. If you can't find anything on this, get in touch with your ISP.

    +

    Once you've made sure you have a static IP address, you can find out what the IP address is with various websites. You can use a search engine to easily find this out. Write this down as you'll need it later.

    +

    Once you're done, you can pretty much follow every guide on this website, the only difference is that you'll need to forward the ports you'll be using for the server.

    +

    Finding the ports you'll need to forward

    +

    If you need to know what port you'll need to forward, there's a command for that. Just type netstat -tulpn in your servers command line. If you want to see the name of the programs, you need to run it as a root user. You can do this by putting sudo before the command.

    +
    Local Address                    State       PID/Program name
    +0.0.0.0:25                       LISTEN      887/master
    +0.0.0.0:1883                     LISTEN      22452/mosquitto
    +0.0.0.0:445                      LISTEN      798/smbd
    +0.0.0.0:993                      LISTEN      381/dovecot
    +127.0.0.1:3306                   LISTEN      560/mysqld
    +0.0.0.0:587                      LISTEN      887/master
    +0.0.0.0:139                      LISTEN      798/smbd
    +127.0.1.1:12301                  LISTEN      412/opendkim
    +0.0.0.0:143                      LISTEN      381/dovecot
    +0.0.0.0:465                      LISTEN      887/master
    +0.0.0.0:22                       LISTEN      472/sshd
    +:::25                            LISTEN      887/master
    +:::443                           LISTEN      1769/apache2
    +:::1883                          LISTEN      22452/mosquitto
    +:::445                           LISTEN      798/smbd
    +

    Example output

    + +

    In this example, if you need to find the port number from dovecot, you can look for it in the Program name column. Then you can see in the local address column that the reported local address is 0.0.0.0:993. You need to look for the part after the semicolon. In this case it's 993. So you'll need to forward port 993.

    + +Next: Connect Your Domain and Server + +
    +

    Written by hiddej +

    +]]>
    +
    + + Mirror your site over I2P https://landchad.net/i2p.html @@ -22,7 +138,7 @@ Sun, 29 Aug 2021 15:32:44 -0400

    Mirror Your Site Over I2P

    - +
    I2P logo

    @@ -96,8 +212,8 @@ index index.html ;

    apt update && apt install i2pd

    Contributor - qorg11

    - - + + ]]>
    @@ -109,7 +225,7 @@ index index.html ; Tue, 03 Aug 2021 13:49:21 -0400

    Setting up a Calibre library server

    - +
    Calibre logo

    @@ -212,7 +328,7 @@ systemctl start calibre-server Tue, 03 Aug 2021 13:00:23 -0400

    Jitsi Video Chat

    - +
    Jitsi

    @@ -297,8 +413,8 @@ ufw enable

  • Edited and revised by Luke.
  • - - + + ]]> @@ -310,7 +426,7 @@ ufw enable Thu, 29 Jul 2021 10:44:56 -0400

    PeerTube Instance

    - +
    PeerTube logo

    PeerTube is a self-hosted and (optionally) federated video sharing platform that saves bandwith on videos the more people watch. @@ -427,7 +543,7 @@ systemctl daemon-reload


    Written by Denshi. Donate Monero here [QR]

    - + ]]>
    @@ -439,7 +555,7 @@ systemctl daemon-reload Sun, 25 Jul 2021 14:29:44 -0400

    Server-Side Scripting with CGI

    - +

    The basic website tutorial here describes how to set up a static @@ -589,7 +705,7 @@ end The remaining parts of the code should be pretty self-explanatory. We get today's date, check if it's a Saturday or a Sunday, and depending on that, we instruct the CGI library to output either the answer, or a - "come back later" message. + "come back later" message.

    The Ruby library by default returns an HTML response, so we really @@ -630,7 +746,7 @@ end include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/local/bin/lazy-calculator.rb; fastcgi_param QUERY_STRING $query_string; - fastcgi_pass unix:/run/fcgiwrap.socket; + fastcgi_pass unix:/run/fcgiwrap.socket; }

    fastcgi_param directives specify various parameters for @@ -648,7 +764,7 @@ end

  • Martin Chrzanowski -- website, donate
  • - + ]]>
    diff --git a/selfhosting.html b/selfhosting.html index 9e23b7a..60afbf7 100644 --- a/selfhosting.html +++ b/selfhosting.html @@ -1,120 +1,120 @@ - - - - Self hosting – LandChad.net - - - - - - - -

    Self hosting

    - -
    -

    Introduction

    -

    When you have a(n old) computer lying around, and you have cheap electricity and a good internet connection, self hosting might be a good option for you.

    -

    Why would you choose selfhosting?

    -
      -
    • - You have control over the hardware, and you can upgrade your server in the future. For example: if you host a file server and your hard drive goes full, you can simply add another hard drive or upgrade it. -
    • -
    • - No bandwith limits, storage limits, etc. (some VPSes have this) -
    • -
    • - It can be cheaper than using a VPS. This only is the case if you got the server for really cheap and your electricity is cheap. -
    • -
    • - You can have a media server to consoom your content (for example with Jellyfin). You can technically do this on a VPS, but that will be more expensive than self hosting. If you have a media server, you can stream media from your server to more devices. (I recommend just downloading it on your device, but if you have multiple devices, this could be a good solution) -
    • -
    - -

    Downsides

    -

    Some possible downsides of choosing to host at home could be:

    -
      -
    • - Your ISP not approving of what you're doing. Some ISP's do not condone you hosting at home. Usually when this is the case, it could be harder if you want to forward ports, or it could be impossible to get a static IP address. Check your ISP's terms of service. Sometimes, it will say that hosting a webserver, email server, and more, is not allowed. -
    • -
    • - This can also include blocked ports. ISPs can block certain ports to the world. Sometimes ISPs only block 445/139 (which is for the better as Samba, using these ports isn't really secure and it's outdated). But some ISPs (sadly) block crucial ports like 80 and/or 443. You need to check this before trying anything. If this is the case, a way to get around it is to get another ISP or use an alternative port. A great website to check this is: canyouseeme.org. You can also check if you did the port forwaring correctly here.
    • -
    • - Security. Opening your network to the public could bring security risks. For example, never open a Samba server to the public, because it's a pretty old protocol, and it has some security vulnerabilities. Be sure you are forwarding the right port, and don't just forward random ports to the internet. Also, if you are getting DDoSed, your ISP will temporarily shut down your whole internet connection. -
    • -
    • - When setting up an email server, it can be way harder to not have your email show up as spam in other's people email. If you use a VPS, this is way easier. -
    • -
    • - Space, power consumption and noise. Of course, this differs per server. -
    • -
    -

    Your mileage may vary, go and check each of these points, and see if selfhosting is the right choice for you. Try and calculate your power consumption and see if your electricity cost is not too expensive.

    -

    For me, the upsides outweighed the downsides, which is why I chose to host at home. But, this differs with each person and scenario. Go and research what your exact situation is, before trying anything. Otherwise you'll have to face some bad surprises.

    -

    Hardware

    - -

    What kind of hardware should you choose?

    -

    If you pay your own electricity bill, power consumption is a big factor. Most old laptop computers are ideal in the sense that they don't use a lot of power, and if the battery still works, you have a built-in UPS! The bad thing is, most old laptop computers aren't that powerful, and they lack in upgradability. (you shouldn't really be using anything older than 2006, and I recommend at least a performance equivalant of a Core 2 CPU) -

    -

    If you can find an energy efficient desktop (under 100W), that is a great option. They are pretty upgradable and they don't use a lot of power. They can also be pretty cheap, but old laptops are usually cheaper. If you can afford new hardware, and are willing to build a PC, you can find really power effecient CPU/motherboard combos, and they can be cheap, for example the Celeron J3060. I recommend a low wattage power supply or an effecient one for these kinds of builds. Pico PSUs are pretty tiny and efficient solutions in these builds.

    -

    Of course, if you don't pay your electricity bill or cost is not a problem for you, you can use just about any old desktop (as long as it's not from the 90's, I recommend at least a Core 2 chip again, or an Athlon 64 X2).

    -

    Usecases

    -

    Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle to transcode video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example, the Athlon 200GE or 3000G are good and efficient choices for these builds. They are decent CPUs, but also have a built in GPU that will transcode video just fine.

    -

    - If you need a lot of storage, go for a case with a lot of mounts for hard drives, this way you can easily mount multiple hard drives. Pros of multiple hard drives are redundancy and speed. Cons could be that they create more heat and noise. You can't use a laptop if you want multiple drives, except if you use a hard drive caddy for the CD/DVD drive bay. Some business laptops even support RAID 1 (redundancy) and RAID 0 (speed and more storage, but you lose your files if one hard drive breaks) this way.

    -

    Getting started

    -

    Installing Debian

    -

    Once you have the machine, you can install the OS. I recommend Debian, as all of the guides on this website are Debian specific. Debian just werks as a server OS.

    -

    -

    You'll need to burn a Debian install image onto a USB flash drive or a CD. You can download the image here, and you can also find information on how to burn the image onto a USB flash drive or CD there. -

    -

    While installing Debian, do not install any desktop environment. But install an SSH server when you get the chance. Also leave webserver unchecked, even if you want to use it as a webserver. You'll have a chance to install this later.

    -

    Port forwaring

    -

    Every time you are going to set up a new server program, you need to forward a port corresponding to that program. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just called port forwarding, this differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your servers IP address is, is to run ifconfig on your server. This shows a lot of network info, but it will also show your local IP address needed for port forwarding. -

    -

    Basic ports:

    -
      -
    • - SSH: port 22 (open this port if you want to admin your server outside your network) -
    • -
    • - HTTP: port 80 (open this port if you want basic webserver functionality) -
    • -
    • - HTTPS: port 443 (you should open this port if you are setting up a webserver because encryption) -
    • -
    - -

    Static or dynamic IP address

    -

    If you want to host your server at home, make sure you have a static IP address, or you can change your dynamic IP address to a static one. Refer to your router settings, some ISPs will have options on this here. If you can't find anything on this, get in touch with your ISP.

    -

    Once you've made sure you have a static IP address, you can find out what the IP address is with various websites. You can use a search engine to easily find this out. Write this down as you'll need it later.

    -

    Once you're done, you can pretty much follow every guide on this website, the only difference is that you'll need to forward the ports you'll be using for the server.

    -

    Finding the ports you'll need to forward

    -

    If you need to know what port you'll need to forward, there's a command for that. Just type netstat -tulpn in your servers command line. If you want to see the name of the programs, you need to run it as a root user. You can do this by putting sudo before the command.

    -
    Local Address                    State       PID/Program name
    -0.0.0.0:25                       LISTEN      887/master
    -0.0.0.0:1883                     LISTEN      22452/mosquitto
    -0.0.0.0:445                      LISTEN      798/smbd
    -0.0.0.0:993                      LISTEN      381/dovecot
    -127.0.0.1:3306                   LISTEN      560/mysqld
    -0.0.0.0:587                      LISTEN      887/master
    -0.0.0.0:139                      LISTEN      798/smbd
    -127.0.1.1:12301                  LISTEN      412/opendkim
    -0.0.0.0:143                      LISTEN      381/dovecot
    -0.0.0.0:465                      LISTEN      887/master
    -0.0.0.0:22                       LISTEN      472/sshd
    -:::25                            LISTEN      887/master
    -:::443                           LISTEN      1769/apache2
    -:::1883                          LISTEN      22452/mosquitto
    -:::445                           LISTEN      798/smbd
    -

    Example output

    - -

    In this example, if you need to find the port number from dovecot, you can look for it in the Program name column. Then you can see in the local address column that the reported local address is 0.0.0.0:993. You need to look for the part after the semicolon. In this case it's 993. So you'll need to forward port 993.

    - -Next: Connect Your Domain and Server - -
    -

    Written by hiddej -

    -
    LandChad.net
    Because Everyone should be an Internet LandChad.
  • chad
  • RSS
  • BTC
  • XMR
  • Github
  • - - + + + + Self hosting – LandChad.net + + + + + + + +

    Self hosting

    + +
    +

    Introduction

    +

    When you have a(n old) computer lying around, and you have cheap electricity and a good internet connection, self hosting might be a good option for you.

    +

    Why would you choose selfhosting?

    +
      +
    • + You have control over the hardware, and you can upgrade your server in the future. For example: if you host a file server and your hard drive goes full, you can simply add another hard drive or upgrade it. +
    • +
    • + No bandwith limits, storage limits, etc. (some VPSes have this) +
    • +
    • + It can be cheaper than using a VPS. This only is the case if you got the server for really cheap and your electricity is cheap. +
    • +
    • + You can have a media server to consoom your content (for example with Jellyfin). You can technically do this on a VPS, but that will be more expensive than self hosting. If you have a media server, you can stream media from your server to more devices. (I recommend just downloading it on your device, but if you have multiple devices, this could be a good solution) +
    • +
    + +

    Downsides

    +

    Some possible downsides of choosing to host at home could be:

    +
      +
    • + Your ISP not approving of what you're doing. Some ISP's do not condone you hosting at home. Usually when this is the case, it could be harder if you want to forward ports, or it could be impossible to get a static IP address. Check your ISP's terms of service. Sometimes, it will say that hosting a webserver, email server, and more, is not allowed. +
    • +
    • + This can also include blocked ports. ISPs can block certain ports to the world. Sometimes ISPs only block 445/139 (which is for the better as Samba, using these ports isn't really secure and it's outdated). But some ISPs (sadly) block crucial ports like 80 and/or 443. You need to check this before trying anything. If this is the case, a way to get around it is to get another ISP or use an alternative port. A great website to check this is: canyouseeme.org. You can also check if you did the port forwaring correctly here.
    • +
    • + Security. Opening your network to the public could bring security risks. For example, never open a Samba server to the public, because it's a pretty old protocol, and it has some security vulnerabilities. Be sure you are forwarding the right port, and don't just forward random ports to the internet. Also, if you are getting DDoSed, your ISP will temporarily shut down your whole internet connection. +
    • +
    • + When setting up an email server, it can be way harder to not have your email show up as spam in other's people email. If you use a VPS, this is way easier. +
    • +
    • + Space, power consumption and noise. Of course, this differs per server. +
    • +
    +

    Your mileage may vary, go and check each of these points, and see if selfhosting is the right choice for you. Try and calculate your power consumption and see if your electricity cost is not too expensive.

    +

    For me, the upsides outweighed the downsides, which is why I chose to host at home. But, this differs with each person and scenario. Go and research what your exact situation is, before trying anything. Otherwise you'll have to face some bad surprises.

    +

    Hardware

    + +

    What kind of hardware should you choose?

    +

    If you pay your own electricity bill, power consumption is a big factor. Most old laptop computers are ideal in the sense that they don't use a lot of power, and if the battery still works, you have a built-in UPS! The bad thing is, most old laptop computers aren't that powerful, and they lack in upgradability. (you shouldn't really be using anything older than 2006, and I recommend at least a performance equivalant of a Core 2 CPU) +

    +

    If you can find an energy efficient desktop (under 100W), that is a great option. They are pretty upgradable and they don't use a lot of power. They can also be pretty cheap, but old laptops are usually cheaper. If you can afford new hardware, and are willing to build a PC, you can find really power effecient CPU/motherboard combos, and they can be cheap, for example the Celeron J3060. I recommend a low wattage power supply or an effecient one for these kinds of builds. Pico PSUs are pretty tiny and efficient solutions in these builds.

    +

    Of course, if you don't pay your electricity bill or cost is not a problem for you, you can use just about any old desktop (as long as it's not from the 90's, I recommend at least a Core 2 chip again, or an Athlon 64 X2).

    +

    Usecases

    +

    Of course, hardware choices depend on the usecase. The above recommendations I gave you work fine for e-mail server, webserver and fileserver types of applications, but they will struggle to transcode video if you are going to host a media server. You'll need a faster CPU, but also a faster GPU. As an example, the Athlon 200GE or 3000G are good and efficient choices for these builds. They are decent CPUs, but also have a built in GPU that will transcode video just fine.

    +

    + If you need a lot of storage, go for a case with a lot of mounts for hard drives, this way you can easily mount multiple hard drives. Pros of multiple hard drives are redundancy and speed. Cons could be that they create more heat and noise. You can't use a laptop if you want multiple drives, except if you use a hard drive caddy for the CD/DVD drive bay. Some business laptops even support RAID 1 (redundancy) and RAID 0 (speed and more storage, but you lose your files if one hard drive breaks) this way.

    +

    Getting started

    +

    Installing Debian

    +

    Once you have the machine, you can install the OS. I recommend Debian, as all of the guides on this website are Debian specific. Debian just werks as a server OS.

    +

    +

    You'll need to burn a Debian install image onto a USB flash drive or a CD. You can download the image here, and you can also find information on how to burn the image onto a USB flash drive or CD there. +

    +

    While installing Debian, do not install any desktop environment. But install an SSH server when you get the chance. Also leave webserver unchecked, even if you want to use it as a webserver. You'll have a chance to install this later.

    +

    Port forwaring

    +

    Every time you are going to set up a new server program, you need to forward a port corresponding to that program. For example, HTTP is port 80, HTTPS is 443, etc. You need to set this up on your router's NAT settings (sometimes just called port forwarding, this differs per router). These steps differ for each router. Refer to your routers manual. A simple command to see what your servers IP address is, is to run ifconfig on your server. This shows a lot of network info, but it will also show your local IP address needed for port forwarding. +

    +

    Basic ports:

    +
      +
    • + SSH: port 22 (open this port if you want to admin your server outside your network) +
    • +
    • + HTTP: port 80 (open this port if you want basic webserver functionality) +
    • +
    • + HTTPS: port 443 (you should open this port if you are setting up a webserver because encryption) +
    • +
    + +

    Static or dynamic IP address

    +

    If you want to host your server at home, make sure you have a static IP address, or you can change your dynamic IP address to a static one. Refer to your router settings, some ISPs will have options on this here. If you can't find anything on this, get in touch with your ISP.

    +

    Once you've made sure you have a static IP address, you can find out what the IP address is with various websites. You can use a search engine to easily find this out. Write this down as you'll need it later.

    +

    Once you're done, you can pretty much follow every guide on this website, the only difference is that you'll need to forward the ports you'll be using for the server.

    +

    Finding the ports you'll need to forward

    +

    If you need to know what port you'll need to forward, there's a command for that. Just type netstat -tulpn in your servers command line. If you want to see the name of the programs, you need to run it as a root user. You can do this by putting sudo before the command.

    +
    Local Address                    State       PID/Program name
    +0.0.0.0:25                       LISTEN      887/master
    +0.0.0.0:1883                     LISTEN      22452/mosquitto
    +0.0.0.0:445                      LISTEN      798/smbd
    +0.0.0.0:993                      LISTEN      381/dovecot
    +127.0.0.1:3306                   LISTEN      560/mysqld
    +0.0.0.0:587                      LISTEN      887/master
    +0.0.0.0:139                      LISTEN      798/smbd
    +127.0.1.1:12301                  LISTEN      412/opendkim
    +0.0.0.0:143                      LISTEN      381/dovecot
    +0.0.0.0:465                      LISTEN      887/master
    +0.0.0.0:22                       LISTEN      472/sshd
    +:::25                            LISTEN      887/master
    +:::443                           LISTEN      1769/apache2
    +:::1883                          LISTEN      22452/mosquitto
    +:::445                           LISTEN      798/smbd
    +

    Example output

    + +

    In this example, if you need to find the port number from dovecot, you can look for it in the Program name column. Then you can see in the local address column that the reported local address is 0.0.0.0:993. You need to look for the part after the semicolon. In this case it's 993. So you'll need to forward port 993.

    + +Next: Connect Your Domain and Server + +
    +

    Written by hiddej +

    + + + -- cgit v1.2.3