Posted on 8 Comments

Raspberry Pi – Running Spy Server as a service

  • Updated 8th March to clarify the requirement for Spy Server to be pre-installed.
  • Updated 8th Aug 2018 to add a start-up delay to the rtlsdr.service file. This is to ensure that an IP address has been allocated before the Spy Server starts.

The excellent Airspy Spy Server can easily be used as a service using SYSTEMD under Linux. This is a much better way to autostart the server as it gives you the facility to stop/start/check status of the server at any time. I’ve used this facility in my latest Spy Server SD card so you can switch between receiver types without having to reboot the Pi.

NB: These instructions assume that you already have Spy Server installed and working on your Pi. If you haven’t, see my installation post.

Running Spy Server as a Service

The first step is to create a new file called spyserver.service and save it in /etc/systemd/system/.

The simplest way to do this is using nano as follows:

sudo nano /etc/systemd/system/spyserver.service

Now enter the following text into the file and save it (Ctl x y Enter):


Description=Spy Server


ExecStartPre=/bin/sleep 15

ExecStart=/home/pi/./spyserver spyserver.config







You can now start, stop and check the status of Spy Server with the following commands:

sudo systemctl start spyserver.service

sudo systemctl stop spyserver.service

sudo systemctl status spyserver.service

The following command will activate the service to automatically start at boot time:

sudo systemctl enable spyserver.service

That’s it!

Mike – G4WNC

8 thoughts on “Raspberry Pi – Running Spy Server as a service

  1. Thanks a lot for the page Raspberry Pi – Running Spy Server as a service
    its working great with Ayrspy mini on a Raspberry Pi 3 +

    for me it did not autostart the service until i googled and found there is an error
    on your page must be

    nice work thank you

    1. Hi Fernando,

      Glad you’ve found it useful and thanks for spotting that typo. I’ll correct it now.

      Mike – G4WNC

  2. Mike, with the “Update All” command, will only Linux OS updated or also to the newest Spy server version?

    73 Chris DL5NAM

    1. Hi Chris,

      Apologies for the confusion but ‘Update All’ only updates the spy server code and its associated drivers, i.e. rtl-sdr, airspy and airspy HF+.

      If you want to update the OS, you can use the normal sudo apt update && sudo apt -y upgrade.


      Mike – G4WNC

      1. Mike thanks info, sounds good for me if Spy Server updated with this task.

        OS updated is not so important 🙂

        73 Chris DL5NAM

  3. Thank you.
    I used this method for more than spy server .

  4. Thanks for this!

    I had to modify to provide the full path for my config file, but other than that this worked perfect!

    1. Glad to hear it worked. Thanks for letting me know.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.