{% extends "../help_page.html" %} {% block help_content %}
If you want to run a copy of Spothole with different configuration settings than the main instance, you can download it and run it on your own local machine or server.
You will require Python version 3.10 or later. If you encounter an error about gdal-config during the
following process, you will also need libgdal-dev installed.
To download and set up Spothole on a Debian server, run the following commands. Other operating systems will likely be similar.
git clone ssh://git@git.ianrenton.com/ian/spothole.git
cd spothole
python3 -m venv ./.venv
source .venv/bin/activate
pip install -r requirements.txt
deactivate
cp config-example.yml config.yml
Then edit config.yml in your text editor of choice to set up the software as you like it. Mostly, this
will involve enabling or disabling the various providers of spot and alert data.
By default, all outdoor programme providers are enabled, as is one cluster node and the NG3K DXpedition data. The RBN spot providers are turned off by default due to the volume of traffic from CW/RTTY/FT8 skimmers, and the APRS and Packet spot providers are off by default on the assumption that Spothole users want a spot with a human at the other end of it, but all can be easily re-enabled.
Other parameters you will want to update include the base URL to your instance, and whether you want to serve a full web-based DX cluster interface or just the API endpoints for client software to use.
config.yml has an entry for a Clublog API key. If provided, this will allow Spothole to retrieve some
more information about DX spots. The software will work just fine without it, but you may find a few country flags
etc. are less accurate or missing. Clublog API keys are free, but you'll need to get your own by submitting a
helpdesk ticket and explaining what you'll use it for. The admin team are happy with the rate of requests made by the
main spothole.app server, so unless you change the source code of yours to radically increase the rate
of querying Clublog, they should be fine with your server too.
If your server is public and allows spots to be submitted, you may want to protect it from bots and spammers by
setting protect_spot_submission to true and setting the reCAPTCHA keys in
config.yml. Users of the web interface will then need to solve a CAPTCHA to submit a spot. Third-party
client software can't do that, so if you want to allow a particular client to submit spots, generate an API key for
it, add it to the api_keys list in config.yml, and send it privately to the client's
developer. They send it in the X-API-Key header of each request, and Spothole will accept their spots.
To revoke a key, remove it from the list and restart Spothole. If protect_spot_submission is
false, anyone can submit spots and API keys aren't needed.
Once you're happy with the content of config.yml, you can proceed to running the software.
To run the software this time and any future times you want to run it directly from the command line:
source .venv/bin/activate
python3 spothole.py
The software can take a few seconds to start up, particularly if it's been run previously and has a large amount of
cache data to sort through. This is normal, don't panic! Once you see You can access your copy of Spothole at
http://localhost:8080 in the log, your server is good to go.
If you see some errors on startup, check your configuration, e.g. in case you have specified a port for the web server that is already in use by something else.
{% end %}