teleport/vagrant/teleport.service
Hugo Shaka 0d6adaa50a
Standardize systemd LimitNOFILE (#17893)
Actual LimitNOFILE varies greatly between the systems as it depends on the
systemd version and the go version used to build Teleport. The goal of this
commit is to run Teleport in the same setup, regardless of the distro nor
Teleport version.

New systemd defaults are 1024:524288, and starting with go 1.19, go process can
increase their soft limit up to the hard limmit dynamically. Old systemd
versions don't suppoprt `soft:hard` notation and old go versions don't
automatically increase up to the hard limit. For this reasons, the most
compatible setting is to set softlimit=hardlimit=524288.
2022-10-31 16:56:02 +00:00

18 lines
347 B
Desktop File

[Unit]
Description=Teleport SSH server
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=5
ExecStartPre=/bin/mkdir -p -m0700 /var/lib/teleport
ExecStart=/usr/local/bin/teleport start -c /opt/teleport/teleport.yaml
MountFlags=slave
LimitNOFILE=524288
LimitNPROC=1048576
LimitCORE=infinity
[Install]
WantedBy=multi-user.target