From df4784e7b98729b8445199d83d68d74ae748122c Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 16 Dec 2017 03:00:43 +0100 Subject: [PATCH 1/2] add service file --- freqtrade.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 freqtrade.service diff --git a/freqtrade.service b/freqtrade.service new file mode 100644 index 000000000..76f9b6016 --- /dev/null +++ b/freqtrade.service @@ -0,0 +1,14 @@ +[Unit] +Description=Freqtrade Daemon +After=network.target + +[Service] +# Set WorkingDirectory and ExecStart to your file paths accordingly +# NOTE: %h will be resolved to /home/ +WorkingDirectory=%h/freqtrade +ExecStart=/usr/bin/freqtrade --dynamic-whitelist 40 +Restart=on-failure + +[Install] +WantedBy=default.target + From 597f08e2a28010b952be126913cd3fc5abd60f2a Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 16 Dec 2017 03:00:51 +0100 Subject: [PATCH 2/2] update README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index fa80c9e26..6df12d3e6 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,14 @@ $ docker start freqtrade You do not need to rebuild the image for configuration changes, it will suffice to edit `config.json` and restart the container. +#### systemd service file +Copy `./freqtrade.service` to your systemd user directory (usually `~/.config/systemd/user`) +and update `WorkingDirectory` and `ExecStart` to match your setup. +After that you can start the daemon with: +```bash +$ systemctl --user start freqtrade +``` + ### Usage ``` usage: main.py [-h] [-c PATH] [-v] [--version] [--dynamic-whitelist [INT]]