-
Notifications
You must be signed in to change notification settings - Fork 223
Installation
This guide details installing Hashtopolis using Docker, the recommended method since version 0.14.0. Docker offers a faster, more consistent setup process.
Instructions for installing the bundled version can still be found on the Install without Docker page. However, please be aware that this method is not officially supported.
- 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
When using WSL2, please enable Docker Compose V2 and WSL Integration in Docker Desktop.
The official Docker images can be found on Docker Hub at: https://hub.docker.com/u/hashtopolis. Two Docker images are needed to run Hashtopolis: hashtopolis/frontend (setting up the web user interface), and hashtopolis/backend (taking care of the Hashtopolis database).
A docker-compose file allowing to configure the docker containers for Hashtopolis is available in this repository. Here are the steps to follow to run Hashtopolis using that docker-compose file:
- Create a folder and change into the folder
mkdir hashtopolis cd hashtopolis
- Download docker-compose.yml and env.example
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 likings.nano .env
- Start the containers:
docker compose up
- Access the Hashtopolis UI through: http://127.0.0.1:8080 using the credentials (user=admin, password=hashtopolis)
- If you want to play around with a preview of the version 2 of the UI, consult the New user interface technical preview section.
Alternatively, the Docker images can be built from source following these steps.
-
Clone the Hashtopolis web-ui repository and cd into it.
git clone https://github.com/hashtopolis/web-ui.git cd web-ui
-
Build the web-ui repo and tag it
docker build -t hashtopolis/frontend:latest --target hashtopolis-web-ui-prod .
-
Move one directory back, clone the Hashtopolis server repository and cd into it:
cd .. git clone https://github.com/hashtopolis/server.git cd server
-
(Optional) Check the 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 this:git config core.eol lf git config core.autocrlf input git rm -rf --cached . git reset --hard HEAD
Check that
file docker-entrypoint.sh
correctly outputs: '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 nano .env
-
(Optional) If you want to test a preview of the version 2 of the UI, consult the New user interface technical preview section.
-
Build the server docker image
docker build . -t hashtopolis/backend:latest --target hashtopolis-server-prod
- Start everything
docker compose up
- Access the Hashtopolis UI through: http://127.0.0.1:8080. If you enabled the preview of the new Hashtopolis UI, you can access it through http://127.0.0.1:4200. The credentials of both UI are user=admin, password=hashtopolis by default. These values can be modified in the .env file.
- First source environmental variables (see .devcontainer/.env.sample for inspiration)
source .devcontainer/.env
- Build container with arguments (replace with the build parameters provided in the previous section)
export CONTAINER_USER_CMD_PRE CONTAINER_USER_CMD_POST docker build --build-arg CONTAINER_USER_CMD_PRE --build-arg CONTAINER_USER_CMD_POST <regular build command>
If you are running Hashtopolis in an offline network or an air-gapped network, you will need to use a machine with internet access to either pull the images directly from the docker hub or build it yourself.
Here are the commands to pull the images from Docker hub. To build the images from source, follow the instructions in the section related to building images.
docker pull hashtopolis/backend:latest
docker pull hashtopolis/frontend:latest
The images can then be saved as .tar archives:
docker save hashtopolis/backend:latest --output hashtopolis-backend.tar
docker save hashtopolis/frontend:latest --output hashtopolis-frontend.tar
Next, transfer both file to your Hashtopolis server and import them using the following commands
docker load --input hashtopolis-backend.tar
docker load --input hashtopolis-frontend.tar
Continue with the normal docker installation steps found above
NOTE: The APIv2 and UIv2 are a technical preview. Currently, when enabled, everyone through the new API will be fully admin!
To enable 'version 2' of the API:
- Stop your containers
- set the
HASHTOPOLIS_APIV2_ENABLE
to1
inside the.env
file. - docker compose up
- Access the technical preview via: http://127.0.0.1:4200 using the credentials (user=admin, password=hashtopolis)