Setup and work with a separate farmerswife Server

Modified on Wed, 27 Aug at 4:40 PM

This article describes the recommended best practice on working on and with a separate TEST farmerswife (fw) Server. The key part here is, to use the optional "server.cfg" file within the fw Server's "system" folder. Note that this file can also be very helpful on the actual "Production" farmerswife Server app.


##########################################################

IMPORTANT UPDATE 25. June 2025:

The recently released version 7.2.1000 and later uses "secure cookies" for the authentication on Web Client and Mobile Web Client.


This can cause the login to fail and prevent users with valid credentials from logging-in!


Use one of these 2 Resolution options:

  1. Fix by upgrading to latest macOS or Windows host OS of the fw server app .
  2. OR fast local patch: Use the optional server.cfg's new variable "HTTP_XML_AUTH_MODE". The default value for this setting is "cookie" for the "secure cookie" support to be enabled. Exchange "cookie" with "key" to disable it, since it's not supported on the old host OS; change to this: "HTTP_XML_AUTH_MODE key".

If you have NOT used the optional "server.cfg" file before, download the below attached file called "server_http_xml_auth_mode-key.cfg". This file only contains this variable. All other available settings will get flushed into this file on the next fw server app launch.

  • Quit the fw Server app. 
  • Rename the downloaded file to "server.cfg" and move it into the fw Server app's "system" folder.
  • Launch your fw Server app and login to Web Client and Mobile Web Client

##########################################################


A separate TEST farmerswife Server might be needed when running on Beta versions, or new Service Packs or in general when you first want to run an upgrade check or evaluate new modules or new functionality on a separate TEST fw Server installation.


You can always use a fw Server app in "Demo Mode" (also with your database (DB) files) and it will run for 60 min. and you have 40 sessions.


An additional "TEST fw Server" license can be provided upon request, please contact sales@farmerswife.com for pricing information, and include in your request the Company Name, the info of the local static IPv4 address, and the used Operating System of the machine to host the TEST fw Server.


IMPORTANT: farmerswife supports Push and Feed functionality, and various other email notifications (if enabled); and it can be integrated to various other 3rd party systems; and you can also break out folder structures to network shares which are normally locally hosted on the fw Server's host machine, etc.

All this functionality is therefore also enabled by default on a separate new TEST fw Server environment you might be using. And if not handled with care and turned OFF in a good way, this will lead to duplicate or wrong notifications to your users, or update wrong information on your real live Production farmerswife system.

For a "close as possible" TEST environment, copy the "system" folder from your fw PRODUCTION Server, more info below!


Depending on how you use farmerswife, you might also need to copy other files or folders.


Use the "server.cfg" file to control certain vital parts of your separate TEST fw Server:

This "server configuration" file (server.cfg) provides the option to change certain "General tab" settings "outside" of the actual fw Server application. You use this file to ensure certain settings are not enabled on your TEST fw Server.


These settings/variables are available by default on v7.2:


FW_IP 

FW_PORT 

EXTERNAL_PORT 

HTTP_PORT 

HTTP_HOME 

USE_SSL 

HTTP_SSL_PORT 

HTTP_UPLOAD_PORT 

FTP_ALLOW 

FTP_PORT 

FTP_PASV_PORT 

FILE_PORT 

PROXY_FILE_PORT 

FILE_PORT_LOW 

FILE_PORT_HIGH 

MAIL_OK 

MAIL_SERVER 

MAIL_PORT 

MAIL_USER 

MAIL_PASSWORD 

USE_SQL 

SQL_USER 

SQL_PASS 

SQL_DB_HOST 

SQL_DB_NAME 

SQL_PORT 

PRJ_CHECK_FOLDERS 

LDAP_DEBUG 

HTTP_DEBUG 

EXCHANGE_DEBUG 

MAIL_DEBUG 

BARN_ACTIVE 

APNS_ENABLED 

HTTP_XML_PORT 

HTTP_XML_AUTH_MODE <= new v7.2.1000

WEBCLIENT20_ENABLED 

WEBCLIENT20_PORT 

WEBCLIENT20_COM_PORT 

ALLOW_FORCE_RUN_NIGHTLY_SCRIPT 

ALLOW_FORCE_RUN_PLAY_BILLABLES 

TIMED_SCRIPTS_INTERVAL_SECONDS 

MSAD_ENABLED 

USE_EXCHANGE 

READ_SCRIPTS_AS_UTF8 

GOOGLE_SYNC 

A5_ENABLED 

A5_URL 

A5_KEY 

A5_SECRET 

CIRKUS_ENABLED <= This is from the legacy "Cirkus Sync v1" integration, must be disabled on any farmerswife system!

FORCE_SHUTDOWN 

USE_MSAZUREAD 

USE_THREADS 

BACKUP_TIME 

FULLBACKUP_CYCLES 

FULLBACKUP_TIME 

HTTP_HOME_ADD_WEBCLIENT_PORT 

CRK_ENABLED 

CRK_ORG_ID 

CRK_URL 

CRK_READONLY 

CRK_BOOKING_SYNC_ENABLED 

CRK_TR_SYNC_ENABLED 

WEBCAL_ADD_WEBCLIENT_PORT 

FORCE_WEBCAL_URI

GMAIL_OAUTH2_IMPERSONATIONEMAIL <= new v7.2.1000

CALENDARSYNC_ENABLED <= new v7.2.1000

CALENDARSYNC_IMPERSONATIONEMAIL <= new v7.2.1000


These are additional settings/variables not set by default:


APNS_ENABLED

EXCHANGE_DEBUG

HTTP_DEBUG

LDAP_DEBUG


Note: Since v6.4 these two settings/variables are special, because on a "standard" and "not externally proxied" fw Server installation, both of these must have the SAME port value!


FILE_PORT
PROXY_FILE_PORT


On our "Demo DB" these settings/variables will look like this:


FILE_PORT 24000

PROXY_FILE_PORT 24000


Note: Only licensed features and their variables will be effected by any changes within this .cfg file.


A proper fw TEST installation works like this:

- Quit your farmerswife PRODUCTION fw Server.
- Create a file called "server.cfg" within your PRODUCTION fw Server's "system" folder.
- Start up your PRODUCTION fw Server for the first time with the "server.cfg" file in place, then Quit it again, to trigger flushing your existing configuration settings into this "server.cfg" file.
- Install the TEST fw Server application on your test machine.
- Now copy at least the "system" folder from your fw "PROD" Server to within your "TEST" fw Server's installation folder. If you have the time, feel free to also copy the "files" folder; and if you have customized anything within the "html_templates" or "/lib/scripts/...", copy these sub-folders, and IF you are using anything "customized" within these folders, the related files might need to be copied as well.

BEFORE (!) the first start-up of the TEST fw Server, edit the server.cfg file with a text editor application within your TEST WIFE Server's "system" folder and add or set at least these variables to "0", like this:


MAIL_OK 0

USE_SQL 0

PRJ_CHECK_FOLDERS 0

APNS_ENABLED 0

MSAD_ENABLED 0

USE_EXCHANGE 0

GOOGLE_SYNC 0

CIRKUS_ENABLED 0

USE_MSAZUREAD 0

CRK_ENABLED 0

GMAIL_OAUTH2_ENABLED 0

CALENDARSYNC_ENABLED 0


Save the server.cfg file. Copy it again to a "safe" location on your test machine, so you can re-use it for the next DB file updates.
Now start your TEST fw Server application.


NOTE: to test "Allow Mail" functionality from a "test" fw Server, you can use for example a service like "Mailtrap" (http://mailtrap.io).

You then need to update this variables with your access details:


MAIL_OK
MAIL_SERVER
MAIL_PORT
MAIL_USER
MAIL_PASSWORD


Repeat the above steps, for any upgrade or repeated update of the "system" folder on your Test fw Server.
We recommend to save the correctly configured "server.cfg" file for the TEST environment in a good way, and then simply replace it prior to the first start-up.


NOTE: 

Once you have properly configured your TEST fw Server as mentioned above, you can save time in the future and only copy these files from your PRODUCTION fw Server > from within the "system" folder ... if no "relevant" changes have been applied in the meantime:

  • current45.efdb
  • fwdb.db3
  • histories.db3
  • despatches.db3


If "relevant" changes have been applied, e.g. new logos in /system/label_images were added, or old data was archived, or HTML Templates or info in lib/scripts has been changed, etc. then you also need to include the files and folders as explained above for the initial data-set copy from PROD to TEST.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article