TagSpaces Pro Web is a web based single page web application. For hosting it you need a web server able to host static content such as .html, .png, and .js files.
This tutorials explains you how to setup the "App Hosting" area located in the upper right part of the following deployment architecture diagram:
The package can be downloaded from the link available in the email you will receive from our payment provider after purchasing the product.
In the terminal you can use for example the wget utility to start the download.
The downloaded package is a ZIP archive file which can be unpacked with this command:
The extracted files will be located in
Change the ownership of all files in the web folder to your www user. In the following example the www user is called
www-user, but this is not mandatory and on your system this user has probably another name.
TagSpaces Pro Web can be installed on any modern web server offering static hosting of files like Apache or nginx.
Copy the content of
./web to a folder which is hosted by your web server e.g.
./www. So listing this folder should look something like this:
It is highly recommended to use HTTPS for connection to your TagSpaces installation, especially if your installation is available on the Internet. In order have HTTPS connection you will need to setup a valid ssl certificate. You can use such for free from provider such as Letsencrypt. Setting up a SSL certificate is not in the scope of this article.
Use static hosting: In order to reduce the attack vectors it is recommended to configure your webserver to deliver only static content by disabling the support of PHP, Perl, ASP.Net, Java and other similar server side scripting language and frameworks
On a Apache or nginx web servers you can setup very easily a basic access authentication, so not everybody knowing the URL of the installation can access the application. This is an optional step, which can be also exchanged with another way for securing the folder hosting the app.
You can go to the folder which contains the TagSpaces web app and create a
.htaccess file with this command:
This file should have the following content:
Replace in this file "/path/to/.htpasswd" with path on your system where you plan to place this file.
In order to create file with user name and password pairs you will need the htpasswd command, which is part of apache2-utils (Debian, Ubuntu) or httpd-tools (RHEL, CentOS) packages. On Debian based Linux distributions you can install apache2-utils with the following commend:
Create a password file with a initial user. Run the htpasswd utility with the -c flag (to create a new file), the file pathname as the first argument, and the username as the second argument:
Press Enter and type the password for youruser at the prompts.
Create optional additional user-password pairs. Omit the -c flag because the file already exists:
You can confirm that the file contains paired usernames and encrypted passwords:
The TagSpaces web app can be configured with an external configuration file called extconfig.js located in the root path of the installation. With this file you can configure for exmaple a custom logo and colors or you can deliver predefined locations and tag library to your users. A documentation of all supported options in this configuration file can be found here.
You can use the property ExtSaveLocationsInBrowser in order to enable the persistence of the location's configuration in the local storage of the user's browser. This is especially useful if you for security reasons do not want to place location configuration (containing access and secret keys) in the extconfig.js. Once enabled the end-user can configure location in her browser and they will be available the next time she uses the app.
This extconfig.js is not part of the installation so it have to be created manually.
After this command the installation folder should look like this: