Run Your Own Aura Backend
Keep all your reading data on your own hardware. Takes about 10 minutes with Docker.
Prerequisites
- ·A machine that is always on — home server, NAS, VPS, or Raspberry Pi 4+
- ·Docker and Docker Compose installed
- ·Your machine's local IP address (e.g. 192.168.1.100) or a domain name
The backend is open source
The Aura self-hosted backend is fully open source under the MIT licence. Inspect the code, file issues, or contribute on github.com/dnldev/aura-selfhosted-backend.
Create a working directory
mkdir aura-backend && cd aura-backendCreate the docker-compose file
Create a file called docker-compose.yml with the following contents:
services:
aura:
image: hoidhopper/aura-backend:latest
container_name: aura-backend
restart: unless-stopped
ports:
- "3400:3400"
volumes:
- aura-data:/data
environment:
- PORT=3400
# REQUIRED: Change this to a strong random secret before running.
# Generate one with: openssl rand -hex 32
- JWT_SECRET=${JWT_SECRET:-please-change-this-secret}
- AURA_DB_PATH=/data/aura.db
volumes:
aura-data:
driver: localJWT_SECRET to a random string before starting. Run openssl rand -hex 32 to generate one. This signs your login tokens — if you leave the default, anyone can forge tokens.Start the server
JWT_SECRET=$(openssl rand -hex 32) docker compose up -d.env file next to your docker-compose.yml:echo "JWT_SECRET=$(openssl rand -hex 32)" > .env
docker compose up -dVerify it started:
curl http://localhost:3400/health
# Expected: {"status":"ok","version":"1.0.0"}Point the Aura app to your server
- 1.Open Aura on your iPhone or iPad
- 2.Go to Settings → Storage
- 3.Tap Self-Hosted
- 4.Enter your server URL:
- Same WiFi:
http://192.168.1.100:3400 - Via Tailscale:
http://100.x.x.x:3400 - Via domain:
https://aura.yourdomain.com
- Same WiFi:
- 5.Tap Test Connection — you should see “Connected ✓”
- 6.Create an account or log in
Accessing Your Server Remotely
Tailscale — Zero Config VPN
Tailscale creates a private VPN between all your devices. Free for personal use. No port forwarding, no firewall rules.
- 1.Install Tailscale on the machine running the Aura backend
- 2.Install the Tailscale app on your iPhone
- 3.Both devices appear on the same
100.x.x.xsubnet - 4.Use
http://100.x.x.x:3400in the Aura app — works on any network
Reverse Proxy
If you already run Nginx Proxy Manager, Caddy, or Traefik, add a proxy host for your Aura backend.
- 1.Add a new proxy host pointing to the Aura container
- 2.Domain:
aura.yourdomain.com - 3.Forward to:
aura-backend:3400or your host IP - 4.Enable SSL (Let’s Encrypt). Use
https://aura.yourdomain.comin the app.
Port Forward
Forward port 3400 on your router to the machine running Docker. Only do this if you also set up HTTPS — never expose plain HTTP on the public internet.
Configuration
| Variable | Default | Description |
|---|---|---|
| PORT | 3400 | Server port |
| JWT_SECRET | (required) | Secret for signing JWT tokens |
| AURA_DB_PATH | /data/aura.db | Path to SQLite database file |
Optional: Email Password Reset
Add SMTP configuration to enable “Forgot Password” email functionality. Without SMTP, users can still reset passwords using their recovery code (shown during registration).
| Variable | Description |
|---|---|
| SMTP_HOST | SMTP server hostname (e.g. smtp.gmail.com) |
| SMTP_PORT | SMTP port — 587 for STARTTLS, 465 for SSL |
| SMTP_USER | SMTP username / email |
| SMTP_PASS | SMTP password or app-specific password |
| SMTP_FROM | From address (e.g. noreply@yourdomain.com) |
| APP_BASE_URL | App URL for reset links (default: https://www.aurareads.app) |
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /health | No | Health check |
| POST | /api/auth/register | No | Create account |
| POST | /api/auth/login | No | Login → JWT |
| POST | /api/auth/recover | No | Recovery code reset |
| POST | /api/auth/forgot-password | No | Email reset link (requires SMTP) |
| POST | /api/auth/reset-password | No | Reset password via email token |
| GET | /api/books | JWT | List all books |
| POST | /api/books | JWT | Create a book |
| PATCH | /api/books/:id | JWT | Update a book |
| DELETE | /api/books/:id | JWT | Delete a book |
| GET | /api/sessions | JWT | List reading sessions |
| POST | /api/sessions | JWT | Create a reading session |
| GET | /api/preferences | JWT | Get user preferences |
| GET | /api/tickets | JWT | List support tickets |
| POST | /api/tickets | JWT | Create a ticket |
Data & Backups
Your SQLite database lives in the aura-data Docker volume. Back it up by copying the file from the running container:
docker cp aura-backend:/data/aura.db ./aura-backup-$(date +%Y%m%d).dbOr add a daily cron job:
# /etc/cron.daily/aura-backup
#!/bin/sh
docker cp aura-backend:/data/aura.db /path/to/backups/aura-$(date +%Y%m%d).dbUpdating
docker compose pull
docker compose up -dYour data is stored in a Docker volume and persists across updates.
Troubleshooting
| Problem | Fix |
|---|---|
| "Connection refused" | Run docker ps — is the container running? Is the IP and port correct? |
| "Connection timed out" | Firewall may be blocking port 3400. Run: ufw allow 3400 (Linux) |
| "Invalid token" after restart | Your JWT_SECRET changed between restarts. Save it in a .env file. Sign out and back in. |
| Container exits immediately | Run docker logs aura-backend to see the error. Usually a missing JWT_SECRET. |
| "Network error" in the app | Make sure you are using http:// (not https://) unless you have TLS set up. |
SqliteError: unable to open database file
This error means the container cannot create or write to the database file. Here are the most common causes:
1. Wrong volume mount path
The database path inside the container must match your AURA_DB_PATH. The default is /data/aura.db, so your volume must mount to /data:
# Correct — volume maps to /data
volumes:
- aura-data:/data
environment:
- AURA_DB_PATH=/data/aura.db
# Wrong — volume maps to /app/data but AURA_DB_PATH points to /data
volumes:
- aura-data:/app/data
environment:
- AURA_DB_PATH=/data/aura.db2. Permission issues with bind mounts
If you use a bind mount (e.g. ./data:/data), the directory must be writable by the container user (UID 1001). Use a named volume instead (recommended) or fix permissions:
mkdir -p ./data && chown 1001:1001 ./data3. Upgrading from an older image
Older images ran as root. The current image runs as a non-root user (UID 1001). If your existing volume files are owned by root, fix with:
docker exec -u root aura-backend chown -R 1001:1001 /data/
docker compose restart aura-backend4. SELinux (Fedora / RHEL)
On SELinux-enabled systems, add the :z suffix to your volume mount:
volumes:
- aura-data:/data:zSecurity Notes
- ·Always set a strong, unique JWT_SECRET and persist it in a .env file
- ·If exposing to the internet, always use HTTPS — Tailscale or a reverse proxy with TLS
- ·Passwords are stored as bcrypt hashes — your cleartext password never touches disk
- ·The Docker image runs as a non-root user (UID 1001) for security
Source Code & Issues
The self-hosted backend is open source under the MIT license. Found a bug or have a question? Open an issue on GitHub.