6.8. Installation and Maintenance#

6.8.1. Installation#

Each installation of software will require different steps. However for a new web app you would at least need to do the following:

  1. Security harden any code e.g.

  • Disable DEBUG mode on your flask app

  1. Prepare and configure a web server connected to the internet

  • Install any necessary software (Python, web server (e.g. NGINX), databases etc)

  • Configure a script or use a service manager (e.g. systemd) to run all software and services automatically on startup

  1. Place the code on the server

6.8.2. Maintenance#

To ensure that your app is secure, it is best to perform regular maintenance to protect against newly discovered vulnerabilities and to setup a monitoring system to detect when problems arise.

Updating and Patching#

  • Libraries and frameworks change over time, often fixing security vulnerabilities. You should regularly update to safe, stable versions - after testing of course!

  • The host operating system should also be updated with security patches as they are released.

Monitoring#

You can monitor in built system logs for anomalies. However there is off the shelf software like Zabbix and Nagios that can provide a greater level of detail and web interfaces for monitoring servers to make your life easier.

Backups#

If you are storing data for your web app you should have automated backups to ensure that data can be recovered if there is a security incident or system failure leading to data loss.