Elektrine lite

← Feed

@illusionist@lemmy.zip

2026-09-26 07:48 UTC

how do you manage your server? I usually connect with my server via ssh in a terminal and run basic commands. What’s a better, more efficient and modern way of doing that? Especially considering ai and documentation along the way? I wonder if there’s a better approach than “connect from remote and act local”. Is there a method to “code local and push to remote”? I use a fedora server with podman, caddyfile and vi.

Replies (13)

  • @kossa@feddit.org 2026-09-26 07:53

    Ansible is one way to “code local, push to remote(s)”. Can define so-called playbooks, which is basically just a script, to do reoccuring tasks like e.g. updates.

    Open ##4919606

  • @9point6@lemmy.world 2026-09-26 08:12

    Depends what you’re trying to do, really If you’re talking about going in and restarting containers and checking logs, there are tools like Portainer that give a nice UI you can quickly use from your phone If you’re talking about repetitive tasks, sometimes there’s a tool to automate it already (e.g. updates via watchtower, unattended-upgrades), and if not, you can write a script and possibly run it via a cronjob if that makes sense If you’re talking about doing new stuff, you either stick with the SSH & shell commands, or you look into IaC tools like ansible as another reply mentioned. Another option is something like Nix where the setup is defined in config, so you make your changes there

    Open ##4919905

  • There are probably multiple flashy clients and gui’s for it, but if you’re already used to the terminal, I’d recommend rsync. This might be the wrong syntax but something like rsync -av ~/local/project servername:/var/www/html/ would take your local files and update the web directory of your server with only the files that are more recent. Rsync will even read your ssh config file so if you’re got an entry for your server you can just use the host name. I ran a little blog for a while using a static site generator so I setup the git server on my web server and wrote a git hook where every time I pushed to the repo the server would pull it’s cloned copy of the repo into the html directory. Took me a few hours to setup but it made updating the blog as simple as pushing to the repo.

    Open ##4920015

  • @GreenShimada@lemmy.world 2026-09-26 08:27

    I wait for something to break. Then I yell “God fucking dammit, I don’t have time for this right now!” and spend an hour triaging things before I just try docker down, pull, up and everything works.

    Open ##4920108

  • “code local and push remote” is only more efficient if you have a faulty connection with ssh or want to use a GUI editor that doesn’t support remote connections. What you’re doing is good. You can scoure for more “modern” ways that might have more glimmer and sparkly lights, but it won’t improve efficiency.

    Open ##4920211

  • @IsoKiero@sopuli.xyz 2026-09-26 08:55

    Nothing wrong with good old ssh. My VMs are different enough that building and maintaining ansible playbooks or something similar would be a bigger task than actually doing it in the traditional way. Maybe I could benefit by building simple playbooks to populate user accounts, ssh keys, smtp relay settings and other common things, but I don’t really set up new servers that often that it would justify spending time to set up tools for that.

    Open ##4920350

  • @Egonallanon@feddit.uk 2026-09-26 08:56

    Ansible and terraform can bath do with you want though for a single server I’d consider them both to be a somewhat overkill. But then again homelabbing often is about overkill.

    Open ##4920357

  • @makeshift0546@lemmy.today 2026-09-26 09:08

    Hermes + maybe $5-10 worth of tokens (on a busy month). Running everything in a nice podlet setup and have reduced maintenance down to trivial levels.

    Open ##4920425

  • @HelloRoot@lemy.lol 2026-09-26 09:14

    with dokplpy

    Open ##4920461

  • @9tr6gyp3@lemmy.world 2026-09-26 09:14

    I created git repos on my main workstation for each homelab server/service I maintain that keeps: documentation notes lessons learned scripts, configs runbooks backup details security audit details log items that need attention infrastructure I just point a local LLM (offline model that runs on my workststion) into those repos and ask it to perform certain things on those servers. I have it run pre backups before making changes, then post backups once its done.

    Open ##4920463

  • @idunnololz@lemmy.world 2026-09-27 01:58

    I ssh into it twice a year to perform updates but otherwise i leave it alone. Server’s been chugging along for like a decade now.

    Open ##4921228

  • @Nibodhika@lemmy.world 2026-09-26 21:08

    I spent a while getting Ansible to be able to setup and maintain my server(s). And ended up not using it as much as I should, mostly because the computer I used to run Ansible from became a “Steam Machine” so I’m rarely sitting on it with a keyboard now and I don’t want to have personal info and keys on my work computer. But it was a good learning, and useful while I used it. Now I just use ssh and compose files directly.

    Open ##4921443

  • Ansible.

    Open ##4921908