-
Notifications
You must be signed in to change notification settings - Fork 230
Installation
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. The official Docker images are published at: https://hub.docker.com/u/hashtopolis
Requirements:
- Instructions tested on Ubuntu 22.04 & Windows 11 (WSL2)
- Install docker, https://docs.docker.com/engine/install/ubuntu/ or https://docs.docker.com/desktop/install/windows-install/
- Install docker compose v2 https://docs.docker.com/compose/install/linux/#install-using-the-repository
- Create a folder
mkdir hashtopolis
and change into the foldercd hashtopolis
wget https://raw.githubusercontent.com/hashtopolis/server/master/docker-compose.yml
wget https://raw.githubusercontent.com/hashtopolis/server/master/env.example -O .env
- Edit the
.env
file and change the settings to your likingsnano .env
- Optional: if you want to test the new API and new UI, set the
HASHTOPOLIS_APIV2_ENABLE
to1
inside the.env
file. NOTE: The APIv2 and UIv2 are a technical preview. Currently when enable everyone through the new API will be fully admin!
- Optional: if you want to test the new API and new UI, set the
docker compose up
- Access Hashtopolis through http://127.0.0.1:8080
or the new UI when you set HASHTOPOLIS_APIV2_ENABLE
to 1
When using WSL2, please enable Docker Compose V2 and WSL Integration in Dokter Desktop
- 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
- Optional: Check output of
file docker-entrypoint.sh
if it mentions 'with CRLF line terminators' your git checkout is converting line-ending on checkout, which is causing issues for files within the docker container. This is common behaviour for example within Windows (WSL) instances, to fix:git config core.eol lf
git config core.autocrlf input
git rm -rf --cached .
git reset --hard HEAD
- Check output of
file docker-entrypoint.sh
is should output: 'docker-entrypoint.sh: Bourne-Again shell script, ASCII text executable'
- 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 using the credentials (user=admin, password=hashtopolis)
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
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
You may want to increase these PHP parameters to accommodate your intended usage.
sudo nano /etc/php/7.0/apache2/php.ini
memory_limit = ...
upload_max_filesize = ...
post_max_size = ...
In order to leverage the usage of TCP sessions in the python client, the timeout of the server needs to be set to something higher than your status update time (5s by default) (in Apache2 the timeout is 5s by default). For Apache2 you need to add/modify following setting:
KeepAliveTimeout 10
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
The new web-ui is currently in preview! You need to manually enable it by setting an environment variable.
Insite you apache2 virtualhost config
nano /etc/apache2/sites-enabled/000-default.conf
<VirtualHost :80>
...
SetEnv HASHTOPOLIS_APIV2_ENABLE 1
...
</VirtualHost>
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
This is for Ubuntu 16.10 and for Hashtopolis release 0.13.1