Server Installation on Linux

Modified on Fri, 20 Nov at 5:45 PM

This article guides you through installing the farmerswife Server application on Linux. It is intended for experienced Linux users. If you are upgrading an existing Server, please see the latest Upgrade Instructions instead.


Current version: 7.4 SP3


Key Points to Note

  • farmerswife provides support for the farmerswife applications, not for Linux itself. A Linux System Administrator is a prerequisite for installing the Server.
  • Running the farmerswife Server on Linux is only recommended for companies with a Linux-only server environment and an in-house Linux System Administrator.
  • farmerswife requires Java / OpenJDK 17 (HotSpot). See Installing OpenJDK for farmerswife to find out which version to use.
  • A graphical user interface (GUI) or X11 forwarding is needed to configure the Server. See Before You Begin.
  • Server and Client applications must both run the same version.
  • The Release installers page is password protected. If you don't have the password yet, please email support@farmerswife.com.

Before You Begin

Use of a Graphical User Interface

We recommend installing the farmerswife Server with a graphical user interface (GUI) on the host machine, or on a headless host machine with X11 forwarding. This is needed for its configuration process.


The Server can run as a service with a daemon, but the GUI is required when you need to add, modify or delete users, or change the Server setup.


Tested Distributions

Installations have been tested on Ubuntu 20.04 (Focal Fossa).


Spot-tested Linux distributions:

  • Ubuntu 12.04 LTS
  • Ubuntu 14.04 LTS
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS


The Server might also work on these Linux distributions:

  • Debian 8
  • Debian 9
  • CentOS 7
  • Fedora 27
  • RedHat 7.4
  • Amazon Linux


Other versions may work but are not tested.


Step 1: Install the Required Packages

The following packages are recommended:

  • ZIP
  • Java / OpenJDK 17 (HotSpot): see Installing OpenJDK for farmerswife to find out which version to use.
  • x11-xserver-utils (only on "deb"-based distributions, and if your server doesn't have a GUI)
  • x11-apps (xorg-x11-apps on "RPM"-based distributions, and if your server doesn't have a GUI)
  • xauth (xorg-x11-xauth on "RPM"-based distributions, and if your server doesn't have a GUI)


Please note: the following commands have not been tested and might not work.


Ubuntu 18.04 LTS

sudo apt update
sudo apt install openjdk-17-jre-headless zip unzip x11-xserver-utils x11-apps xauth

Modify sshd_config to allow X11 forwarding.


Debian 9

sudo apt update
sudo apt install openjdk-17-jre-headless zip unzip x11-xserver-utils x11-apps xauth

Modify sshd_config to allow X11 forwarding.


CentOS 7 / RedHat 7.4 / Fedora 27

sudo yum makecache fast
sudo yum install java-1.17.0-openjdk-headless zip unzip xorg-x11-xauth xorg-x11-apps

Modify /etc/ssh/sshd_config to allow X11 forwarding.


Amazon Linux

sudo yum makecache fast
sudo yum install java-1.17.0-openjdk-headless zip unzip xorg-x11-xauth xorg-x11-apps

Modify /etc/ssh/sshd_config to allow X11 forwarding.


Step 2: Download and Install the Server

  1. Go to the Release installers page, open the 7.4-SP3 > Server Installers folder and download the Linux .bin installer file.
  2. Connect to your server with X11 forwarding allowed, and copy the installer to it.
  3. Run the installer and choose an installation folder.


Step 3: Add Your License Files and Configure the Server

  1. Once installed, create a folder called system inside the installation folder you selected, and place your license files in it. If you've just migrated to Linux, also place your database files and any other needed files and folders there.
  2. Launch the farmerswife Server manually with X11 forwarding, by running the binary farmerswife at the root of the installation folder.
  3. Configure users, the SMTP port, Full Backup folders and other settings as needed.


License and Database

If the Server doesn't find a license file when it starts, it asks No License File. Run Demo Version? If you've already placed your license files in the system folder, you won't see this question.

  • If you have your license file: click No, select your license.dat file, and click OK when the Server shows License Installed. Please Re-Start farmerswife. Then quit and restart the Server.
  • To try farmerswife first: click Yes to run in Demo Mode. The Server quits after 60 minutes, and can be started 40 times.

You'll then be asked to choose the Empty Database (recommended) or the Demo Database. The default login for both is User Peter, Password 1. If you've installed your license, change this password or create your own user straight away.


For full details, see Choosing a Database on Installation.


Step 4: Run the Server as a Service

  1. When you've finished configuring the Server, stop it.
  2. Run systemd-installer.sh or initd-installer.sh from the folder it's in. For example, if the script is in /opt/farmerswife-server, use cd to go to that folder and run the script there. This is because the script uses the current directory (pwd) to configure the systemd or init.d service unit. Copies of both scripts are attached to this article.
  3. Start the service. The installation is now complete.


Note: from time to time, you'll need to stop the service and launch the Server manually with X11 forwarding, to add, modify or delete users.


Step 5: After Installing


Something not working? See Installation and Upgrade Troubleshooting, or the Linux-specific issues below.



Known Issues

Adding Users Is Slow

Adding users on the Server can sometimes take a long time, because the host machine doesn't have enough entropy to hash and salt the user password.


To check your entropy, run:

sudo cat /proc/sys/kernel/random/entropy_avail

If the entropy is below 1000, you should generate more so it doesn't take as long. On a Linux desktop, moving the mouse or opening applications is usually enough. On servers, install the rng-tools package and run:

rngd -r /dev/urandom -o /dev/random -b -n 1

On Debian, modify the file /etc/default/rng-tools and add the following line:

HRNGDEVICE=/dev/urandom

Then start the rng-tools daemon:

/etc/init.d/rng-tools start


Troubleshooting

Missing Controls in Server Setup > Financial

Issue: in Server Setup > Financial Section, the add button (+), checkboxes and sub-menu drop-downs are missing.

Cause: the farmerswife Server was launched from an incorrect working directory.

Solution: launch the farmerswife Server from the directory containing its executable binary. For Linux installations, use the following command (adjust the path if necessary):

/bin/bash -c 'cd /home/farmerswife/farmerswife-server && ./farmerswife'

If the Server is launched using a Linux desktop shortcut, make sure the shortcut's executable path (Exec) and working directory (Path) are configured correctly.


If you have any questions about installing farmerswife on Linux, please contact support@farmerswife.com.

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