Quickstart and download
Run Roamly on your own server.
You need a machine that runs Docker. This page takes you from an empty folder to a working instance, then to an Android app that uploads to it.
The server
Three files' worth of setup, one command to start.
You need Docker with the Compose plugin (docker compose version should answer). The image is built for x86-64 and 64-bit ARM, so a recent Raspberry Pi works too.
-
Make a folder and write a
.envOne command creates both. It generates the Django secret key and the database password for you; nothing here is a placeholder you have to remember to change.
mkdir roamly && cd roamly cat > .env <<EOF SECRET_KEY=$(openssl rand -hex 32) POSTGRES_PASSWORD=$(openssl rand -hex 16) ALLOWED_HOSTS=localhost,127.0.0.1 CSRF_TRUSTED_ORIGINS=http://localhost:8001,http://127.0.0.1:8001 SITE_URL=http://localhost:8001 EOFServing it on a real domain? Change the last three lines now. Step 4 shows what to put there.
-
Save the compose file
Copy this into
docker-compose.ymlin the same folder, or use the download button. It pulls the publishedwaxn/roamlyimage, so nothing is built on your machine.# Roamly: web app, PostGIS database and Redis cache. # Reads SECRET_KEY, POSTGRES_PASSWORD and the host settings from ./.env services: db: image: postgis/postgis:16-3.5 restart: unless-stopped environment: POSTGRES_DB: roamly POSTGRES_USER: roamly POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} volumes: - ./data/postgres:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U roamly -d roamly"] interval: 10s timeout: 5s retries: 5 redis: image: redis:8.10-alpine restart: unless-stopped volumes: - ./data/redis:/data web: image: waxn/roamly:latest restart: unless-stopped depends_on: db: condition: service_healthy redis: condition: service_started command: > sh -c "python manage.py migrate --noinput && python manage.py collectstatic --noinput && gunicorn roamly.wsgi:application --bind 0.0.0.0:8000 --worker-class gthread --workers 3 --threads 8 --timeout 120 --graceful-timeout 30" ports: - "8001:8000" volumes: - ./media:/app/media environment: DEBUG: "False" SECRET_KEY: ${SECRET_KEY} DATABASE_URL: postgis://roamly:${POSTGRES_PASSWORD}@db:5432/roamly REDIS_URL: redis://redis:6379/1 ALLOWED_HOSTS: ${ALLOWED_HOSTS:-localhost,127.0.0.1} CSRF_TRUSTED_ORIGINS: ${CSRF_TRUSTED_ORIGINS:-http://localhost:8001,http://127.0.0.1:8001} SITE_URL: ${SITE_URL:-http://localhost:8001} TRUSTED_PROXY_COUNT: ${TRUSTED_PROXY_COUNT:-1}Your data lives in
./data/postgres(locations and accounts) and./media(uploaded photos). Back those two up. -
Start it and make the first account
docker compose up -d docker compose logs -f web # optional: watch it migrate and startOpen http://localhost:8001 and choose Create an account. The first account on a new instance becomes its admin. Then go to Settings → API to create the key your trackers use.
Signing in over plain http. With
DEBUGoff, session cookies are marked Secure. Browsers accept that onlocalhost, but on a LAN address such ashttp://192.168.1.20:8001you will not stay signed in. Put a TLS proxy in front first (step 4).
The settings you will touch first
| Variable | What it does |
|---|---|
SECRET_KEY | Signs sessions and tokens. Required: the app refuses to start without it. |
ALLOWED_HOSTS | Hostnames the server answers to, no protocol. Add your domain. |
CSRF_TRUSTED_ORIGINS | Origins that may submit forms, with protocol and port. Must match the address in your browser. |
SITE_URL | Used in links the server writes, such as emails. |
TRUSTED_PROXY_COUNT | How many reverse proxies sit in front. Sign-in rate limits are keyed on the client address this decides. |
ADMIN_SIGNUP_KEY | Optional. Lets a later signup become an admin by entering this key. |
EMAIL_HOST and friends | Optional SMTP. Leave blank and every email feature stays off. |
Everything else is optional and described in the documentation and the repository's .env.example.
The Android app
Download the app, point it at your server.
The app is not on the Play Store, so you install it from a file. It is signed, built from this repository by GitHub Actions, and it updates itself from your server afterwards.
Roamly for Android
Signed APK, straight from the project's latest release.
Prefer to fetch it from GitHub yourself? Releases tagged mobile-v… on the releases page carry the same file.
-
Allow the install
Open the downloaded file. Android asks once to let your browser or file manager install apps; allow it for that app only, then go back and tap Install.
-
Sign in
Enter your server's address (for example
https://roamly.example.com), your username and your password. The app stores an API key, so it stays signed in after the first time. -
Let it run in the background
Give location access all the time, allow notifications, and set the app's battery use to Unrestricted. Without these, Android is free to stop the recorder when the screen is off.
Anything that speaks HTTP
You do not need the app.
GPSLogger and OwnTracks push to the same endpoint, and so does anything that can send JSON. Create a key under Settings → API first.
curl -X POST http://localhost:8001/api/push/ \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"device_id":"phone","latitude":45.52,"longitude":-122.68}'
A device appears the first time it pushes. For GPSLogger, set the custom URL to https://your-domain/api/push/; the trailing slash matters. The documentation has the field-by-field setup for GPSLogger and OwnTracks.
Before it faces the internet
Put HTTPS in front of it.
Roamly does not terminate TLS itself. Run any reverse proxy on the same machine and point it at port 8001. Caddy does the certificate for you.
roamly.example.com {
reverse_proxy localhost:8001
}
Then change these three lines in .env to match your domain, and run docker compose up -d again:
ALLOWED_HOSTS=roamly.example.com
CSRF_TRUSTED_ORIGINS=https://roamly.example.com
SITE_URL=https://roamly.example.com
Close the side doors. With a proxy on the same host, change the compose port to "127.0.0.1:8001:8000" so only the proxy can reach the app. Leave HSTS_SECONDS at 0 until you are sure HTTPS is permanent, because browsers remember it.
Staying current
Updating is a pull and a restart.
Migrations run on start. Take a dump first if the history matters to you, which it does.
docker compose exec db pg_dump -U roamly roamly > backup.sql
docker compose pull
docker compose up -d
To stay on a known version, replace waxn/roamly:latest with a release number such as waxn/roamly:0.100.0. Image tags follow the project's v… releases. Inside the app, Settings can also schedule automatic backups to any S3-compatible bucket.
Stuck on a step?
The documentation covers troubleshooting, and the code is open.