Skip to content

add CAP_NET_BIND_SERVICE to coder.service #2699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 28, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ sudo systemctl enable --now coder
journalctl -u coder.service -b
```

> **Note:** If you wish to run Coder on a privileged port (lower than 1024),
> then you will need to edit `/usr/lib/systemd/system/coder.service` and
> make the following change:
>
> ```diff
> -AmbientCapabilities=CAP_IPC_LOCK
> +AmbientCapabilities=CAP_IPC_LOCK CAP_NET_BIND_SERVICE
> ```
>
> This will allow Coder to bind to ports lower than 1024.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just change this in our systemd service? I feel like when I tried it just didn't work, but maybe I was doing something wrong.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wrong! Let's just add this to the service file so this isn't an issue anymore!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing! :D

## docker-compose

Before proceeding, please ensure that you have both Docker and the [latest version of
Expand Down