Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@thomaseizinger
Copy link
Member

@thomaseizinger thomaseizinger commented Oct 9, 2025

With this PR we add cargo-deb to our CI pipeline and build a debian package for the Gateway. The debian package comes with several configuration files that make it easy for admins to start and maintain a Gateway installation:

  • The embedded systemd unit file is essentially the same one as what we currently install with the install script with some minor modifications.
    • The token is read from /etc/firezone/gateway-token and passed as a systemd credential. This allows us to set the permissions for this file to 0400 and have it owned by root:root.
    • The configuration is read from /etc/firezone/gateway-env.
    • Both of these changes basically mean the user should never need to touch the unit file itself.
  • The sysusers configuration file ensures the firezone user and group are present on the system.
  • The tmpfiles configuration file ensures the necessary directories are present.

All of the above is automatically installed and configured using the post-installation script which is called by apt once the package is installed.

In addition to the Gateway, we also package a first version of the firezone-cli. Right now, firezone-cli (installed as firezone) has three subcommands:

  • gateway authenticate: Asks for the Gateway's token and installs it at /etc/firezone/gateway-token. The user doesn't have to know how we manage this token and can trust that we are using safe defaults.
  • gateway enable: Enables and starts the systemd service.
  • gateway disable: Disables the systemd service.

Right now, the .deb file is only uploaded to the preview APT repository and not attached to the release. It should therefore not yet be user-visible unless somebody pokes around a lot, meaning we can defer documentation to a later PR and start testing it from the preview repository for our own purposes.

Related: #10598
Resolves: #8484
Resolves: #10681

@vercel
Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
firezone Ready Ready Preview Comment Oct 24, 2025 4:51am

@thomaseizinger thomaseizinger force-pushed the feat/package-firezone-gateway-deb branch from 2acf159 to 6c17b75 Compare October 13, 2025 23:58
@thomaseizinger thomaseizinger force-pushed the feat/package-firezone-gateway-deb branch 2 times, most recently from 41ada73 to 42faf7e Compare October 14, 2025 22:09
@thomaseizinger thomaseizinger force-pushed the feat/package-firezone-gateway-deb branch from f98e684 to 4dc8e5b Compare October 16, 2025 05:52
@thomaseizinger thomaseizinger force-pushed the feat/package-firezone-gateway-deb branch from 8e802df to 3eabeb6 Compare October 16, 2025 06:40
@thomaseizinger

This comment was marked as resolved.

@thomaseizinger thomaseizinger force-pushed the feat/package-firezone-gateway-deb branch from 4425aa5 to 99c0053 Compare October 24, 2025 04:50
@thomaseizinger thomaseizinger changed the title feat(gateway): package and publish .deb feat(gateway): create debian package Oct 24, 2025
@thomaseizinger thomaseizinger added this pull request to the merge queue Oct 24, 2025
Merged via the queue into main with commit 0d2ddd8 Oct 24, 2025
164 checks passed
@thomaseizinger thomaseizinger deleted the feat/package-firezone-gateway-deb branch October 24, 2025 05:17
);
}

let mut token = String::with_capacity(512); // Our tokens are ~270 characters, grab the next power of 2.
Copy link
Member

@jamilbk jamilbk Oct 24, 2025

Choose a reason for hiding this comment

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

Might be a good idea here to use secrecy or otherwise zeroize this on drop, considering Gateway tokens by default today don't expire.

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.

Upload packages from draft releases to preview APT repository Package Gateway for popular distros

2 participants