In this article
The guide below walk you through the setup of the Banana Web Server for macOS.
1. Start Banana Accounting Plus web servers
- Open Banana Accounting Plus.
- Click on menu Tools > Program Options.
- Select the tab General.
- Check the options Start Web Server and Start Web Server with ssl.
In macOS you must use the SSL https://127.0.0.1:8089,+not the localhost.
2. Edit the BananaPlus web server configuration file (httpconfig.ini)
- Click on menu Tools > Program Options.
- Select the tab Advanced.
- Click on System info button

- Select the entry Web Server > Settings file path
- Click on Open path... button

- Open the file httpconfig.ini
Right click > Open with > Other... > select TextEdit. - In the file look for the following properties and edit as indicated:
- accessControlAllowOrigin
Modify the value of property accessControlAllowOrigin to "*" (accessControlAllowOrigin=* ) - accessToken
Modify the value of property accessToken with a password of your choice (e.g. "accessToken=MyPasswordX" )
It is used to have more security when using the Banana Web Server. For more information visit Web Server Security. - authenticationMode (starting from Banana Accounting version 10.2.12)
Modify the value of property authenticationMode to "fixed-token" (authenticationMode=fixed-token).
This is required when using a personal accessToken
- accessControlAllowOrigin
- Save and close the file.
- Restart Banana Accounting Plus.
3. Use your self-signed SSL certificate
Create your own certificate with the macOS Terminal and use it with the Banana Web Server.
a) Remove the existing banana.localhost certificate (if present)
- Close Banana Accounting Plus.
- Open the macOS Keychain Access application (Applications > Utilities).
- Select the Certificates tab and search for banana.

- Right click on the banana.localhost certificate and select Delete "banana.localhost".
- Confirm with Delete and, if requested, enter your system password.
- Close the Keychain Access application.
b) Start Banana Accounting Plus web servers
- Open Banana Accounting Plus.
- Click on menu Tools > Program Options.
- Select the tab General.
- Check the options Start Web Server and Start Web Server with ssl.
In macOS you must use the SSL address https://127.0.0.1:8089,+not localhost. - Close Banana Accounting Plus.
c) Create the certificate
- Open the macOS Terminal application (Applications > Utilities).
- Copy and paste the following commands and press Enter:
mkdir -p ~/banana-cert && cd ~/banana-cert
openssl req -x509 -newkey rsa:2048 -nodes -sha256 -days 825 \
-keyout mybanana.key -out mybanana.pem \
-subj "/CN=Banana Local Web Server" \
-addext "subjectAltName=DNS:banana.localhost,DNS:localhost,IP:127.0.0.1" \
-addext "extendedKeyUsage=serverAuth"Two files are created in the banana-cert folder of your user directory:
- mybanana.pem: the certificate.
- mybanana.key: the private key.
d) Trust the certificate
- In the Terminal, run the following command:
sudo security add-trusted-cert -d -r trustRoot -p ssl \
-k /Library/Keychains/System.keychain mybanana.pem- Enter your system password when requested.
The certificate is added to the System keychain and marked as trusted for SSL.
e) Copy the certificate to the Banana Ssl folder
- In the Terminal, run the following commands to create the Ssl folder and copy the certificate files into it:
mkdir -p "$HOME/Library/Application Support/Banana.ch/BananaPlus/10.0/Ssl"
cp mybanana.pem mybanana.key "$HOME/Library/Application Support/Banana.ch/BananaPlus/10.0/Ssl/"
chmod 600 "$HOME/Library/Application Support/Banana.ch/BananaPlus/10.0/Ssl/mybanana.key"The chmod command makes the private key readable only by your user.
The banana-cert folder is no longer needed and can be deleted.
f) Edit the BananaPlus web server configuration file (httpconfig.ini)
- Open Banana Accounting Plus.
- Click on menu Tools > Program Options.
- Select the tab Advanced.
- Click on System info button.
- Select the entry Web Server > Settings file path.
- Click on Open path button.
- Open the file httpconfig.ini
Right click > Open with > Other... > select TextEdit. - In the file look for the sslCertFile and sslKeyFile properties in the [Https] section.
Enter the path of the certificate files.
Replace username with your macOS user name.
[Https]
sslCertFile=/Users/username/Library/Application Support/Banana.ch/BananaPlus/10.0/Ssl/mybanana.pem
sslKeyFile=/Users/username/Library/Application Support/Banana.ch/BananaPlus/10.0/Ssl/mybanana.key- Save and close the file.
- Restart Banana Accounting Plus.
g) Check the connection
- Open Safari and insert the url https://127.0.0.1:8089.
- The page must open without security warnings.
Certificate validity
The certificate is valid for 825 days, the maximum accepted by macOS.
When it expires, remove the old certificate (see below) and create a new certificate.
Remove the custom certificate
- In the Terminal, run the following commands:
sudo security delete-certificate -c "Banana Local Web Server" /Library/Keychains/System.keychain
rm -r "$HOME/Library/Application Support/Banana.ch/BananaPlus/10.0/Ssl"- Restart Banana Accounting Plus.