# Incus服务器设置

来源：<https://linuxcontainers.org/incus/docs/main/reference/server_settings/#server-settings>

## `/etc/security/limits.d/50-incus.config`

```none
* soft nofile 1048576
* hard nofile 1048576
root soft nofile 1048576
root hard nofile 1048576
* soft memlock unlimited
* hard memlock unlimited
root soft memlock unlimited
root hard memlock unlimited
```

## `/etc/sysctl.d/99-incus.conf`

```none
fs.aio-max-nr 524288
fs.inotify.max_queued_events 1048576
fs.inotify.max_user_instances 1048576
fs.inotify.max_user_watches 1048576
kernel.dmesg_restrict 1
kernel.keys.maxbytes 2000000
kernel.keys.maxkeys 2000
net.core.bpf_jit_limit 1000000000
net.ipv4.neigh.default.gc_thresh3 8192
net.ipv6.neigh.default.gc_thresh3 8192
vm.max_map_count 262144
```

---

**Documents**

- [Incus服务器设置](https://notes.bleatingsheep.org/s/iaas-user/doc/incus-mDBc61ZhGk)
- [SSH+tar+zstd 传输大量文件](https://notes.bleatingsheep.org/s/iaas-user/doc/sshtarzstd-E2tTrdz1Iz)
- [cloud-init](https://notes.bleatingsheep.org/s/iaas-user/doc/cloud-init-JBRvQIyH81)