English
nLogin
Search…
⌃K
Links
🔐

Configuring the secret key

Introduction

To ensure that sensitive information is not exposed, nLogin encrypts the messages sent between the proxy server and the backend server. Follow the steps below to configure the encryption key.

Servers hosted on the same machine:

If the proxy server and the backend server are hosted on the same machine (most cases), disable encryption. To do this, remove the secret from the settings.

Proxy server:

Open the file "nLogin/proxy/secret.yml" and change the value of secret to ""
# To ensure that communication between the proxy and the backend server is done in an encrypted way, nLogin creates a random secret key.
# If you leave the value below null, encryption will be disabled (useful for servers where the proxy is hosted on the same machine as the backend).
# To set it up, follow this tutorial: https://www.nickuc.com/docs/nlogin-proxy
secret: ""

Backend server:

Open the file "nLogin/secret.yml" and repeat the same procedure.
# To ensure that communication between the proxy and the backend server is done in an encrypted way, nLogin creates a random secret key.
# If you leave the value below null, encryption will be disabled (useful for servers where the proxy is hosted on the same machine as the backend).
# To set it up, follow this tutorial: https://www.nickuc.com/docs/nlogin-proxy
secret: ""

Servers hosted on different machines:

If the proxy server and the backend server are hosted on a different machine, enable encryption. To do this, use the same secret as the proxy server.

Proxy server:

Open the file "nLogin/proxy/secret.yml" and copy the value of secret as the example below:
# To ensure that communication between the proxy and the backend server is done in an encrypted way, nLogin creates a random secret key.
# If you leave the value below null, encryption will be disabled (useful for servers where the proxy is hosted on the same machine as the backend).
# To set it up, follow this tutorial: https://www.nickuc.com/docs/nlogin-proxy
secret: "VivIvQaijL4ZNfMNlR8u1MbC"

Backend server:

Open the file "nLogin/secret.yml" and paste the value of secret copied in the previous procedure.
# To ensure that communication between the proxy and the backend server is done in an encrypted way, nLogin creates a random secret key.
# If you leave the value below null, encryption will be disabled (useful for servers where the proxy is hosted on the same machine as the backend).
# To set it up, follow this tutorial: https://www.nickuc.com/docs/nlogin-proxy
secret: "VivIvQaijL4ZNfMNlR8u1MbC"
The encryption process used can be costly for your server!
We recommend that you always prefer to use the proxy server and the backend server on the same machine.
*If you use shared hosting, opt for network plans or split plans. If the host does not offer this service, ask them via tickets to migrate both servers (proxy and backend) to the same node (extra service fees may apply).

Proxy configuration

The nLogin installed on the proxy has a special configuration proxy/config.yml. You may want to change some settings.
Remember! You must configure the authentication servers in the authentication-serversoption.
*Only servers that use nLogin should be added.
####################################################################################################
# +----------------------------------------------------------------------------------------------+ #
# | __ _ | #
# | _ __ / / ___ __ _(_)_ __ | #
# | | '_ \ / / / _ \ / _` | | '_ \ | #
# | | | | / /__| (_) | (_| | | | | | | #
# | |_| |_\____/\___/ \__, |_|_| |_| | #
# | |___/ | #
# | | #
# | A practical, secure and friendly authentication plugin | #
# | | #
# | © 2022 - Powered by nickuc.com | #
# | | #
# | | #
# | New options are not automatically added in this file. Default values are used | #
# | if an option is not found. | #
# +----------------------------------------------------------------------------------------------+ #
####################################################################################################
​
# Set the version of the file.
file-version: 2
​
# Defines whether the redirection system should be overwritten by nLogin.
# - This option prevents unauthenticated players from bypassing the authentication server.
override-redirect: true
​
# Defines whether the proxy should check if authentication servers are properly configured.
# - If you are using a server without nLogin (e.g. limbo servers not based on Spigot)
# it is recommended to disable this option.
check-ack-message: true
​
# Sets the list of authentication servers.
# - You must enter this list ALL servers that nLogin is installed on.
# - Most servers use either an authentication server or a main lobby.
# - For more information, go to the tutorial:
# ==> https://docs.nickuc.com/bungeeguard
authentication-servers:
- 'lobby'
​
server-redirect:
# Defines whether players should be automatically forwarded to other servers when they login.
enabled: false
​
# Defines which servers the players should be forwarded to.
# - When entering more than one item, the server will be chosen randomly.
redirect-servers:
- "lobby1"
- "lobby2"
​
# Sets the waiting time when switching the server.
switch-delay: 10
​
# Sets the time (in seconds) to reconnect to the server when the connection fails.
retry-after: 5
​