Skip to content

Commit 99ebcd7

Browse files
fix(deploy): Set CAP_NET_BIND_SERVICE capability on cosmos binary
The cosmos binary needs this capability to bind to privileged ports (80, 443) when running as non-root user. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent df76cc0 commit 99ebcd7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

scripts/deploy/deploy.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ tar -xzf /tmp/cosmos.tar.gz -C "${INSTALL_DIR}/bin/"
4242
# Ensure correct permissions
4343
chmod +x "${INSTALL_DIR}/bin/cosmos" "${INSTALL_DIR}/bin/cosmos-launcher" || true
4444

45+
# Allow cosmos binary to bind to privileged ports (80, 443) as non-root user
46+
setcap 'cap_net_bind_service=+ep' "${INSTALL_DIR}/bin/cosmos"
47+
4548
# Update meta.json with deployment info
4649
cat > "${INSTALL_DIR}/meta.json" << EOF
4750
{

0 commit comments

Comments
 (0)