2024-04-08 18:37:56 +00:00
|
|
|
# example systemd service unit file for valkey-server
|
2019-04-27 16:14:59 +00:00
|
|
|
#
|
2024-04-08 18:37:56 +00:00
|
|
|
# In order to use this as a template for providing a valkey service in your
|
|
|
|
# environment, _at the very least_ make sure to adapt the valkey configuration
|
2019-04-27 16:14:59 +00:00
|
|
|
# file you intend to use as needed (make sure to set "supervised systemd"), and
|
|
|
|
# to set sane TimeoutStartSec and TimeoutStopSec property values in the unit's
|
|
|
|
# "[Service]" section to fit your needs.
|
|
|
|
#
|
|
|
|
# Some properties, such as User= and Group=, are highly desirable for virtually
|
2024-04-08 18:37:56 +00:00
|
|
|
# all deployments of valkey, but cannot be provided in a manner that fits all
|
2019-04-27 16:14:59 +00:00
|
|
|
# expectable environments. Some of these properties have been commented out in
|
|
|
|
# this example service unit file, but you are highly encouraged to set them to
|
|
|
|
# fit your needs.
|
|
|
|
#
|
|
|
|
# Please refer to systemd.unit(5), systemd.service(5), and systemd.exec(5) for
|
|
|
|
# more information.
|
|
|
|
|
|
|
|
[Unit]
|
2024-04-08 18:37:56 +00:00
|
|
|
Description=Valkey data structure server
|
|
|
|
Documentation=https://github.com/valkey-io/valkey-doc
|
2019-04-27 16:14:59 +00:00
|
|
|
#Before=your_application.service another_example_application.service
|
2024-04-08 18:37:56 +00:00
|
|
|
#AssertPathExists=/var/lib/valkey
|
2020-08-11 09:30:32 +00:00
|
|
|
Wants=network-online.target
|
|
|
|
After=network-online.target
|
2019-04-27 16:14:59 +00:00
|
|
|
|
|
|
|
[Service]
|
2024-04-03 17:47:26 +00:00
|
|
|
ExecStart=/usr/local/bin/valkey-server --supervised systemd --daemonize no
|
2024-04-08 18:37:56 +00:00
|
|
|
## Alternatively, have valkey-server load a configuration file:
|
2024-04-03 17:47:26 +00:00
|
|
|
#ExecStart=/usr/local/bin/valkey-server /path/to/your/valkey.conf
|
2019-04-27 16:14:59 +00:00
|
|
|
LimitNOFILE=10032
|
|
|
|
NoNewPrivileges=yes
|
|
|
|
#OOMScoreAdjust=-900
|
|
|
|
#PrivateTmp=yes
|
|
|
|
Type=notify
|
|
|
|
TimeoutStartSec=infinity
|
|
|
|
TimeoutStopSec=infinity
|
|
|
|
UMask=0077
|
2024-04-08 18:37:56 +00:00
|
|
|
#User=valkey
|
|
|
|
#Group=valkey
|
|
|
|
#WorkingDirectory=/var/lib/valkey
|
2019-04-27 16:14:59 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|