• 0 Posts
  • 9 Comments
Joined 1 year ago
cake
Cake day: August 15th, 2023

help-circle
  • mb_@lemm.eetoSelfhosted@lemmy.worldCaddy and forgejo
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    8 days ago

    There are a few ways to do it, but you don’t use caddy for SSH.

    • host SSH on port 22, forgejo on a different port. Expose both ports to the internet
    • host SSH on a different port, forgejo on port 22. Expose both ports to the internet
    • host SSH on port 22. Forgejo on port 2222. Only 22 exposed to the internet. Change the authorized_keys user of the git user on host to automatically call the internal forgejo SSH app

    Last option is how I run my Gitea instance, authorized keys is managed by gitea so you don’t really need to do anything high maintenance.

    ~git/.ssh/authorized_keys:

    command="/usr/local/bin/gitea --config=/data/gitea/conf/app.ini serv key-9",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict ssh-rsa PUBLICKEYHASH
    

    /usr/local/bin/gitea:

    ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.14 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
    

    127.0.0.14 is the local git docker access where I expose the service, but you couldn’t different ports, IPS, etc.





  • It is nice that you got it running, but when everything you end up doing is running services in low ports or needing specific IP address in different networks, rootless podman is just a PITA.

    In my case I have one pihole running on a docker container and another one that runs directly on a VM.

    Someone said before “what’s the point of running in a container”… Well, there really isn’t any measurable overhead and you have the benefit of having a very portable configuration.

    I do think the compromises one has to go through for podman rootless are not worth in this case, for me, not even the rootful worked properly (a few years ago), but this is a nice walkthrough for people wanting to understand more.




  • Weird numbering system? Things are still stored in blocks of 8 bits at the end, it doesn’t matter.

    When it gets down to what matter on hard drives, every byte still uses 8 bits, and all other numbers for people actually working with computer science that matter are multiples of 8, not 10.

    And because all internal systems use base 8, base 10 is “slower” (not that it matters any longer.