Skip to content

Forgejo-Runner #1576

Description

@CrazyWolf13

Name of the Script

forgejo-runner

Script Type

CT (LXC Container)

📋 Script Details

forgejo-runner

Activity

  1. changed the title [-]forgejo-runner[/-] [+]Forgejo-Runner[/+] on Mar 27, 2026
  2. MickLesk commented on Mar 27, 2026

    @MickLesk
    Member

    Only Testable with:

    Forgejo Instance URL:
    Forgejo Runner Registration Token:

  3. github-actions commented on Mar 27, 2026

    @github-actions
    Contributor

    The forgejo-runner script is ready for testing:
    bash -c "$(curl -fsSL https://github.com/community-scripts/ProxmoxVED/raw/main/ct/forgejo-runner.sh)"
    Note: This is not in the official repo yet—it's just a dev version! After merging into ProxmoxVE, it will need to be recreated.

  4. imjustafox commented on Mar 30, 2026

    @imjustafox
    Contributor

    I can handle testing of this, as I run a production forgejo instance. I'll report back here when done!

  5. imjustafox commented on Mar 30, 2026

    @imjustafox
    Contributor

    so far, found issue: mode=generated (when copying the install from generator) error.

    root@pve-testing:~# mode="generated" var_unprivileged="0" var_ctid="<redacted>" var_cpu="12" var_ram="16384" var_disk="128" var_net="static" var_gateway="<redacted>" var_net="<redacted>" var_nesting="1" var_tags="git" var_container_storage="<redacted>" var_template_storage="<redacted>-templates" bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/ct/forgejo-runner.sh)"
    
    
    <removed ascii title for brevity>
                
      💡   Running pre-flight checks...
    
        ✔️   Kernel key limits OK (keys: 65/2000)
        ✔️   Storage with 'rootdir' support available (3 storage(s))
        ✔️   Storage with 'vztmpl' support available (2 storage(s))
        ✔️   Sufficient storage space (<redacted>: 9.7TB free, need 128GB)
        ✔️   Default network bridge vmbr0 available
        ✔️   DNS resolution working
        ✔️   No enterprise repositories enabled
        ✔️   Standalone node (no cluster quorum needed)
        ✔️   LXC stack is up to date (pve-container=6.1.2)
        ✔️   Container IDs available (next: <redacted>)
        ✔️   Template server reachable (download.proxmox.com)
        ✔️   Template available locally for debian 13
    
      ✔️   All pre-flight checks passed (12/12)
      ✖️  Invalid option: generated
    
    root@pve-testing~# echo $?
    1

    Based on hitting that, I did the following:

    I worked on some fixes for the forgejo-runner script to support mode="generated" (unattended/config generator installs). The current install script references two functions (prompt_input_required and show_missing_values_warning) that don't exist in build.func, which means the install script will fail outright.

    Changes in my branch forgejo-runner-fix:

    CT script (ct/forgejo-runner.sh):

    • Export var_forgejo_instance, var_forgejo_runner_token, and var_runner_labels so they survive the lxc-attach boundary into the container. These are app-specific variables not in build.func's whitelist, so they need explicit exports.

    Install script (install/forgejo-runner-install.sh):

    • Replaced nonexistent prompt_input_required calls with standard read -r -p prompts (matching the pattern used by pocketid, openziti-controller, etc.)
    • Prompts are skipped when variables are already set via environment (generated/unattended mode)
    • Added hard error if no runner registration token is provided
    • Made runner labels configurable via var_runner_labels — additional labels are appended to the default rather than replacing it
    • Updated default runner image from node:20-bookworm to node:22-bookworm (Node 24 is current LTS; Node 22 was chosen to avoid major breaking changes. Node 20 EOL is April 2026)
    • Removed call to nonexistent show_missing_values_warning

    Example unattended usage:
    mode="generated" var_cpu="12" var_ram="16384" var_disk="128" var_forgejo_instance="https://my-forgejo.example.com" var_forgejo_runner_token="MY_TOKEN" var_runner_labels="my-custom:docker://alpine:3" bash -c "$(curl -fsSL ...ct/forgejo-runner.sh)"

    I've opened a PR to fix the above: #1645

  6. imjustafox commented on Mar 30, 2026

    @imjustafox
    Contributor

    Out of sheer curiosity , is there a reason mode=generated (added to ProxmoxVE in PR community-scripts/ProxmoxVE#12807 by @MickLesk on March 12) hasn't been ported to ProxmoxVED's build.func? Right now mode="generated" hits "Invalid option" in ProxmoxVED. Is mode="default" the intended way to do unattended installs here, or should the generated case be synced over?

    I'm happy to include the generated mode port in my draft PR #1645 , open a separate PR specifically for it, or leave it for you all to handle. Whatever works best.

  7. michelroegl-brunner commented on Apr 2, 2026

    @michelroegl-brunner
    Member

    @MickLesk Can you do mode generated for dev? I can do it earliest Tuesday next week.

  8. MickLesk commented on Apr 2, 2026

    @MickLesk
    Member

    maybe next week too. Focus on Bugfixing and little things in main this week

  9. imjustafox commented on Apr 2, 2026

    @imjustafox
    Contributor

    sounds good! i'll keep an eye on this and mark the related PR #1645 as ready to merge/out of draft status once those changes have been ported over! Thanks Y'all.

  10. CerberusStyle commented on Apr 2, 2026

    @CerberusStyle

    yep this one is a fail.

  11. michelroegl-brunner commented on Apr 7, 2026

    @michelroegl-brunner
    Member

    sounds good! i'll keep an eye on this and mark the related PR #1645 as ready to merge/out of draft status once those changes have been ported over! Thanks Y'all.

    Is added, please test

  12. 3 remaining items

  13. mariovata commented on May 15, 2026

    @mariovata

    Labels input is not trimmed, leading spaces cause invalid config.

    During installation we are prompted to enter tags

    Restarting postfix
      ✔   Updated Container OS
      ✔   Setup yq 4.53.2
          Forgejo Instance URL (e.g. https://codeberg.org): https://git.home.internal/
          Forgejo Runner UUID: c5ab181e-650c-4c2f-936e-7c142a59d52d
          Forgejo Runner Token: <token>
          Additional runner labels (comma-separated, or leave blank for default only): pve1, default
    

    If we add a space after a value the script parses it correctly (default becomes -> ' default'), but creates this in the config which is invalid:

      connections:
        forgejo:
          url: https://git.home.internal/
          uuid: c5ab181e-650c-4c2f-936e-7c142a59d52d
          token: <token>
          labels:
            - linux-amd64:docker://node:22-bookworm
            - pve1
            - ' default'
    

    Instead of this:

      connections:
        forgejo:
          url: https://git.home.internal/
          uuid: c5ab181e-650c-4c2f-936e-7c142a59d52d
          token: <token>
          labels:
            - linux-amd64:docker://node:22-bookworm
            - pve1
            - default
    
    Logs:

    May 15 20:46:09 forgejo-runner forgejo-runner[5255]: time="2026-05-15T20:46:09+02:00" level=warning msg="Missing env file ".env" is ignored"

    May 15 20:46:09 forgejo-runner forgejo-runner[5255]: Error: invalid configuration: invalid server settings: connection "forgejo" is invalid: malformed label " default": inv>

    May 15 20:46:09 forgejo-runner systemd[1]: forgejo-runner.service: Main process exited, code=exited, status=1/FAILURE

    May 15 20:46:09 forgejo-runner systemd[1]: forgejo-runner.service: Failed with result 'exit-code'.

  14. FairTradeOrange commented on May 28, 2026

    @FairTradeOrange

    I installed the Forgejo-Runner LXC and in general everything worked well, but maybe someone needs the following additional information.

    • Starting with Forgejo v15.0, there is a new runner registration process - so you have to update the Forgejo Instance to get an UUID. Until then, there was only the "Registration Token".
    • The config-path is not /root/.runner it's /etc/forgejo-runner/config.yaml.

    Finally, just a quick personal note...
    Thank you for creating this Forgejo Runner LXC.
    Forgejo is awesome and we all appreciate the benefits of a homelab environment with a private repository collection, action runners, a container registry, and all the trimmings.
    I actually had quite a few problems setting up my first Runner back then.
    This automated installation should also help some people get started with modern development tools.

  15. syl3n7 commented on Jun 6, 2026

    @syl3n7

    I installed this at least 8 days ago and forgot to give feedback, it all worked wonderfully with minimal interaction, i just needed to provide the essential details and i was set.

  16. github-actions commented on Jun 11, 2026

    @github-actions
    Contributor

    A PR has been created for forgejo-runner: community-scripts/ProxmoxVE#15046

  17. rowieh commented on Jun 12, 2026

    @rowieh

    Thank you for the effort writing this script!
    I did the installation today, and so far, no issues to report. Everything worked very smooth.

  18. pjd-hermes commented on Jun 16, 2026

    @pjd-hermes

    Unable to select a custom network device during setup. Choosing vmbr0 worked fine. After installation I was able to manually swap the container to the correct network device

  19. MickLesk commented on Jun 16, 2026

    @MickLesk
    Member

    Advanced Settings ?

  20. michelroegl-brunner commented on Jun 19, 2026

    @michelroegl-brunner
    Member

    Merged with #15181 in ProxmoxVE

  21. github-actions commented on Jun 19, 2026

    @github-actions
    Contributor

    Files deleted with PR #1938

  22. MickLesk commented on Jun 19, 2026

    @MickLesk
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions