I am trying to write a dinit service for paperless, and realized that valkey service is also necessary.
The Arch Valkey package seems to include the following systemd service
[Unit]
Description=Advanced key-value store
After=network.target
[Service]
Type=notify
User=valkey
Group=valkey
ExecStart=/usr/bin/valkey-server /etc/valkey/valkey.conf --supervised systemd
TimeoutStartSec=60
TimeoutStopSec=60
CapabilityBoundingSet=
PrivateTmp=true
PrivateDevices=true
ProtectSystem=full
ProtectHome=true
NoNewPrivileges=true
RuntimeDirectory=valkey
RuntimeDirectoryMode=755
LimitNOFILE=10032
[Install]
WantedBy=multi-user.target
Alias=redis.service
I tried to convert this to a dinit service.
run-as = valkey
socket-uid = valkey
socket-gid = valkey
type = process
command = /usr/bin/valkey-server /etc/valkey/valkey.conf
logfile = /var/log/dinit/valkey.log
working-dir = /run/valkey
start-timeout = 60
stop-timeout = 60
depends-on = network.target
after = network.target
The issue is that I am not sure if I am replicating all the options specified in the original systemd script. I get a warning message saying that memory overcommit must be enabled. Could anyone help me determine if I did this incorrectly?
5841:M 06 Sep 2025 17:11:37.138 # WARNING Memory overcommit must be enabled! Without it, a background save
or replication may fail under low memory condition. Being disabled, it can also cause failures without low
memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommi
t_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for th
is to take effect.
5841:M 06 Sep 2025 17:11:37.138 * oO0OoO0OoO0Oo Valkey is starting oO0OoO0OoO0Oo
5841:M 06 Sep 2025 17:11:37.138 * Valkey version=8.1.3, bits=64, commit=d063dff5, modified=1, pid=5841, jus
t started
5841:M 06 Sep 2025 17:11:37.138 * Configuration loaded
5841:M 06 Sep 2025 17:11:37.138 # You requested maxclients of 10000 requiring at least 10032 max file descr
iptors.
5841:M 06 Sep 2025 17:11:37.138 # Server can't set maximum open files to 10032 because of OS error: Operati
on not permitted.
5841:M 06 Sep 2025 17:11:37.138 # Current maximum open files is 4096. maxclients has been reduced to 4064 t
o compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
5841:M 06 Sep 2025 17:11:37.138 * monotonic clock: POSIX clock_gettime
5841:M 06 Sep 2025 17:11:37.139 * Running mode=standalone, port=6379.
5841:M 06 Sep 2025 17:11:37.139 * Server initialized
5841:M 06 Sep 2025 17:11:37.139 * Loading RDB produced by Valkey version 8.1.3
5841:M 06 Sep 2025 17:11:37.139 * RDB age 16 seconds
5841:M 06 Sep 2025 17:11:37.139 * RDB memory usage when created 0.58 Mb
5841:M 06 Sep 2025 17:11:37.139 * Done loading RDB, keys loaded: 0, keys expired: 0.
5841:M 06 Sep 2025 17:11:37.139 * DB loaded from disk: 0.000 seconds
5841:M 06 Sep 2025 17:11:37.139 * Ready to accept connections tcp