Will an installer be created? #504
Replies: 3 comments
-
Dawarich is a web application and converting it to a desktop application would mean to rewrite it completely in a different tech stack. Also, it would probably eliminate ability to track your location with your mobile device as there will be no api endpoint to send data to, at least I can't think of a way doing this of the top of my head. So I'd say no, answer is no, there will be no other installers, Dawarich is meant to be run in Docker or any other way as a web application. There are ways to install it to TrueNAS I think, and it might be the closes thing. |
Beta Was this translation helpful? Give feedback.
-
I have created a bash script for automatically installing this on Ubuntu 22.04. It installs every dependency and evne asks the user installation questions, such as email address, password, etc. It uses the reverse DNS of their host's IP address a domain, sets up a nginx reverse proxy and secures a LetsEncrypt SSL certificate for it, locks down the Port 3000 of Dawawich so plaintext is not accessible, and sets up the SSL cert to be autorewneing every 3 months. I've set this up as a DigitalOcean droplet for others to install effortlessly and I've ported it to pure bash that can be run by almsot anyone who can figure out how to SSH to a VPS. The VPS needs at least 4 GB of RAM. I recommend 8. I have seen people successfully run it on 4 GB. I've been livesstreaming the installation of peoples' servers over on my Twitch stream of this same username with some success. I've installed 5 accounts using this exact script tho it still needs refinement. I recommend copying and pasting every line of it one at a time and messaging me on WhatsApp (just google "hopeseekr WhatsApp") if you run into problems. Once I get the kinks worked out, I'll publish it at https://github.com/BitBasket/AutoTimelineTrackerInstaller This has personally been used on DigitalOcean, Vultr, Hostinger, AWS, and Hetzner. The script only supports Ubuntu but i'll port add support for arch linux soon. #!/bin/bash
# Taken from https://github.com/hopeseekr/BashScripts/, with permission.
function is_root()
{
[ "$EUID" -eq 0 ];
}
if ! is_root; then
echo 'Error: You must run this as the root user.'
echo 'Consider running `sudo -s` now.'
exit 1;
fi
echo "This script shoudl NOT be run !!! Instead, copy and paste each line, one by one."
exit 66
# Install Eternal Terminal
apt-get install -y software-properties-common
add-apt-repository ppa:jgmath2000/et
apt update
apt install -y et mosh net-tools nginx certbot python3-certbot-nginx ack vim nano zip unzip dnsutils
# Install docker compose v2
apt-get install -y ca-certificates curl gnupg lsb-release
mkdir -p /etc/apt/keyrings
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt install docker-buildx-plugin docker-compose-plugin docker-ce
systemctl enable docker
systemctl start docker
ufw allow 80/tcp
ufw allow 443/tcp
echo "Fetching the server's public IP address..."
IP_ADDRESS=$(curl -s https://api.ipify.org)
echo "Public IP address: ${IP_ADDRESS}"
echo "Looking up the Public IP's DNS entry..."
HOSTNAME=$(curl -s https://ipinfo.io/${IP_ADDRESS}/hostname)
echo "Public IP's reverse DNS: ${HOSTNAME}"
read -p "Do you want to use this or a new host name? (ENTER = use IP hostname; otherwise enter hostname here) " NEWHOST
if [ $NEWHOST != '' ]; then
HOSTNAME=$NEWHOST
fi
echo "We will use ${HOSTNAME}"
git clone https://github.com/Freika/dawarich.git
cd dawarich
read -p 'Database password? ' DB_PASSWORD
sed -i 's/DATABASE_PASSWORD=password/DATABASE_PASSWORD=${DB_PASSWORD}/' docker-compose.yml
# Listen only to private docker IP address.
sed -i 's/3000:3000/3000/' docker-compose.yml
sed -i 's/APPLICATION_HOST: localhost/APPLICATION_HOST: srv663576.hstgr.cloud/' docker-compose.yml
sed -i 's/APPLICATION_HOSTS: localhost/APPLICATION_HOSTS: srv663576.hstgr.cloud,localhost/' docker-compose.yml
# Launch Dawawith now in the background:
docker compose up -d
echo "Waiting for Dawawitch to launch. Waiting for 45 seconds."
count=45
while [ $count -ge 0 ]; do
echo -n "$count..."
((count--))
sleep 1
done
# Add NGINX SSL site config
mv -f /etc/nginx/sites-enabled/default{,.orig}
DOCKER_IP=$(docker inspect dawarich_app | grep 'IPAddress"' | grep -v '""' | cut -d '"' -f4)
cat > /etc/nginx/sites-enabled/dawarich.conf <<TXT
server {
listen 443 default_server;
listen [::]:443 default_server;
server_name $HOSTNAME;
charset utf-8;
#access_log logs/host.access.log main;
root /var/www/public;
index index.html;
gzip on;
location / {
proxy_pass http://${DOCKER_IP}:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_ssl_server_name on;
proxy_ssl_verify off; # Depending on your security requirements you might want to enable or disable SSL verification
proxy_redirect off;
}
}
TXT
systemctl restart nginx
# Add certbot registration
echo "We are now going to use certbot to get a new Let's Encrypt SSL certificate for ${HOSTNAME}...
certbot --nginx -d ${HOSTNAME}
read -p "Did you see an error? If so, say 'Y', investigate and report. (N/y)" YES_NO
if [ $YES_NO == 'y' ]; then
echo "Stopping now as SSL is essential for safeguarding your location data. Please seek assistance."
exit 2;
fi
# Need to automate the changing of the default username via raw SQL
read -p "Email address for the admin? " EMAIL
# [email protected]
# Oh yeah... it has that memory limit bug that precludes working with big Google Timeline history...
# Create a swapfile...
fallocate -l 16G /swap.img
chmod 0600 /swap.img
mkswap /swap.img
swapon /swap.img
echo /swap.img none swap sw 0 0 >> /etc/fstab
sed -i "s/memory: '2G'/memory: '200G'/" docker-compose.yml
docker cp Records.json dawarich_app:/var/app/tmp/imports
docker exec dawarich_app bundle exec rake import:big_file['tmp/imports/Records.json','${EMAIL}']
# how the heck do I run this command inside of the dawarich_app container via bash???
#bundle exec rake import:big_file['tmp/imports/Records.json','${EMAIL}']
bundle exec rake import:big_file['tmp/imports/Records.json','[email protected]']
docker compose up |
Beta Was this translation helpful? Give feedback.
-
@weirdalsuperfan This app is highly resource-intensive and seeing how DOG SLOW it is in doing reverse geo lookups, i don't think it's feasible at all to have it run backlogs on windows after your computer has come back from being asleep or turned off. Invest in a $5/month VPS with at least 4 GB of RAM. Your location tracking is worth it. |
Beta Was this translation helpful? Give feedback.
-
I'm on the fence about enabling hypervisor in Windows so that I can use Docker, so I was just wondering if that will be the only option for dawarich for the foreseeable future. Is an installer that doesn't rely on Docker planned anytime soon?
Beta Was this translation helpful? Give feedback.
All reactions