If you want to monitor your websites, applications or servers and get visual feedback like screenshots, Espial might be the solution you're looking for. Espial is an open-source tool that can scan URLs and report data like page response time, HTTP status code, certificate expiration, whois record, and more. In this tutorial, we'll walk you through the process of installing Espial on Ubuntu Server latest version.
First, we'll check if our Ubuntu Server is up to date and upgrade it if necessary. Open a terminal shell and execute the following commands:
sudo apt-get update
sudo apt-get upgrade
If new updates are available, you'll be prompted to confirm the installation.
Espial requires several dependencies to work properly. We'll use the APT package manager to install them. Run the following command:
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip python3-venv chromium-browser xvfb
This command will install the following packages:
build-essential
: a package that contains a set of essential tools like GCC, make, and libc headers.libssl-dev
: a package that contains the SSL development libraries and header files.libffi-dev
: a package that contains the FFI development libraries and header files.python3-dev
: a package that contains the Python development libraries and header files.python3-pip
: a package that installs the Python package manager (pip).python3-venv
: a package that installs the Python virtual environment tool (venv).chromium-browser
: a package that installs the Chromium web browser.xvfb
: a package that installs a virtual X server, required to run headless browsers.Confirm the installation when prompted.
Now that we have all the dependencies installed, we'll clone the Espial repository from Github. Run the following command:
git clone https://github.com/jonschoning/espial.git
This command will create a new directory named espial
in your current working directory containing the source code of Espial.
To avoid conflicts with your system's Python packages, it's recommended to install Espial in a Python virtual environment. We'll create a new virtual environment for Espial and activate it. Run the following commands:
cd espial
python3 -m venv venv
source venv/bin/activate
This will create a new directory named venv
inside the Espial directory and activate the virtual environment. You should see the virtual environment's name ((venv)
) in your terminal prompt indicating that you're using the virtual environment.
With the virtual environment activated, we'll install Espial dependencies using pip. Run the following command:
pip install -r requirements.txt
This will install all the required Python packages declared in the requirements.txt
file.
Before we can run Espial, we need to configure some settings. Copy the example settings file to the actual settings file using the following command:
cp config.example.py config.py
Then, open the config.py
file in your favorite text editor and modify the variables according to your preferences. Some variables you may want to change are:
DATABASE_URI
: the URI of the database where Espial will store the data.SECRET_KEY
: a random string used to secure your sessions.BROKER_URL
: the URL of the message broker used for Celery tasks.CELERY_RESULT_BACKEND
: the URL of the result backend used for Celery tasks.MAX_WORKERS
: the maximum number of workers used for Celery tasks.Espial requires a database to store the data. We'll initialize the database using Flask's CLI. Run the following command:
flask db init
flask db migrate
flask db upgrade
This will create a new migration directory named migrations
and apply the migrations to the database.
Finally, we can run Espial using Flask's CLI. Run the following command:
flask run
This will start the Flask development server and make Espial available at http://localhost:5000/
.
To run Espial in production, you'll need to use a proper web server like Apache or Nginx and a production-ready message broker like RabbitMQ or Redis.
In this tutorial, we've shown you how to install Espial on Ubuntu Server latest version. Espial is a powerful tool that can help you monitor your websites, applications or servers and get visual feedback. By following this tutorial, you should be able to install Espial and start using it on your Ubuntu Server.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!