Skip to main content

Binary Deployment

About 2 min

Binary Deployment

For single node deployment, the gorse-in-one single binary can be used.


For the multi-node scenario, binary deployment is not recommended.


Gorse depends on the following software:

  • Cache storage database, one of MySQL, PostgreSQL, MongoDB or Redis.
  • Data storage database, one of MySQL, PostgreSQL, ClickHouse or MongoDB.

The minimal versions of dependent software are as follows:

SoftwareMinimal VersionCompatible Product
MySQL5.7MariaDB >= 10.2

Run Gorse-in-one

  1. Download Gorse-in-one from GitHub Release.
# For amd64 CPU:
wget -O

# For arm64 CPU:
wget -O
  1. Install Gorse-in-one.
sudo unzip -d /usr/local/bin
  1. Create a configuration file config.toml based on the configuration templateopen in new window.

  2. Run Gorse-in-one.

gorse-in-one -c config.toml 

Flags of Gorse-in-one

There are command line flags for Gorse-in-one:

FlagDefault ValueDescription
-c-c,--configConfiguration file path.
--debugDebug log mode.
-h--helpHelp for gorse-in-one.
--log-pathPath of log file.
--log-max-sizeMaximum size in megabytes of the log file.
--log-max-ageMaximum number of days to retain old log files.
--log-max-backupsMaximum number of old log files to retain.
--master-cache-pathmaster_cache.dataMaster node cache path.
--playgroundPlayground mode.
-v--versionGorse version.
--worker-cache-pathworker_cache.dataWorker node cache path.
--worker-jobs1Worker node working jobs.

Setup Systemd (Linux)

  1. Create directories for the log file and the cache file.
sudo mkdir -p /etc/gorse/
sudo mkdir -p /var/log/gorse/
sudo mkdir -p /var/lib/gorse/
  1. Copy the configuration file to /etc/gorse:
sudo mv config.toml /etc/gorse/
  1. Create the systemd configuration file at /etc/systemd/system/gorse.service:
Description=Gorse, an open source recommender system service written in Go.

ExecStart=/usr/local/bin/gorse-in-one -c /etc/gorse/config.toml \
    --log-path /var/log/gorse/gorse.log \
    --cache-path /var/lib/gorse/

  1. After that you're supposed to reload systemd:
sudo systemctl daemon-reload
  1. Launch Gorse-in-one on system startup with:
sudo systemctl enable gorse
  1. Launch Gorse-in-one immediately with:
sudo systemctl start gorse
  1. Check the health and logs of Gorse-in-one with:
systemctl status gorse

Setup Service (Windows)


Gorse service on Windows requires NSSMopen in new window installed.

  1. Create directories for the log file and the cache file.
New-Item -Type Directory -Path $env:ProgramFiles/Gorse/log
New-Item -Type Directory -Path $env:ProgramFiles/Gorse/data
  1. Copy the configuration file to C:/Program Files/Gorse/bin:
Move-Item config.toml -Destination $env:ProgramFiles/Gorse/bin
  1. Create service using NSSMopen in new window.
nssm install Gorse $env:ProgramFiles\Gorse\bin\gorse-in-one.exe
nssm set Gorse AppParameters -c bin\config.toml --cache-path data\
nssm set Gorse AppDirectory $env:ProgramFiles\Gorse
nssm set Gorse AppStdout $env:ProgramFiles\Gorse\log\gorse.log
nssm set Gorse AppStderr $env:ProgramFiles\Gorse\log\gorse.log
nssm start Gorse