Skip to content

Railpack: Superuser not granted, aborting installation #5007

Closed

Description

@smares

To Reproduce

  1. Configure remote server with non-root user for Dokploy (passwordless sudo)
  2. Create project
  3. Create application service and use remote server as target
  4. Configure Git repository
  5. Use Railpack as build type
  6. Deploy

Current vs. Expected behavior

I expected the application to be deployed, but got this during deployment:

! Escalated permissions are required to install to /usr/local/bin
sudo: A terminal is required to authenticate
x Superuser not granted, aborting installation
Error occurred ❌, check the logs for details.

Provide environment information

Operating System:
  OS: Ubuntu 26.04
  Arch: amd64
Dokploy version: 0.29.14
VPS Provider: Hetzner
Deploying Angular application

Which area(s) are affected? (Select all that apply)

Remote server

Are you deploying the applications where Dokploy is installed or on a remote server?

Remote server

Additional context

Setting up the remote server worked with a minor change to the script for the right version of Docker to be used. Also, using the terminal from within Dokploy to connect to the server and run sudo commands works fine as well.

Will you send a PR to fix it?

No

Activity

  1. linear-code commented on Aug 7, 2026

    @linear-code
  2. dosubot commented on Aug 7, 2026

    @dosubot

    Hi @smares! I'm Dosu and I'm helping the Dokploy team.

    This looks like a bug in how Railpack is installed during deployment (as opposed to during server setup). The server setup script correctly uses $SUDO_CMD when installing Railpack [1], but the deployment-time installation in getRailpackCommand() does not — it runs the install script without sudo [2]:

    export RAILPACK_VERSION=${application.railpackVersion}
    bash -c "$(curl -fsSL https://railpack.com/install.sh)"

    Since the Railpack install script tries to write to /usr/local/bin, it needs elevated permissions. On your non-root user SSH session, sudo can't prompt interactively, hence the "A terminal is required to authenticate" error — even though your user has passwordless sudo configured.

    The fix would be to add sudo to the install command in packages/server/src/utils/builders/railpack.ts (line ~90), changing it to something like:

    sudo bash -c "$(curl -fsSL https://railpack.com/install.sh)"

    This is consistent with how the server setup script already handles it [3]. The gap was introduced when Railpack deployment support was added in PR #3113 [4] without the sudo handling that was later added for non-root users in PR #4059 [5].

    As a workaround, you could SSH into the remote server and pre-install Railpack manually with sudo, so the deployment script finds it already present and skips the install step.

    To reply, just mention @dosu.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about dokploy Share Dosu with your team

  3. smares commented on Aug 7, 2026

    @smares
    Author

    @dosu manually installing did not help. Railpack was installed successfully, but I think the deployment still tries to install it again.

    Image
  4. dosubot commented on Aug 7, 2026

    @dosubot

    @smares You're right — the deployment script unconditionally runs the Railpack install script on every deploy, regardless of whether it's already installed [1]:

    export RAILPACK_VERSION=${application.railpackVersion}
    bash -c "$(curl -fsSL https://railpack.com/install.sh)"

    Unlike the server setup script which checks with command_exists railpack before installing, the deployment command has no such check. So pre-installing manually won't help — it will still try to reinstall on each deployment and fail due to the missing sudo.

    This confirms it's a bug that needs a code fix in packages/server/src/utils/builders/railpack.ts. The fix should either:

    1. Add sudo before bash -c "$(curl ...)" (for non-root users), or
    2. Add a command_exists railpack check to skip installation if already present, or
    3. Both

    Until this is fixed, one possible workaround would be to make /usr/local/bin writable by your deploy user on the remote server:

    sudo chmod a+w /usr/local/bin

    That way the install script won't need sudo. (You can revert this after confirming it works if the security trade-off is acceptable for your environment.)

    To reply, just mention @dosu.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about dokploy Share Dosu with your team

  5. changed the title [-]Superuser not granted, aborting installation[/-] [+]Railpack: Superuser not granted, aborting installation[/+] on Aug 7, 2026
  6. added a commit that references this issue on Aug 9, 2026
    679dbf9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions