Written by Jana Bernhard-Harrer and Sofia Gil-Clavel.
Install AmCAT in your own server
Step 1: Connect to your server and log in
ssh <username>@<serveraddress>
Step 2: Install Docker (we will use this to install AmCAT)
- Check which Ubuntu version you have to know which Docker you need:
cat /etc/os-release -
Go to: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository and follow the instructions.
- Set up Docker’s apt repository.
Side Note:
aptinstalls linux system packages the same wayconda installinstalls python packages. - Install the latest Docker packages.
- Check if the Docker is running with:
sudo systemctl status dockerSide Note: sudo tells the server that you have admin rights. - Verify that the installation is successful
- In case you need to delete a Docker you need to follow the steps in Extra: In case the Docker installation was not succesful.
- Set up Docker’s apt repository.
Side Note:
Step 3: Install AmCAT
- Go to: https://github.com/ccs-amsterdam/amcat4docker
- Decide which of the AmCAT Versions you want and download the correct docker file (Options include: the stable, the newest, or one you can make available through the internet.) We go forward with one that can be made available through the internet.
- Create a directory where AmCAT can live on your server and go there. You can choose one of the following ways:
mkdir amcat && cd amcatgit clone https://github.com/ccs-amsterdam/amcat4dockerThis one should create this folder and download all the yml files there in one step, with the added bonus of being able to update later if the dockerfile changes
- load the right dockerfile. For us:
wget https://raw.githubusercontent.com/ccs amsterdam/amcat4docker/main/docker-compose-https.yml - install nano if you do not have a textedit program. For this you can use
sudo apt nano - run
nano docker-compose-https.ymland add a name and the website where you want to host amcat. - then spin up the docker containers with:
docker-compose -f docker-compose-https.yml up --pull="missing" -d - to check if it is running you can run:
sudo docker ps-> see if it is therecurl localhost-> check amcat frontendcurl localhost/amcat/-> check amcat backend
- we also want it to be secure (https) so we also run the following:
docker exec -it ngincat certbot --nginx -d medem.amcat.eu -d amcat.medem.euThis will open an editable file where you:- enter your email
- give it permission
- decide whether you want to add your email or not
- you are done :)
Extra: In case the Docker installation was not succesful
- first get the names / ids of all the dockers with
sudo docker ps - then stop the dockers:
sudo docker stop -nameofdocker- - then remove the containers:
sudo docker rm -nameofdocker- - then prune everything:
sudo docker system prune --volumes - then get the ids for the images:
sudo docker image ls - then delete the images:
sudo docker rmi -idofimage-Side Note: This is important: You need to do this for all Dockers & Images because otherwise they will just take up space on your server.