Self-Hosting

From Modding Fridays
Jump to navigation Jump to search

WIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIP WIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIP WIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIPWIP


My self-hosting adventure finally begins! And look at that, it's a Friday!

Since there are so many guides out there with different commands and workflows, I decided to compile the best methods into one wiki-post. The target server is the Oneplus 6 with the Linux based OS PostmarketOS installed, which means Alpine Linux commands are used. Have fun:)

Why doe

Very nicely summed up by Kedio:

For anyone planning to self-host apps and services or simply have a computer readily available as a playground, single-board computers have been one of the typical go-to devices. Smartphones are also emerging as viable alternatives for this purpose. Indeed, with their respectable specs, their ubiquitous availability, their relatively short service life and the existence of Linux OSes such as postmarketOS, it is becoming possible to reuse them as tiny and yet powerful computers. There is arguably also added ecological benefits to this, due to their low electrical consumption and the delaying of their disposal in a landfill.

Further Reference

Prerequisites/Recommended

  • Some old computer with Linux, preferably Alpine Linux, installed. Recommended would be an obsolete smartphone as listed here.

If such a phone is available install any pre-built image (like sxmo*). Deinstall the current UI and install the console-UI, this apparently frees up to 400mb:

sudo rc-service sxmo stop
sudo rc-update del sxmo
sudo apk del postmarketos-ui-*
sudo apk add postmarketos-ui-console

Use https://wiki.postmarketos.org/wiki/TTYescape for on-phone handling

  • Updated && upgraded system
  • nano/nvim installed
  • docker installed

sudo apk add docker docker-compose

One of the best ways to run a headless server is to use containers as this gives access to many pre-configured tools and services but also allows playing with sandboxed systems without blowing up the host. Luckily, installing docker is easy on postmarketOS.

Recommended

  • Install bombardier to test the connection & performance
  • Open up TCP port 8080 & setup rootless docker for security improvements

Step-by-Step

1. Register Domain + DDNS setup

  • Register a domain at a provider (e.g. Namecheap [better alt?])



Guides Used