-
Notifications
You must be signed in to change notification settings - Fork 1
SSL Support
This feature requires autobet version 1.4.0
As of version 1.4.0, autobet supports SSL for the web user interface. Enabling SSL is required, if you want to receive Desktop/Mobile Notifications from autobet. To learn more about Notification support, check out the wiki page on Notifications.
- Start off by stopping the web server or closing autobet.
- Obtain a SSL Certificate. If you don't currently have a certificate, check out the section on generating SSL Cerificates.
- In order to enable SSL for the web server, place your SSL private key in a file named
ssl_private.pem
and your certificate in a file namedssl_public.pem
in$YOUR_DOCUMENTS_FOLDER/autobet
. Please note that the private key must not be encrypted for this to work. The contents of the config directory should then look like this (notice the private key and the certificate file):
- If done correctly, the 'SSL Enabled' Checkmark in the user interface should be checked (you can click on the checkmark to see more information about the loaded certificate). If the box is not checked, wait for up to a minute, as the program only checks the certificate each minute:
- Re-start the web server, it should now start with SSL enabled.
- Access the web ui with the following address:
https://$YOUR_IP_ADDRESS:8027
- Note that from now on, the web ui is only accessible using https, so make sure to prepend
https://
rather thanhttp://
to the web server's address when trying to access the web ui.
To disable SSL, simply remove ssl_private.pem
and ssl_public.pem
from $YOUR_DOCUMENTS_FOLDER/autobet
. You can also disable SSL by renaming those two files.
Note: This will not allow you to enable Notifications in the web ui, as the certificate must be a trusted one. You could make this certificate a trusted one by installing it in your OS's certificate store. This step will not be described here since doing this is not recommended, as it is is a severe security concern and should not be done if you don't know exactly what you are about to do.
To generate a Certificate using OpenSSL, follow these steps:
- Install OpenSSL and add it to your PATH
- Open up a command prompt and type in the following command (source):
openssl req -nodes -x509 -newkey rsa:4096 -keyout ssl_private.pem -out ssl_public.pem -sha256 -days 365
- Answer the questions asked. Example:
- The certificate files will be placed in the working directory of your command prompt
- After the certificate is loaded by autobet, the certificate information in the UI (click on the checkmark in the 'SSL Enabled' field) may look like this:
- For this to work, you'll need a DNS record, for example from https://www.duckdns.org/.
- Open port 80 (TCP) on your router for your PC. If you don't know how to do this, check the user guide for your router.
- Follow steps 1-4 (choose 'Yes, my web server is not currently running on this machine' in step 4) from this guide: https://certbot.eff.org/instructions?ws=other&os=windows
- You may close port 80 on your router
- Open up ports 8027 and 8028 (TCP) on your router to access the web ui. You may need to open other ports if you changed the port configuration. If you don't want to do this manually, you can also use UPnP to automatically open up the required ports.
- Use
privkey.pem
as your private key andcert.pem
as your certificate file (both files are stored inC:\Certbot\live\$YOUR_DNS_NAME
) - Continue with the instructions on how to enable SSL
- You should now be able to access the web ui on
https://$YOUR_DNS_RECORD:8027
, after starting autobet's web server
Autobet. © MarkusJx 2022. Licensed under the MIT License.