Nova Astronomical Tracker Setup Guide
This guide walks you through setting up your Flask astronomical tracking app, including creating a virtual environment and installing all required dependencies.
1. Install Python 3 (if applicable)
Using Homebrew (recommended):
1. Open Terminal.
2. Install Python 3 by running:
brew install python
3. Verify the installation:
python3 --version
pip3 --version
2. Create a Project Directory
1. Open Terminal.
(Optional) change the directory to where you want the software folder to be installed
2. Clone the repository and open the new directory
git clone https://github.com/mrantonSG/nova_DSO_tracker.git
cd nova_DSO_tracker
3. Set Up a Virtual Environment
1. Create a virtual environment named `nova`:
python3 -m venv nova
2. Activate the virtual environment:
source nova/bin/activate
Your terminal prompt should now start with `(nova)`.
4. Install Required Dependencies
Install the required Python packages:
pip install Flask numpy pytz ephem PyYAML matplotlib astroquery astropy flask_login python-decouple python-dotenv cerberus
(Optional) Verify installed packages:
pip freeze
5. Run the Application
1. With your virtual environment activated, run:
python nova.py
2. Open your browser and navigate to:
http://localhost:5001
Note: The first startup may take a minute.
6. (Optional) Deactivate the Virtual Environment
When finished, deactivate by running:
deactivate
7. (Optional) Running it in the background
if you want to close the terminal window, for instance after starting the software on a server, start it like that:
nohup python3 nova.py > app.log 2>&1 &
once you want to later stop it, look for the process:
ps aux | grep python
and stop it:
kill <the number you've found>
Additional Notes
User Modes in Nova
Nova supports two user modes:
– Single-user mode: Uses a single configuration file (`config_default.yaml`). This is the default setting.
– Multi-user mode: Each user has a separate configuration file. Ideal for embedding into external websites where advanced user management is handled externally.
– Guest mode: Provides automatic access without requiring login credentials, offering a basic overview and limited functionality to give new users a general impression of the app.
Basic user management is built-in primarily for testing or simple use cases, with user credentials (IDs and passwords) stored securely in the `.env` file. For integration into a website, it’s recommended to handle user management via the website itself.
Switching Modes
To enable multi-user mode, update or add the following line in your `.env` file:
SINGLE_USER_MODE=False
To revert to single-user mode:
SINGLE_USER_MODE=True
Installation on a server
In case you want to have access from various different devices (computers, iPad …) from within or outside of your home network, you can install it on a server. The software is now optimized to run on a Raspberry Pi5 with good performance. In order to still being able to send objects to Stellarium, please read “[stellarium_access_from_server](stellarium_access_from_server.md)”.
Tip for Raspberry Pi 5
For better performance, run Nova with Gunicorn, a lightweight WSGI server. This reduces CPU load and improves response times compared to the built-in Flask server.
Install gunicorn:
pip install gunicorn
start the app:
gunicorn -w 4 -b 0.0.0.:5001 nova:app
Upgrading from an older version
First step: copy your config yaml to a safe place. You can use the “download configuration” function under configuration. After that, replace the files in your nova directory or you do a clean install (recommended)
For the clean install you just follow the setup guide. Once all steps are done, copy your config yaml back into the new folder (“upload config”) and start the app.