You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Railpack: Superuser not granted, aborting installation #5007
Configure remote server with non-root user for Dokploy (passwordless sudo)
Create project
Create application service and use remote server as target
Configure Git repository
Use Railpack as build type
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.
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.
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]:
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.
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.
@smares You're right — the deployment script unconditionally runs the Railpack install script on every deploy, regardless of whether it's already installed [1]:
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:
Add sudo before bash -c "$(curl ...)" (for non-root users), or
Add a command_exists railpack check to skip installation if already present, or
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.)
Activity
linear-code commentedon Aug 7, 2026
DOK-622
dosubot commentedon Aug 7, 2026
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_CMDwhen installing Railpack [1], but the deployment-time installation ingetRailpackCommand()does not — it runs the install script withoutsudo[2]:Since the Railpack install script tries to write to
/usr/local/bin, it needs elevated permissions. On your non-root user SSH session,sudocan'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
sudoto the install command inpackages/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.
smares commentedon Aug 7, 2026
@dosu manually installing did not help. Railpack was installed successfully, but I think the deployment still tries to install it again.
dosubot commentedon Aug 7, 2026
@smares You're right — the deployment script unconditionally runs the Railpack install script on every deploy, regardless of whether it's already installed [1]:
Unlike the server setup script which checks with
command_exists railpackbefore 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 missingsudo.This confirms it's a bug that needs a code fix in
packages/server/src/utils/builders/railpack.ts. The fix should either:sudobeforebash -c "$(curl ...)"(for non-root users), orcommand_exists railpackcheck to skip installation if already present, orUntil this is fixed, one possible workaround would be to make
/usr/local/binwritable by your deploy user on the remote server: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.
[-]Superuser not granted, aborting installation[/-][+]Railpack: Superuser not granted, aborting installation[/+]fix: run Railpack install with sudo during remote deploy
chore(release): 0.42.0 [skip ci]