4 ms·
Ask HN: *How* do you use/organise your (personal) server?
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 how do you organise/manage/use your (personal) servers. I am more interested in the way you manage your personal server that what you do with it.
My setup is really basic:
- I use GNU screen to run things in the background.
- I restart some unreliable programs on crash using `while sleep 3; do cmd && break; done` loop; some of them are restarted by systemd.
- Again, for some other programs I use docker.
What I don't like about my current setup:
- I don't know any way to say "if A or B crashes, kill C and restart them all in order B, A, C." Something like Erlang's supervision trees would be perfect but for programs.
- 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).
- 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.
----
Looking forward to your answers!
- detaro 8y agosystemd 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.
- ioddly 8y ago> - 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).
- mbrock 8y agoMaybe you could actually use Erlang as your process manager?
- thepredestrian 8y agoI 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.
- billconan 8y agoI 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.