hcra/server
Samuel Sloniker 92337cb000 Add SaaS backend
This backend works just like the X11 backend, except it starts HamClock
on its own rather than relying on an existing instance. As the name
implies, it is intended for SaaS environments where multiple HamClocks
may be running on a single machine, and running unused instances would
be a significant waste of resources.
2021-07-10 18:51:15 -07:00
..
backends Add SaaS backend 2021-07-10 18:51:15 -07:00
conf.txt Add port config 2021-07-10 14:50:31 -07:00
crops.json Several improvements and rearranged files 2021-06-17 14:33:40 -07:00
imgproc.py Replace os.system with subprocess 2021-06-19 13:17:02 -07:00
parse_config.py Configuration file (#15) 2021-06-20 16:37:04 -07:00
pwhash.py Document the server 2021-07-05 12:11:32 -07:00
README.md Add documentation 2021-07-05 12:55:41 -07:00
requirements.txt Document the server 2021-07-05 12:11:32 -07:00
ubuntu_pkgs.txt Document the server 2021-07-05 12:11:32 -07:00
wss.py Add port config 2021-07-10 14:50:31 -07:00

HCRA Server

This is the server for HamClock Remote Access. It is a Python web app written using Tornado.

On its own, the server is useless; it requires HamClock, available at http://clearskyinstitute.com/ham/HamClock/ (installed on the same machine as the HCRA server), and the HCRA client (see ../client).

Installation

The server itself does not need to be installed; it is simply run with python3 wss.py in this directory. However, it does have some dependencies (both Python packages and binaries).

Python packages

pip3 install -r requirements.txt

Binaries

Ubuntu, Mint, possibly Debian, etc.

sudo apt install $(cat ubuntu-pkgs.txt)

Other distros

Unfortunately, I only have Mint computers, so I can't help with other distros.

You will need the following:

  • ImageMagick 6
  • X11 development headers
  • Xvfb
  • xdotool
  • xwd

Backends

The server can connect to HamClock in one of two ways; it can either use HamClock's built-in port 8080 service, or it can use X11. The X11 method is highly recommended when it can be used, because it does not occasionally freeze when HamClock is on certain screens like the port 8080 backend does.

Port 8080

The Port 8080 backend just requires a running instance of 800x480 HamClock.

X11

The X11 backend requires 800x480 HamClock to be running on Xvfb at a resolution of 800x480x24.

For example:

Xvfb :1 -screen 0 800x480x24

Replace :1 with the desired display number.

conf.txt

The server will not work without a conf.txt file. This file is a space-separated table of configuration data. See the included file for a reference. (That file will work for testing, but should not be used on an Internet-accessible server. The password is Testing123. It uses the X11 backend, DISPLAY=:1.)

backend

Use x11 for the X11 backend, or port8080 for the port 8080 backend.

display

X11 display to use, such as :1. Must be the same as the one used for Xvfb and HamClock. Has no effect with the port8080 backend.

password_argon2

Argon2-hashed password. Use pwhash.py to generate a hashed password.