Skip to content

Instantly share code, notes, and snippets.

@tbeyer567
Created March 21, 2022 17:32
Show Gist options
  • Select an option

  • Save tbeyer567/54924eab60f0562752b0eaed713f88f1 to your computer and use it in GitHub Desktop.

Select an option

Save tbeyer567/54924eab60f0562752b0eaed713f88f1 to your computer and use it in GitHub Desktop.
[Unit]
Description="HashiCorp Vault - A tool for managing secrets"
Documentation=https://www.vaultproject.io/docs/
Requires=network-online.target
After=network-online.target
ConditionFileNotEmpty={{ vault_config_file }}
StartLimitIntervalSec=60
StartLimitBurst=3
[Service]
User={{ vault_user }}
Group={{ vault_group }}
ProtectSystem=full
ProtectHome=read-only
PrivateTmp=yes
PrivateDevices=yes
SecureBits=keep-caps
AmbientCapabilities=CAP_IPC_LOCK
CapabilityBoundingSet=CAP_SYSLOG CAP_IPC_LOCK
NoNewPrivileges=yes
ExecStart={{ vault_install_directory }}/vault server -config={{ vault_home_directory }}
ExecReload=/bin/kill --signal HUP $MAINPID
KillMode=process
KillSignal=SIGINT
Restart=on-failure
RestartSec=5
TimeoutStopSec=30
LimitNOFILE=65536
LimitMEMLOCK=infinity
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment