Yarkon Server – Setup on a Unix Server

While the simplest way to get Yarkon Server up and running is to use one of the CloudFormation installers, there are situations when you would need to install Yarkon Server from scratch. For instance, if your organization requires you to use a specific version of an OS, or you already have a base AMI that your IT team requires to use for any new install.

If this is your situation, you can install Yarkon Server manually, following these steps.

The following guide assume good familiarity with Unix administration. Please consider the guide a high-level overview of the install process, as this would vary somewhat based on your specific set up and preferences.

Get the files

The first step is to get the files you need for the install.

From us

Contact Us and let us know what are your specific needs, and we would be able to make adjustments as needed.
You will then get from us a tar.gz package including the current stable version of Yarkon Server.

From the public AMI

You can always get the files from the publicly available AMI. Simply start with setting up the FREE Trial in a test environment, then SSH into the server and pull all files from the application folder, which is /var/app/current/. All required files are in this folder and there are no other files required.

Launch your instance

Next, you’d need to start an instance. Yarkon Server works on most Unix distros, and is tested routinely with Debian and Fedora based packages. Note that the instance can be any Unix server – while the natural choice is to run Yarkon Server on an EC2 instance, this is not mandatory, and you can run it on any Unix-like machine.

Install Yarkon on your server

To complete the installation itself, follow these steps:

  1. Create a folder for Yarkon. By AWS convention we recommend using /var/app/current, but you can choose based on your own preference/convention.
  2. Unpack the content of the tar file (or the files you got from the public AMI) into the folder you created. Make sure to have the empty log folder, which is necessary. The package includes a trial license, which you can replace with yours once the server is up.
  3. Verify that the application works by running it. Yarkon is a Unix binary named aphek, and to run it you simply use ./aphek. If all works, a new log file would be created in the folder /log; open it and verify that the startup message is displayed and no errors reported.

Set up for production

To set the server up for production use, you need to ensure the Yarkon application starts on boot up with the proper environment settings. We use the PM2 process manager but you can use whichever you prefer, even a simple startup script.

The PM2 environment file looks like this:

    "apps": [{
        "name": "aphek",
        "script": "./aphek",
        "watch": false,
        "env": {
            "PORT": 80

As you can see, the only thing we do in our standard set up is set the port to 80. Of course, you should set the port to whatever you need based on your load balancer or reverse proxy set up. Note that if you do decide to serve on port 80, you’d have to ensure the service user is privileged to do so (ie, sudo setcap cap_net_bind_service=+ep /var/app/current/aphek when using Ubunto).

If you want to use a database other than the default SQLite that comes pre-installed, you can specify it like this:

    "apps": [{
        "name": "aphek",
        "script": "./aphek",
        "watch": false,
        "env": {
            "PORT": 80,
            "DATABASE_DIALECT": "mysql",
            "DATABASE_HOST": "url.to.database",
            "DATABASE_PORT": 3306,
            "DATABASE_DATABASE": "aphek",
            "DATABASE_USER": "aphek-user",
            "DATABASE_PASSWORD": "password"

A more extensive example of optional environment settings can be seen in this docker compose file (the environment variables are the same for the standalone application and the dockerized version):

version: "3"

    image: "yarkon/server:latest"  # Use the correct tag here
      # Map the port of the host to the one used by Yarkon
      - "80:8000"
      # When running in AWS, the preferred way to provide AWS API keys to the
      # container is through using an IAM machine role. If this cannot be done,
      # or when running it outside of AWS, you can pass credentials here:
      AWS_SECRET_ACCESS_KEY: "examplexcRA2gvPBPKAmt95yWIwz/vJIJexample"
      AWS_REGION: "us-east-1"

      # The provider name defaults to AWS, but you can change it to something
      # your users might find more recognizable. In the client, it is displayed
      # above the buckets and in the About form.
      PROVIDER_NAME: "My Company"

      # Filtering for IAM entities
      IAM_FILTER_USER: "^yarkon" # Only show users that start with "yarkon"
      #IAM_FILTER_GROUP: "^qa" # Only show groups that start with "qa"
      #IAM_FILTER_ROLE: "^qa" # Only show roles that start with "qa"
      #IAM_FILTER: "^qa" # Only show users, groups or roles that start with "qa"

      - dbdata:/var/app/current/database
      - license:/var/app/current/.lic
      - yarkon:/var/app/current/public/yarkon
      - /var/log:/var/app/current/log # Map the /var/log folder on the host to the log folder