Ulimit -Sn | how to make this value static

Hello, i’m using DietPi and one of my software need more ulimt -Sn, i couldn’t every time enter “ulimit -Sn 63355”. How could i setup this parameter permanently?

This can be set in /etc/sysctl.conf. Add a line like:

fs.file-max = 63355

To reload the config do sudo sysctl -p. This should make it persistent across boot.

root@DietPi:~# nano /etc/sysctl.conf – edited as you said
root@DietPi:~# ulimit -Sn
1024
root@DietPi:~# sysctl -p
fs.file-max = 63355
vm.swappiness = 100
root@DietPi:~# ulimit -Sn
1024
After reboot
root@DietPi:~# ulimit -Sn
1024

didn’t helped

what is the output of cat /proc/sys/fs/file-max?

Edit: I made a mistake and this was system wide limit, but you need to change the user limit.
This can be done in the file /etc/security/limits.conf.
You can see here how this file works, also with example configs: https://linux.die.net/man/5/limits.conf