Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil.
-
No spam.
-
Posts are to be related to self-hosting.
-
Don't duplicate the full text of your blog or readme if you're providing a link.
-
Submission headline should match the article title.
-
No trolling.
-
Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.
-
AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
bash setup/config/PS1 is your friend here. I frequently find myself with a myriad of terminals between a bunch of usernames and servers at work, and setting up a proper prompt is key to help you keep track.
My bashrc makes my prompt look like this:
username@hostname:/absolute/path
$ inputgoeshere
... with color coding, of course. Yes, I use a multiline prompt. I somehow never saw that before using ParrotSec despite being a bash user for 25 years. I modified the ParrotSec default to suit my needs better, and I like it:
- Obvious which user I am.
- Obvious which host I'm on.
- Obvious which path I'm in.
- It's easy to copy and paste a complete source/destination for pasting into, for example, an rsync comman
I pasted my PS1 config here: https://pastebin.com/ZcYwabfB
Stick that line near the bottom of your ~/.bashrc file if you want to try it out.
Hey that's super helpful, thank you. Definitely going to try this out.
I use tmux or screen, and set the status bar in different remotes to different colors.
Color coding
If I'm on WIndows, I use MobaXterm. If I'm on Linux, I use tmux.
You’ll get used to it eventually, but you can e.g. tweak your PS1 to an all-caps hostname, or use a custom tmux layout with dedicated panes for each box you connect to.
You’ll get used to it eventually
I've been earning my living mostly with connecting to remote systems via ssh (and other means) for quite a few years and I still occasionally mess up and enter commands on a wrong terminal. Less now than I used to, but it still happens. The trick is to learn youself to pause for a second and confirm the target for any potentially destructive or otherwise harmful command, no matter if it's locally or to some server other side of the world.
I (manually) set the background color of my terminals depending on the machine I connect to. I currently have profiles for red, green, blue, and black backgrounds with black as my default. I usually use red for ones I want to be especially careful of.
That's a great idea. Do you have it persist between sessions? Like one server #1 it's always green?
I just right click on the terminal to change the profile to whatever I feel like it should be in the moment (usually red). I do it by reflex, basically. I never felt the need to try to set up automation for different servers, but I expect there's probably a way to do that if you really wanted to.
I made it so that the ps1 on my servers shows the servername@[server IP]