Skip to main content

Secure Your Gunbot Interface with SSL/TLS

In this guide, you'll learn how to run the Gunbot browser interface securely over HTTPS. Whether you're a Windows, Mac, or Linux user, you'll find straightforward steps to generate a self-signed certificate and configure Gunbot for secure operations.

Preparing for HTTPS Setup in Gunbot​

Before diving into the setup, understand the importance of SSL/TLS certificates in establishing secure connections. For those preferring certificates from recognized SSL providers like Let's Encrypt, the process remains simple. Ensure to rename the certificate files as per your configuration and place them in the Gunbot folder.

Generating a Self-Signed Certificate​

Windows​

Follow these steps to generate a certificate on Windows:

  1. Download and install OpenSSL for Windows from this link.
  2. Navigate to the OpenSSL installation directory, typically C:\Program Files\OpenSSL-Win64\bin.
  3. Open a command prompt as an administrator and run openssl.
  4. Execute the command: req -newkey rsa:2048 -nodes -keyout localhost.key -x509 -days 365 -out localhost.crt. Fill in the prompted details or leave them blank.
  5. Move the localhost.key and localhost.crt files to your Gunbot folder.

Mac​

For Mac users, the process is as follows:

  1. Open Terminal and change directory to your Gunbot folder.
  2. Run the command: openssl req -newkey rsa:2048 -nodes -keyout localhost.key -x509 -days 365 -out localhost.crt. Provide the country code when prompted; other fields are optional.

Linux​

Linux users can generate a certificate using these steps:

  1. Open Terminal. Ensure openssl is installed via your package manager.
  2. Within your Gunbot folder, execute: openssl req -newkey rsa:2048 -nodes -keyout localhost.key -x509 -days 365 -out localhost.crt. As with Mac, enter the country code when prompted.

Configuring Gunbot​

Once you have your certificate, configure Gunbot for HTTPS:

  1. In the config.js file, set the https parameter to true.
  2. Place your certificate files (localhost.key and localhost.crt) in the Gunbot folder.

Handling Browser Warnings​

Upon first connection to the Gunbot GUI with a self-signed certificate, your browser may alert you with a security warning. This is a standard precaution for self-signed certificates. You can bypass this by creating a permanent exception in your browser, ensuring smooth access in the future.

Conclusion​

By following this guide, you can enhance the security of your Gunbot interface with SSL/TLS encryption. Whether you choose to generate a self-signed certificate or use one from an SSL provider, the steps outlined here will help you establish a secure and reliable trading environment.