Installation

The simplest method for installing the GitWarden Agent is through the automated installation script. To install the agent using the automated script, simply copy and paste the command below into the terminal of an instance you would like to have registered:

curl -sL https://archives.gitwarden.com/install.sh | \
  KEY="MYAPIKEYID" \
  SECET="MYAPIKEYSECRET" \
  TEAMS="Employees,Contractors" \
  ADMIN_TEAMS="System Admins,Support" \
  sudo bash -E -

Making sure to update the variables:

  • KEY is your organization’s API key ID. This can be collected from your account dashboard.

  • SECRET is the API secret for the corresponding API key above. This value is only used for the initial registration process, and is not stored anywhere on the instace once registered.

  • TEAMS is a comma-delimited list of Github teams that should have users created for them on the bootstrapped server. Be sure to use the full name of any team specified, complete with spaces.

  • ADMIN_TEAMS is a comma-delimited list of Github teams that should be given administrative (or sudo) access to the instance. Be sure to use the full name of any team specified, complete with spaces.

The output of the command:

$ curl -sL https://archives.gitwarden.com/install.sh | \
    KEY="MYAPIKEYID" \
    SECET="MYAPIKEYSECRET" \
    TEAMS="Employees,Contractors" \
    ADMIN_TEAMS="System Admins,Support" \
    sudo bash -E -

        _ __ _      __            __
  ___ _(_) /| | /| / /__ ________/ /__ ___
 / _ `/ / __/ |/ |/ / _ `/ __/ _  / -_) _ \
 \_, /_/\__/|__/|__/\_,_/_/  \_,_/\__/_//_/
/___/     Linux user management, simplified

Importing the GitWarden packaging key...
Adding the GitWarden package repository to the local apt configuration...
Updating apt package database...
Installing agent...
Configuration generated and persisted to: /etc/gitwarden/gitwarden.yml
Registering with the GitWarden service...
Registration successful! Starting service...
GitWarden is now active.  

When the script is completed, the instance is fully activated and configured. When using this method, there is no further action needed on your part. You can now jump to the Deployment section for more information on scaling out your agent deployments, or the Troubleshooting section to find out more information on how to debug any issues.

Manual Install

As an alternative to the scripted installation above, you can also configure your package manager to use the GitWarden package repository using the examples below.

Note: The steps below (including the Configuration section) are not needed if you used the automatic installation script above. These steps outline the commands the installation script runs behind the scenes.

yum/dnf

For yum or dnf-based systems (RHEL, CentOS, Fedora), issue the commands below to configure the package repository:

cat<<EOF>/etc/yum.repos.d/gitwarden.repo
[gitwarden]
name=GitWarden Package Repository
baseurl=https://archives.gitwarden.com/rpm
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://archives.gitwarden.com/gitwarden.key
EOF

Once the repository is configured, install the agent with the command:

sudo yum install gitwarden-agent -y

apt

For apt-based systems (Debian, Ubuntu), run the commands below to configure the package repository:

# Add the GitWarden GPG key to the local apt configuration, ensuring
# all packages are signed and secure before installing.
curl -sL https://archives.gitwarden.com/gitwarden.key | \
  sudo apt-key add -

# Add the package repository to the local apt configuration
echo "deb https://archives.gitwarden.com/deb squeeze main" | \
  sudo tee /etc/apt/sources.list.d/gitwarden.list

Note, the squeeze in the second command above can be replaced with your current distribution codename (precise, jessie, etc), however it is not required.

Once the commands above complete, you can then install the agent with the command:

sudo apt-get update && \
  sudo apt-get install gitwarden-agent -y

Once the agent is installed, the next step is configuration.


Previous Article Next Article