The server for sending telecommands to UoS³ CubeSat
- Requires an Ubuntu Server install on the machine first (Bionic or above).
- Requires a network connection and a way for the user to remotely login.
Download the official Django package for Ubuntu.
Install the Django package on the machine.
Download and install the required NGINX package.
Go to the uos3/uos3/
folder.
Run the following command:
python3 manage.py runserver <IP>:<PORT>
where IP is the desired IP address and PORT is the port number.
The NGINX server can be configured from the init.sh
shell script located at server-init/init.sh
.
This script sets up a test server with credentials-based authentication.
It can also be used to set up SSL/TLS security by generating certificates. To do so, simply run the script with the -ssl
flag.
First make sure that there are certain files in a subfolder called SECRETS/
:
AUTH_USERS
which contains a username on each line. No spaces in the names.SSL_DIR
which contains the path to the directory where the user credentials (and optional certificates) will be stored.- TODO:
SSL_STRONG_CONF
which contains the parameters for strong SSL/TLS security (if certificates are needed).
Once the server is ready and moved over to production, make sure that it is linked to the Django server using e.g. uWSGI.
Once the production server is ready, make sure to do the following in the uos3/uos3/settings.py
file:
- Make sure that SECRET_KEY is hidden.
- Make sure that the DEBUG flag is disabled.
- Make sure that ALLOWED_HOSTS is set so that only authorised hosts can connect.
- The Django server production secret key needs to be stored in the
uos3/uos3/secrets.py
file. As an example, the contents of the file can besecret_key = <KEY>
where KEY is the secret key string. - Make sure that the database file in the
uos3
folder is copied over from the relevant UoS³ project cloud storage.
Mohammed Nawabuddin
Charles West-Taylor
Hubert Khoo Hui Boo