Self Host And Deploy
Neta is designed to run self-hosted. It does not need an external Supabase project, managed database service, or separate backend application.
Core production requirements:
- A server that supports Docker
- HTTPS reverse proxy
- Persistent volume
- Strong auth secret
- Single replica
Minimum Environment
Recommended minimum production environment:
NODE_ENV=production
DATA_DIR=/app/data
APP_URL=https://neta.example.com
NEXT_PUBLIC_SITE_URL=https://neta.example.com
BETTER_AUTH_URL=https://neta.example.com
BETTER_AUTH_SECRET=strong-secret
TRUSTED_ORIGINS=https://neta.example.comBETTER_AUTH_SECRET must be strong and unique.
Generate a secret:
openssl rand -base64 32Persistent Data Area
Neta's production data is stored under /app/data.
This folder must be a persistent volume.
/app/data/
neta.db
uploads/
backups/
tmp/If this area is deleted, the database, uploaded logos, favicons, and backup files can be lost.
Running With Docker
The repository is ready for production builds with a Dockerfile.
Example with Docker Compose:
export BETTER_AUTH_SECRET="$(openssl rand -base64 32)"
export APP_URL="https://neta.example.com"
export NEXT_PUBLIC_SITE_URL="$APP_URL"
docker compose up -d --buildIn Compose, a named volume is mounted for /app/data.
Deploying With Dokploy
The recommended method on Dokploy is Application + Dockerfile deploy.
Basic settings:
Build Type: Dockerfile
Dockerfile Path: Dockerfile
Docker Context Path: .
Internal Port: 3000
Persistent Volume: /app/data
Replicas: 1Environment:
NODE_ENV=production
DATA_DIR=/app/data
APP_URL=https://neta.example.com
NEXT_PUBLIC_SITE_URL=https://neta.example.com
BETTER_AUTH_URL=https://neta.example.com
BETTER_AUTH_SECRET=secret-generated-with-openssl
TRUSTED_ORIGINS=https://neta.example.comFor the domain setting, choose 3000 as the container internal port.
Post-deploy checks:
https://neta.example.com/api/health/live
https://neta.example.com/api/health/ready
https://neta.example.com/registerIf /api/health/ready succeeds, database, data directory, and migration checks are healthy.
Deploying With Coolify
Coolify can also use Dockerfile deploy.
Recommended settings:
Build Pack: Dockerfile
Port: 3000
Volume: /app/data
Replica: 1Environment values are the same as Dokploy.
Reverse Proxy And HTTPS
In production, Neta must run behind HTTPS.
Domain:
https://neta.example.comEnvironment values must match the domain exactly:
APP_URL=https://neta.example.com
NEXT_PUBLIC_SITE_URL=https://neta.example.com
BETTER_AUTH_URL=https://neta.example.com
TRUSTED_ORIGINS=https://neta.example.comIf the domain changes, these values must also be updated.
Single Replica Rule
Because Neta uses SQLite, multiple replicas writing to the same database file are not supported.
In production, run:
Replicas: 1If horizontal scaling is needed in the future, a different database strategy should be planned.
First Setup
After deployment is complete, open:
https://neta.example.com/registerCreate the first owner account. After the first owner is created, public registration is closed intentionally for security.
Health Endpoints
Neta provides these health endpoints:
GET /api/health/live
GET /api/health/ready
GET /api/healthThe live endpoint shows whether the process is running.
The ready endpoint checks database, migration, and data directory status.
Backup
Production environments should have regular backups.
Command:
pnpm db:backupBackup files should not only stay on the same server. Copy them to an external and secure location.
Restore
Stop the application before restoring.
Command:
pnpm db:restore -- --from /path/to/neta-backup --forceAfter restore, start the application again and check health endpoints.
Upgrade
Recommended flow for upgrading:
1. Take a backup. 2. Test restoring that backup. 3. Start deployment with the new image or commit. 4. Confirm startup migrations completed successfully. 5. Check /api/health/ready. 6. Test login, client, project, and portal flows.
SQLite schema downgrades are not supported. That is why backup matters before upgrading.
Migrating From Supabase
The current Neta version does not require Supabase.
If data will be migrated from an older Supabase setup, an offline export bundle can be imported.
General flow:
pnpm db:import:supabase -- \
--from /secure/path/neta-export \
--owner-user-id BETTER_AUTH_OWNER_ID \
--dry-runAfter the dry-run report is verified, run the command again without --dry-run.
Supabase Auth passwords and sessions are not migrated. Client users should be invited again.
Pre-Release Checklist
Before going to production, check:
- Domain DNS record is correct.
- HTTPS is active.
APP_URLis correct.NEXT_PUBLIC_SITE_URLis correct.BETTER_AUTH_URLis correct.BETTER_AUTH_SECRETis strong and unique./app/datapersistent volume is mounted.- Replica count is 1.
/api/health/readysucceeds.- First owner account is created.
- Logo, favicon, and theme are configured.
- Backup strategy is defined.
- Login test is done.
- Client creation test is done.
- Project creation test is done.
- Client portal invite is tested.
Summary
Neta has a simple structure for self-host deployment. It runs with one container, one persistent data volume, and correct environment values. It can be deployed easily on Dokploy, Coolify, or Docker Compose.