Skip to content
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

add CAP_NET_BIND_SERVICE to coder.service #2699

Merged
merged 3 commits into from
Jun 28, 2022
Merged

Conversation

johnstcn
Copy link
Member

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).

@johnstcn johnstcn self-assigned this Jun 28, 2022
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

This is great!

docs/install.md Outdated Show resolved Hide resolved
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
docs/install.md Outdated
Comment on lines 44 to 54
> **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

@johnstcn johnstcn changed the title document adding CAP_NET_BIND_SERVICE to coder.service add CAP_NET_BIND_SERVICE to coder.service Jun 28, 2022
@johnstcn johnstcn requested a review from kylecarbs June 28, 2022 13:00
@johnstcn johnstcn merged commit 0052e6a into main Jun 28, 2022
@johnstcn johnstcn deleted the cj/docs-cap-net-bind-service branch June 28, 2022 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants