Server Installation Guide


Installation on Linux


This guide describes how to install PowerFolder Server on Linux based operating systems.

1. Before you start

Some points to note:

  1. Please check the minimum requirements, which are necessary to install and run PowerFolder Server. Further details can be read on the Server System Requirements page.
  2. Make sure you either requested a trial license or purchased a commercial license for PowerFolder Server. You will need the account email you requested/purchased with and the current password for the account to activate the server.
  3. You must be able to operate a Linux command prompt to continue. If not, please contact your system operator to assist you or take a look at our managed Cloud Server products.
  4. We recommend to create a dedicated user for running PowerFolder Server on the system and create a home folder for that user, where you place the program files and resources as described later on this page.

Creating a dedicated user

On most Linux based systems the process of creating a user and a home directory for this user can be accomplished by a simple command:

useradd -m <username> # Creates the user and sets his home directory

Adjusting limits for open file handles

Since PowerFolder Server needs to work with a lot of files, it is strongly recommended to raise the maximum number of possible open files, so you don't run into problems when your installation is becoming larger.

On most Linux systems this can be done by editing the file /etc/security/limits.conf and adding two lines below: 

<user> soft nofile 128000
<user> hard nofile 256000

(warning) <user> needs to be replaced by the name of the dedicated user you created above.

Some systems may require the PAM module to limit sessions to be loaded:

/etc/pam.d/system-auth
 session required pam_limits.so

(info) Fixes the log file error: Too many open files

Adjusting limits for inotify watches

PowerFolder Server is using inotify to watch for changes in the filesystem. For the same reason the open file handles limit was raised before, we also need to raise the number of the maximum possible inotify watches.

This can be done by instructing the kernel to raise the limit using the command below:

echo '262144' > /proc/sys/fs/inotify/max_user_watches

However the above command is just temporary till the server restarts. To make this change permanent, you have to edit the file /etc/sysctl.conf and add/edit the line below:

fs.inotify.max_user_watches=262144

(info) Fixes the log file error: Error watching /mnt/PowerFolders/myfolder : No space left on device

Adding support for UTF-8

PowerFolder needs to be able to store files with UTF-8 encoded filenames to support clients which synchronize files using special characters from other languages.

Please make sure the Linux Kernel you are running supports this. In the Linux Kernel configuration please set File systems > Native language support > Default NLS Option to UTF-8 and make sure NLS UTF-8 is checked at the end of the list.

The PowerFolder-Server.sh startup script already includes setting the locales to the correct values, however you can also add the two lines below to the .profile file in the home directory of the user, who runs PowerFolder Server. If it doesn't exist you can create it there.

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

In the care that the support for UTF-8 is not available, run the following comand as sudo: 

sudo locale-gen "en_US.UTF-8"

Disabling SELinux

Some Linux distributions come with SELinux pre-installed and activated. SELinux is known to interfere with the PowerFolder Server reverse proxy and HTTP tunneling mechanism, which is also used in cluster environments. Therefore SELinux needs to be disabled before running PowerFolder Server. To disable SELinux:

  1. Open /etc/selinux/config with a text editor
  2. Change the value for SELINUX to disabled. Example: 

    SELINUX=disabled
  3. Reboot the machine.
  4. Check if SELinux is now disabled:

    cat /selinux/enforce


    (tick) If it's disabled the returned value should be 0.


Overview:


2. Download and extract the installation package

  1. Download the .tar.gz distribution for Linux based servers from our server release notes site.
  2. Place the .tar.gz file in the home directory of the dedicated user for PowerFolder Server. The process of creating a user and a home directory for that user is described in the first section on this page.
    (info) We recommend to place the program files into a sub-directory of your home directory, e.g. "/home/<username>/powerfolder". 
  3. Extract the .tar.gz file with the command "tar zxvf PowerFolder-Server-Latest.tar.gz.

3. Using an external database (Recommended)

For evaluation purposes and in small to mid-sized installations you use the internal database which is delivered with PowerFolder Server. There is no additional setup needed for that, since it is running out-of-the box if no other external database is defined.

In larger installations or when planning a scale-up over time, we recommend to use an external database. The steps needed to set this up, are described in our database setup guide.

(warning) Later migrations from the internal database to an external one is currently not supported, therefore this one should be considered before setting up a live environment.

4. Start PowerFolder Server

Since the basic preparations are now finished, you can continue to start the installation:

  1. Go to the installation directory where you extracted the contents of the the installation package.
  2. Start the server:

    ./PowerFolder-Server.sh start


    (warning) Please note that the file PowerFolder.sh needs executable permissions for the user who starts PowerFolder Server. If the permissions are not correct, please set them:

    chmod u+x PowerFolder-Server.sh


    (info) If the web console is not immediately ready, please give it up to five minutes and try again.

5. Start PowerFolder Server with systemd

To enable auto start behavior for Linux it is needed to create a PowerFolder.service file in /etc/systemd/system

PowerFolder.service
[Unit]
Description=PowerFolder-Server

[Service]
Type=forking
User=<OS-username>
PIDFile=/home/<OS-username>/.PowerFolder/PowerFolder-Server.pid
ExecStart=/home/<OS-username>/PowerFolder-Server/PowerFolder-Server.sh start
ExecReload=/home/<OS-username>/PowerFolder-Server/PowerFolder-Server.sh reload
ExecStop=/home/<OS-username>/PowerFolder-Server/PowerFolder-Server.sh stop

TasksMax = 31000
LimitNOFILE = 512000
LimitMEMLOCK = infinity

[Install]
WantedBy=multi-user.target

Use the following commands to register the service in systemd.

Register service
sudo systemctl enable PowerFolder.service
sudo systemctl daemon-reload


  1. If you have your database installed on the PowerFolder Server you also can add to the Unit section:
    1. Wants=<database service file> (e.g. mysql.service)
  2. If you are using an Apache web server you can add this too, to the "Wants=" parameter.
  3. The "Wants=" parameter can also be replaced with the stricter "Requires=" Parameter.
  4. User must not be root!

This can only work when editing the PowerFolder-Server.sh file. You need to show the file where PowerFolder is installed:

e.g.: SERVER_INSTALL=/home/<OS-username>/PowerFolder-Server

If you don't configure this parameter the server won't find its Java executables and will state this as the error in Log Files of systemd.

After doing all the above steps you can control your PowerFolder server with systemd the supported commands are

  • START Startup the PowerFolder server.
  • STOP - Shutdown the PowerFolder server.
  • RESTART - Stops and Starts the PowerFolder server.
  • RELOAD - Reloading the configuration from the server-configuration file. Some parameters might need a restart. Check our Wiki article "Server Configuration File" if the desired parameter needs a restart or not.
  • STATUS - Shows the current status of the service.

The commands only works if the server got started via systemd.

6. Configure PowerFolder Server

Now initial installation steps are done and your PowerFolder Server is ready for configuration and adding the first users. Please continue with our configuration guide.




Installation on Windows


This guide describes how to install PowerFolder Server on Windows based operating systems.

1. Before you start

Some points to note:

  1. Please check the minimum requirements, which are necessary to install and run PowerFolder Server. Further details can be read on the Server System Requirements page.
  2. Make sure you either requested a trial license or purchased a commercial license for PowerFolder Server. You will need the account email you requested/purchased with and the current password for the account to activate the server.
  3. Some anti-virus or internet security solutions may interfere with the installation of PowerFolder Server. If you encounter any problems in that regards, we recommend to disable your anti-virus solution temporarily until the installation is finished.
  4. Make sure that your Firewall allows inbound connections on port 1337 and port 8080 and in addition port 443 in case you use SSL
  5. If you plan to create a public cloud you should set a registry entry to raise the service timeout of windows. Because stopping the service might take a long time when there are many folders on your system and Windows might kill your service while stopping.
    1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
    2. New DWORD (32-bit) -> ServicesPipeTimeout
    3. Value (Decimal): e.g. 240000 (4 minutes)
    4. You may set this value higher. It won't impact your system performance. Windows will only wait longer before a service that gets stopped gets killed because of this timeout.
Overview:



2. Install using the Installation Wizard

  1. Download the Windows Installer distribution for Windows based servers from our download site.
  2. Run the installer file to start the installation wizard.
    (Info) If you receive a request from Windows User Account Control (which is turned on by default on Windows Server 2008 R2/Windows 7 and higher operating systems) which asks you to allow the program to make changes to your computer, please select 'Yes'. If you do not agree, the installer won't continue the installation.
  3. The first page will show you the license agreement. To agree to the license please select the "I agree" button.
  4. In the next step you have to select a destination folder, where the program files will be placed. After selecting the destination, please click on the "Install" button.
  5. The installer will now continue to install PowerFolder Server to your computer.
    (Haken) After the installation has finished, the installation wizard will automatically launch the PowerFolder Server system service. On its last page the installation wizard will offer you to open the web console in your default browser.

(Info) Please note: The installation wizard will install PowerFolder Server as a Windows system service using the 'SYSTEM' user account. You can change this account to an existing or new user account, however you have to make sure the user has access permissions to the storage where PowerFolder Server creates new folders or where existing folders are located.

3. Using an external database (optional)

For evaluation purposes and in small to mid-sized installations you use the internal database which is delivered with PowerFolder Server. There is no additional setup needed for that, since it is running out-of-the box if no other external database is defined.

In larger installations or when planning a scale-up over time, we recommend to use an external database. The steps needed to set this up, are described in our database setup guide.

(Warnung) Later migrations from the internal database to an external one is currently not supported, therefore this one should be considered before setting up a live environment.

4. Using LDAP authentication for users (optional)

In most company networks a central user database which also supports LDAP authentication is already available, therefore PowerFolder Server offers the possibility to connect to LDAP to authenticate users which exist in a directory.

(Info) This step can also be configured later using the web console by the administrator of PowerFolder server.

We provided a detailed description about the steps necessary in our LDAP authentication setup guide.

5. Configure PowerFolder Server

Now initial installation steps are done and your PowerFolder Server is ready for configuration and adding the first users. Please continue with our configuration guide.