---
title: 'Tutorial: Reset Multi-Daemon Mode and Number of TCP/UDP Daemons'
canonical: https://openvpn.net/as-docs/tutorials/tutorial--reset-multi-daemon-and-tcp-udp-daemons/
product: Access Server Docs
description: How to reset the multi-daemon mode in Access Server to the default settings. This includes configuring the number of TCP and UDP daemons.
---

# Tutorial: Reset Multi-Daemon Mode and Number of TCP/UDP Daemons

## Overview

This tutorial guides you through resetting the multi-daemon mode in Access Server to its default settings. This involves configuring the number of TCP and UDP daemons to match the number of CPU cores on your system.

## Prerequisites

- An installed Access Server.
- Console access and the ability to get root access.

## Step 1: Reset multi-daemon mode and the number of TCP and UDP daemons

1. Connect to the console and get root privileges.
2. Switch to the scripts directory:

   ```
   cd /usr/local/openvpn_as/scripts/
   ```
3. Run the commands below, which use the `sacli GetNCores` command to detect the number of CPU cores and set the number of TCP and UDP daemons accordingly.

   ```
   ./sacli --key "vpn.server.daemon.enable" --value "true" ConfigPut
   ./sacli --key "vpn.daemon.0.listen.protocol" --value "tcp" ConfigPut
   ./sacli --key "vpn.server.port_share.enable" --value "true" ConfigPut
   ./sacli --key "vpn.server.daemon.tcp.n_daemons" --value "`./sacli GetNCores`" ConfigPut
   ./sacli --key "vpn.server.daemon.udp.n_daemons" --value "`./sacli GetNCores`" ConfigPut
   ./sacli start
   ```

   Turns on multi-daemon mode.

   Sets the first daemon's protocol to TCP.

   Turns on port sharing for TCP.

   Sets the number of TCP daemons to match the number of CPU cores.

   Sets the number of UDP daemons to match the number of CPU cores.

   Restarts the Access Server service to apply changes.

   - You've now reset your Access Server to use multi-daemon mode, with the number of TCP and UDP daemons set according to your CPU cores. This setup helps optimize VPN connection performance and load balancing.

---

Prev: [Tutorial: Turn Off Multi-Daemon Mode and Use Only TCP or UDP](https://openvpn.net/as-docs/tutorials/tutorial--turn-off-multi-daemon.md)
Next: [Tutorial: Reset OpenVPN Web Services and Daemons to Default Settings](https://openvpn.net/as-docs/tutorials/tutorial--reset-web-services-and-daemons.md)
Index: https://openvpn.net/as-docs/llms.txt
