-
Notifications
You must be signed in to change notification settings - Fork 230
Installation
There are two ways to get the source of Hashtopolis:
- Clone the full repository to the location on the web server where it should run, protect the directories which are outside of
src
and keep the git repository intact. - Download the bundled version (https://archive.hashtopolis.org/server) which only contains the files which are required to run Hashtopolis (without CI and doc folder), extract it at the desired location.
NOTE: If you don't use one of these ways, updates will not be possible to applied directly. If you're hesitating to download the bundled version, you can bundle it yourself from the repository by navigating into the ci/
directory and run ./bundle.sh
. With the created zip you then can proceed the same as with the bundle download.
Please check that you have the proper permissions set on files and folders within Hashtopolis' webroot.
After the above is complete navigate to your Hashtopolis URL with your favorite browser and you should automatically be forwarded to the installation procedure.
IMPORTANT Instructions not ready yet
With the release of version 0.14.0 the default installation method for Hashtopolis has been changed from using the bundled version to using Docker images. Currently, the Docker images are not hosted yet at the docker-hub, so you have to built them yourself.
Requirements:
- Instructions tested on Ubuntu 22.04
- Install docker, https://docs.docker.com/engine/install/ubuntu/
- Install docker compose v2 https://docs.docker.com/compose/install/linux/#install-using-the-repository
- Clone the web-ui repo:
git clone https://github.com/hashtopolis/web-ui.git
cd web-ui
- Build the web-ui repo and tag it
docker build . -t hashtopolis-web-ui:latest
- Move one directory back
cd ..
- Clone the server repo:
git clone https://github.com/hashtopolis/server.git
cd server
- Copy the env.example and edit the values to your likings
cp env.example .env
- Build the server docker image
docker compose build
- Start everything
docker compose up
- Access the new Hashtopolis UI through: http://127.0.0.1:8080 and the new Hashtopolis UI through http://127.0.0.1:4200
This method is not supported and only here to give some guidance. It recommended way to deploy Hashtopolis from version 0.14.0 is to use Docker.
OS Ubuntu 22.04
Install the requirements
sudo apt update && sudo apt upgrade
sudo apt install mysql-server
sudo apt install apache2
sudo apt install libapache2-mod-php php-mysql php php-gd php-pear php-curl
sudo apt install git
sudo a2enmod rewrite
Secure the mysql installation by running mysql_secure_installation
Download the release bundle from: https://github.com/hashtopolis/server/releases
Unzip the release zip to and change the ownership
sudo unzip server-x.x.x.zip -d /var/www/
sudo mv /var/www/server-x.x.x /var/www/hashtopolis-server
sudo chown -R www-data:www-data /var/www/hashtopolis-server
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo composer install --working-dir=/var/www/hashtopolis-server
New Angular web-ui
Download the web-ui release via https://github.com/hashtopolis/web-ui/releases Unzip the release and open a terminal inside the web-ui folder
unzip web-ui-x.x.x.zip
cd web-ui
# Install nodejs, see https://github.com/nodesource/distributions#debinstall
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install Angular and the dependencies
npm install
# Edit the application file to point it to the hashtopolis server:
sed -i 's/localhost:8080/<ip of hashtopolis backend server>:8080/g' src/config/default/app/main.ts
# Build a package to be used with apache
npm run build
sudo mkdir -p /var/www/hashtopolis-web-ui/
sudo cp -r dist/* /var/www/hashtopolis-web-ui/
sudo chown -R www-data:www-data /var/www/hashtopolis-web-ui/
sudo vi /etc/apache2/site-enabled/000-default.conf
# Replace the file with roughly the following contents
<VirtualHost *:8080>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/hashtopolis-server/src
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/hashtopolis-server/src/">
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:4200>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/hashtopolis-web-ui
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
sudo vi /etc/apache2/ports.conf
# Replace the file with roughly the following contents:
Listen 8080
Listen 4200
sudo service apache2 restart