Hauk
Stack
Hauk is a fully open source, self-hosted location sharing service. Install the backend code on a PHP-compatible web server, install the companion app on your phone, and you're good to go!
Image details
Source details
Configuration
TypeComposelinuxbilde2910/hauk:latest7735:80/etc/hauk : /portainer/Files/AppData/Config/haukon-failureStandalone Install
Select an install method, to see config/commands for deploying Hauk
Install on Portainer
Import all app templates into your Portainer instance, for easy 1-click deploys
- Ensure both Docker and Portainer are installed, and up-to-date
- Log into your Portainer web UI
- Under Settings → App Templates, paste the below URL
- Head to Home → App Templates, and the list of apps will show up
- Select Hauk, fill in any config options, and hit Deploy
Template Import URL
https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me
Original stackfile
The compose file this template deploys, straight from its repo:
services:
hauk:
image: bilde2910/hauk:latest
container_name: Hauk
hostname: hauk
healthcheck:
test: curl -f http://localhost:80/ || exit 1
ports:
- 7735:80
volumes:
- /portainer/Files/AppData/Config/hauk:/etc/hauk:rw
restart: on-failure
Or deploy it directly from the source:
git clone https://github.com/xneo1/portainer_templates
cd portainer_templates
docker compose -f Template/Stack/hauk.yml up -dMore install options in our documentation, or see bilde2910/hauk for app-specific guidance.
Hauk

alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/info.varden.hauk)
alt="Get it on Google Play"
height="80">](https://play.google.com/store/apps/details?id=info.varden.hauk)Hauk is a fully open source, self-hosted location sharing service. Install the
backend code on a PHP-compatible web server, install the companion app on your
phone, and you're good to go!System Requirements
- Web server running PHP and Memcached or Redis.
- PHP
memcached,memcacheorredisextension installed on the web server. - PHP
ldapextension if using LDAP authentication. - Android 6 or above to run the companion Android app.
Installation instructions
- Clone or download this repository:
git clone https://github.com/bilde2910/Hauk.git - Run
sudo ./install.sh -c web_rootwhereweb_rootis the folder you want
to install Hauk in, for example `/var/www/html`. Follow the instructions
given by the install script. Make sure to set a secure hashed password and
edit your site's domain in the configuration file after installation.- Start the web server and make sure Memcached or Redis is running and
[properly configured and firewalled](https://github.com/bilde2910/Hauk/wiki/FAQ#how-do-i-securely-configure-memcachedredis).- Install the companion Android app (from your favourite store linked above)
on your phone and enter your server's settings.Manual installation
If you prefer not to use the install script, you can instead choose to copy the files manually.- Clone or download this repository:
git clone https://github.com/bilde2910/Hauk.git - Copy all files in the
backend-phpandfrontendfolders to a common folder
in your web root, for example `/var/www/html`.- Modify
include/config.phpto your liking. Make sure to set a secure hashed
password and edit your site's domain in this file.- Start the web server and make sure Memcached or Redis is running and
[properly configured and firewalled](https://github.com/bilde2910/Hauk/wiki/FAQ#how-do-i-securely-configure-memcachedredis).- Install the companion Android app (from your favourite store linked above)
on your phone and enter your server's settings.Distribution-specific packages
The Hauk backend is available as packages for the following distributions:Arch Linux
Installhauk-server from
AUR. The backend will be installed to /usr/share/webapps/hauk-server.Via Docker Compose
The official Docker image on Docker Hub isbilde2910/hauk. It comes with several different tags:| Tag | Description |
|---|---|
latest | Updated with each commit to this repository and always has the latest changes. |
stable-1.x | The latest tagged release of version 1.x. |
X.Y.Z | A specific release of the Hauk backend. Note that old versions are not supported and are provided for your convenience only. |
latest, stable-1.x and all releases from 1.5.2 and up are multi-arch and compiled for x8664, armv7l and aarch64. 1.5.1 and older are x8664 only. You can use any of these tags for all architectures, and Docker will automatically pick the correct one. If you need the image for a specific architecture, however, you can fetch them using *-amd64 (x8664), *-arm32v7 (armv7l) or *-arm64v8 (aarch64) versions of any of the tags (e.g. latest-arm32v7).docker-compose.yml
version: '3.4'
services:
hauk:
image: bilde2910/hauk
container_name: hauk
volumes:
- ./config/hauk:/etc/haukCopy the config.php file to the ./config/hauk directory and customize it. Leave the memcached connection details as-is; memcached is included in the Docker image.
The Docker container exposes port 80. For security reasons, you should use a reverse proxy in front of Hauk that can handle TLS termination, and only expose Hauk via HTTPS. If you expose Hauk directly on port 80, or via a reverse proxy on port 80, anyone between the clients and server can intercept and read your location data.
Here's an example config for an nginx instance running in another container. You may want to customize this, especially the TLS settings and ciphers if you want compatibility with older devices.
server {
listen 443 ssl;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305';
ssl_session_cache shared:SSL:10m;
ssl_stapling on;
ssl_stapling_verify on;
ssl_ecdh_curve 'secp521r1:secp384r1';
ssl_prefer_server_ciphers on;
ssl_session_timeout 10m;
ssl_session_tickets off;
ssl_certificate /etc/letsencrypt/live/hauk.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/hauk.example.com/privkey.pem;
add_header Referrer-Policy same-origin always;
add_header X-Frame-Options DENY always;
add_header X-Content-Type-Options nosniff always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Robots-Tag "noindex, nofollow" always;
server_name hauk.example.com;
location / {
proxy_pass http://hauk:80;
}
}Upgrading to newer versions
Hauk is versioned according to Semantic Versioning 2.0.0. Any update that is not a major update is guaranteed to be without breaking changes, and you can keep the same configuration file for the updated release.- Major updates add breaking changes that either require manual intervention, or breaks backward compatibility. Update instructions for major versions will be listed in the release notes, as well as either this README or in the wiki. To date there have been no major updates.
- Minor updates add functionality, but does not break backward compatibility. You can still use an older client on a newer server, or a newer client on an older server, though some functionality may be missing. This will be dynamically detected by the client and server, which could e.g. lead to some UI elements being disabled in the app, or a notification made if a user tries to use new functionality that the other endpoint does not support.
- Patch updates are primarily bugfixes.
Aside from certain major changes, you can keep your configuration file. New options may have been added to the config, but these will have sane defaults applied automatically. If you wish to change any new options, you can either reconfigure Hauk from the new config.php template, or copy and paste the relevant options from the new template to your existing file and change the appropriate values.
Installations done using either the installer (
install.sh) or via manual file copy can be upgraded simply by pulling the latest version of this repository and running the installer again, or overwriting the installation with the new files.Installations done via distribution-specific packages will be updated to the latest version by your package manager.
Docker installations will be updated whenever you pull the image. If you're using Docker, you can reserve yourself from receiving major updates (which may contain breaking changes) by using the
stable-* tag instead of latest. If you use a specific versioned tag, your installation will be locked at that specific version and you will not receive feature updates or bugfixes unless you manually change the tag and pull.Demo server
If you'd like to see what Hauk can do, download the app and insert connection details for the demo server:Server: https://apps.varden.info/demo/hauk/
Password:
demoLocation shares on the demo server is limited to 2 minutes and is only meant for demonstration purposes. Set up your own server to use Hauk to its full extent.
<summary>Demo server privacy policy - Last updated December 26, 2019</summary>Last updated: December 26, 2019The demo server is limited by configuration to shares no longer than 2 minutes. This means that no matter what happens, the location data you send to the demo server will be deleted automatically after at most 2 minutes from session initiation. Location data is never logged to disk in any way and only stays in RAM for this time. After the session ends, the data is no longer available. It is a vanilla installation of Hauk from GitHub and the code has not been altered in any way.
The server currently uses CloudFlare for DDoS protection, hence CloudFlare can see the data in transit. You may refer to their privacy policy as well.
The HTTP daemon keeps a standard access log for 7 days. This log contains the link ID (which is useless after the 2 minute session expiration), full URLs, user agents, timestamps, and referring URL (if any). It also logs the IP addresses of the CloudFlare proxy server you connect through. It does not contain your IP address, only that of a CloudFlare data center somewhere. It's thus not possible to track individuals using it, and not possible to get any meaningful data from it. This log file is used for abuse prevention only.
The server itself is located in Norway and is thus covered under Norwegian privacy regulations.
Translators
Hauk depends on volunteers to translate the project. Want to help out? Head over to the translation portal to get started.
- Basque - osoitz
- Catalan - xordiet
- Dutch - Jdekoning141
- French - thifranc and LukeMarlin
- German - natrius, hurradiegams, lemmerk, code-surfer and Marmo
- Italian - Vieler
- Norwegian Bokmål - bilde2910
- Norwegian Nynorsk - bilde2910
- Polish - krystiancha and RuralYak
- Portugese (Brazil) - arajooj
- Romanian - LicaonKter
- Russian - RuralYak, Brujerizmo90
- Spanish - sdstolworthy
- Turkish - kylethedeveloper, ayyilmaz
- Ukrainian - RuralYak
Translation status
Donate
Hauk is an ad-free, open source project, and I am not doing this for financial gain. Thus, my time spent making this is unpaid. I do however accept donations from anyone who appreciates my work enough that they feel inclined to compensate me, no matter the amount. Donations mean a lot to me, as they help cover costs associated with server upkeep, domains and hosting, and general cost of living, and they serve as an incentive for me to keep working on open-source projects.If you wish to donate to me, you may check out my donations page on my website.
Serve Hauk on your own domain behind Caddy, Nginx or Traefik. Fill in your domain and copy the result. It's a starting point, some apps need their own base URL or extra headers set too.
Proxying hauk.example.com to http://hauk:80
Add this to your Caddyfile
hauk.example.com {
reverse_proxy http://hauk:80
}Check the logs first
Nine times out of ten the logs tell you exactly what went wrong.
- In Portainer, go to Containers, click the container, then Logs. Or run
docker logs <container> - Exit codes help too:
137means killed, usually out of memory.126or127means the command inside the image is broken.
Port already in use
If deployment fails with "Bind for 0.0.0.0:7735 failed: port is already allocated", something else on your server is using that port.
- Find what's using it:
sudo ss -tlnp | grep :7735 - Stop the other service, or pick a different host port. In
7735:80only the left number is yours to change, the right one belongs to the app.
Running but the page won't load
The container is up but nothing appears in your browser.
- Use your server's real IP:
http://your-server-ip:7735. The 0.0.0.0 link Portainer shows isn't a real address. - Give it a minute after first deploy, hauk can take a while to initialise.
- Make sure your firewall allows the port, e.g.
sudo ufw allow 7735
Permission denied on volumes
If the logs show "permission denied", the app can't write to its data folder on the host.
- Fix the ownership:
sudo chown -R 1000:1000 /portainer/Files/AppData/Config/hauk
Image won't pull
Test the pull directly on the host: docker pull bilde2910/hauk:latest
- "manifest unknown" means the tag no longer exists. This template uses
latest, so try pinning a specific version instead. - "toomanyrequests" is the Docker Hub rate limit. Log in with
docker loginto raise it. - "no space left on device" means a full disk. Reclaim space with
docker system prune
"exec format error"
This means the image was built for a different CPU architecture than your server.
- This image supports:
amd64, arm64, arm/v7, arm - Check yours with
uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.
Stack won't deploy
Compose stacks fail fast on small mistakes, and Portainer shows the reason just above the editor.
- YAML only accepts spaces for indentation, a single tab breaks the whole file.
Raise an issue
Found something which isn't working as it should? Here's how to report it.
- Bug within the app: Open an issue on bilde2910/hauk
- Template not working: Open an issue on xneo1/portainer_templates
- This website not working: Open an issue on lissy93/portainer-templates
A Compose stack
Hauk is a Compose stack, a set of containers defined in one file and brought up together by Portainer, then started and stopped as a single app.
The app image
An image is the app packed up ready to go, everything Hauk needs bundled into one download. This template pulls bilde2910/hauk:latest, which Docker fetches once (about 188 MB) and then starts your own copy from.
Where the image comes from
Docker pulls its images from registries, public libraries of ready-built apps. Hauk's comes from Docker Hub, published by bilde2910.
Version tags
The bit after the colon in the image name is the version tag. Here it's latest, which always points at the newest build, so a redeploy can bump you to a newer release without you asking. Newest right now is v1.6.2. Pin a specific tag if you would rather stay on one version.
Which machines it runs on
Every image is built for particular CPU types. This one ships for amd64, arm64, arm/v7, arm, so it runs on both regular x86 servers and ARM boards like a Raspberry Pi.
Ports
A port is the door the app answers on. A mapping like 7735:80 means it's reachable on port 7735 of your server, where the left number is yours to change and the right one belongs to the app. Once it's running, open http://your-server-ip:7735 in a browser. It opens:
7735:80, likely the web interface
Volumes
A volume is where Hauk keeps its files so they survive an update or a restart. Without one, anything it saves would sit inside the container and vanish the moment it's recreated. This template mounts:
/etc/haukfrom/portainer/Files/AppData/Config/haukon the host
Restart policy
The restart policy here is on-failure, so Hauk only gets restarted when it exits with an error, not when it finishes cleanly or you stop it yourself. You can change this on the deploy screen. The choices are no (never restart), on-failure (only after a crash), unless-stopped (restart unless you stop it), and always (bring it back no matter what).
Health check
A health check is how Docker tells whether Hauk is really working, not just switched on. It runs curl -f http://localhost:80/ || exit 1 and flags the container as unhealthy if that keeps failing.
Networking
Nothing custom is set, so Hauk sits on Docker's default bridge network: its own private space that reaches the outside world only through the ports it publishes.
Container name
Once it's deployed, Portainer names the container hauk. That's what you'll spot in the containers list and use in commands like docker logs hauk.
Platform
The platform is linux, the kind of system the container is built to run on. Docker and Portainer handle this on a normal Linux server.
Open source license
Hauk is open source, released under the Apache-2.0 license. In plain terms the code is out in the open, so you're free to run it and change it to fit what you need.
Portainer app templates
Zooming out, this whole page comes from a Portainer app template: a short recipe telling Portainer how to set Hauk up. Add the template list to Portainer once, then deploying Hauk is a click rather than a wall of config.