-
Notifications
You must be signed in to change notification settings - Fork 887
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
docs/install.md
Outdated
> **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. | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing! :D
Folks might want to run Coder on port 80/443; they'll need to add CAP_NET_BIND_SERVICE if they want to do that (or run as root, but this is definitely preferable).