this post was submitted on 23 Jan 2024
6 points (100.0% liked)

Technology

942 readers
43 users here now

A tech news sub for communists

founded 2 years ago
MODERATORS
 

I have an Odroid N2+ running Arch Linux ARM that I just love. I have installed a bunch of shit on it like jellyfin (TV), miniflux (RSS), gonic/airsonic-refix (music), soju/gamja (IRC), komga (comics).

I am starting to lose track of things. Like which port which service is running on. Sometimes I even forget which service I am running.

It would be nice to maintain a text configuration that I can use to provision this setup if I have to reinstall everything (as is tradition) and something I can glance over to get a state of things.

Any ideas for this? I feel like something like ansible should for this. I tried looking up stuff for this but search results always show some sweaty nerd managing kubernetes on a fleet of Raspberry Pis (the sweaty nerd calls it "homelab"). Before I start hacking my own stuff I would like to hear if someone else has experience with this.

Thanks.

you are viewing a single comment's thread
view the rest of the comments
[–] lckdscl@whiskers.bim.boats 2 points 8 months ago* (last edited 8 months ago) (8 children)

For not having to remember ports, use a reverse proxy. Keep configuration text files in a repository somewhere, online or offline. Then maybe write an ansible playbook to install all the packages you need and configure as you want. For services that don't have config files, document in a personal wiki what you do to have it set up.

I currently have a lot of things installed and use a mixture of docker compose files and config files (podman can also use compose-style files). I've written down a guide for myself on how to redeploy my whole server and plan to use ansible to reproduce the setup.

Flow charts are also good to visualize the state of things.

[–] ksynwa@lemmygrad.ml 2 points 8 months ago (7 children)

For not having to remember ports, use a reverse proxy.

Do you do this? The prospect of editing nginx configuration scares the shit out of me. I am also scared of breakages if I (for example) set up a service at a subpath like ip_address/jellyfin/ rather than at a port (ip_address:8000) which feels like a root domain.

[–] ComradeEd@lemmygrad.ml 2 points 8 months ago (1 children)

I use nginx for everything, mostly for TLS. You don't have to use subpaths, you can tell nginx to listen on one port and then forward to whatever port the service uses.

[–] ksynwa@lemmygrad.ml 1 points 8 months ago (1 children)

listen on one port and then forward to whatever port the service uses

Can you give a brief example of this? I am not able to follow

[–] ComradeEd@lemmygrad.ml 2 points 8 months ago (1 children)

If your service listens on port 2555, you could tell nginx to listen on port 2556 and then forward things to port 2555.

This is a very basic nginx config file.

server {
  listen 2556;
  location / {
    proxy_pass http://127.0.0.1:2555;
  }
}
[–] ksynwa@lemmygrad.ml 1 points 8 months ago (1 children)

Oh I get what you mean. It's for exposing this service over TLS. I don't have a need for this since I only access services over LAN or Tailscale.

[–] ComradeEd@lemmygrad.ml 2 points 8 months ago

There are some other stuff it can do, but yea.

load more comments (5 replies)
load more comments (5 replies)