
Ask HN: *How* do you use/organise your (personal) server? - boramalper
I have a small virtual server for running my side projects, and hosting some websites, but I am considering utilising it more so I would like to hear <i>how</i> do you <i>organise&#x2F;manage&#x2F;use</i> your (personal) servers. I am more interested in the way you manage your personal server that what you do with it.<p>My setup is really basic:<p>- I use GNU screen to run things in the background.<p>- I restart some unreliable programs on crash using `while sleep 3; do cmd &amp;&amp; break; done` loop; some of them are restarted by systemd.<p>- Again, for some other programs I use docker.<p>What I don&#x27;t like about my current setup:<p>- I don&#x27;t know any way to say &quot;if A or B crashes, kill C and restart them all in order B, A, C.&quot; Something like Erlang&#x27;s supervision trees would be perfect but for programs.<p>- Since the internet connection can be unreliable (or battery might die unexpectedly...), I always start a GNU screen session as soon as I login. I wish there was a better interface for managing those screens (like a web browser with tabs).<p>- I am not fond of the terminal... Thankfully `fish` makes it so much more bearable with its zero-configuration autocomplete that works like charm, but for some tasks I would love to have a GUI -perhaps a web interface. A perfect example would be cron: I would take something like crontab.guru over editing files manually every single time.<p>----<p>Looking forward to your answers!
======
ioddly
> \- Again, for some other programs I use docker.

I use and recommend dokku + some CI/CD to manage deployment of dockerized
services.

I am also interested in the answer to this question. I love the idea of having
some kind of control panel and monitoring setup for my own personal servers
but, in practice, there seems to be nothing out there that isn't overkill for
me. I also love the idea of having my server setup described entirely in code
so that it can be destroyed and reconstructed with ease, but...

I read recently that servers should be treated like cattle and not pets, which
rings true, but I'm not sure if applying that advice is worth it for my
personal stuff (currently running two servers).

------
billconan
I use tmux to run my program. I run it with gdb attached, so when it crashes,
I can find the error as soon as possible. I can easily write a gdb script to
relaunch it if crashes, but for now, I want to capture issues and debug them
timely, so I don't restart it, I keep the crash state.

I also use terminal for most cases, but I made a simple web console. this is
to gracefully shutdown the service, in case someone is still connected.

------
thepredestrian
I only run 2 docker containers in a server, so I don't need anything complex.

I couldn't really fine a simple alerting tool, so I wrote a script that
periodically checks if my docker containers are alive or not, and ping me on
Telegram if one of them dies.

------
detaro
systemd actually can do a lot of restarting logic through the various ways in
which dependencies on other units can be declared. I use systemd for basically
everything that runs as a service on the system.

------
mbrock
Maybe you could actually use Erlang as your process manager?

