This document explains how to install Neutral TS Starter Py using either the automatic installers or a manual setup.
gitpipsh) or Windows PowerShell (depending on your platform)Automatic installers are provided for:
bin/install.shbin/install.ps1.venv.requirements.txt.config/.env.example to config/.env.SECRET_KEY.src/component/cmp_7040_admin/custom.json -> /admin-[random]src/component/cmp_8100_localdev/custom.json -> /local-admin-[random]bin/bootstrap_db.py).admin role user with bin/create_user.py.DEV_ADMIN_* values to config/.env for isolated localdev access.Important:
create_user.py output. Save that PIN.curl -fsSL https://raw.githubusercontent.com/FranBarInstance/neutral-starter-py/main/bin/install.sh | sh
powershell -ExecutionPolicy Bypass -NoProfile -Command "iwr -useb https://raw.githubusercontent.com/FranBarInstance/neutral-starter-py/main/bin/install.ps1 | iex"
git clone https://github.com/FranBarInstance/neutral-starter-py.git
cd neutral-starter-py
Linux/macOS:
python3 -m venv .venv
source .venv/bin/activate
Windows PowerShell:
py -3 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
cp config/.env.example config/.env
Set SECRET_KEY to a strong random value before running in non-local environments.
Create:
src/component/cmp_7040_admin/custom.jsonsrc/component/cmp_8100_localdev/custom.jsonExample:
{
"manifest": {
"route": "/admin-r4nd0m12ab34"
}
}
For cmp_8100_localdev use /local-admin-[random].
Note:
cmp_8100_localdev keeps /local-dev as its default route in manifest.json.custom.json to a randomized /local-admin-[random] path.python bin/bootstrap_db.py
python bin/create_user.py "Admin" "admin@example.com" "your-password" "1990-01-01" --locale es --role admin
Then update in config/.env for local-only cmp_8100_localdev access:
DEV_ADMIN_USER=admin@example.comDEV_ADMIN_PASSWORD=your-passwordDEV_ADMIN_ALLOWED_IPS=127.0.0.1,::1Optional hardening:
DEV_ADMIN_LOCAL_ONLY=truepython src/run.py
Default URL: http://localhost:5000
config/.env Variables to ConfigureThis section focuses on the most relevant variables from config/.env.example, plus a few supported advanced variables that may be added manually when needed.
SECRET_KEY: Required. Use a long random value.SITE_DOMAIN: Domain used by app/security flows.SITE_URL: Public base URL (include scheme).ALLOWED_HOSTS: Host allow-list.TRUSTED_PROXY_CIDRS: Trusted reverse proxy ranges (if behind proxy/load balancer).CONFIG_DB_PATH: Optional path for central component overrides.DEV_ADMIN_USERDEV_ADMIN_PASSWORDDEV_ADMIN_ALLOWED_IPSDEV_ADMIN_LOCAL_ONLY (supported advanced setting, default runtime value: true)LIMITER_STORAGE_URI: Use shared backend (for example Redis) in multi-instance deployments.DEFAULT_LIMITS, SIGNIN_LIMITS, SIGNUP_LIMITS: Review anti-abuse thresholds.VALIDATE_SIGNUP: Enable if you require validated signup flow.For each DB group (PWA, SAFE, FILES):
DB_*_TYPE (sqlite, postgresql, mysql, mariadb)DB_*_NAMEDB_*_USERDB_*_PASSWORDDB_*_HOSTDB_*_PORTDB_*_PATH (used for sqlite file location)If using SQLite, validate filesystem permissions for DB paths.
MAIL_METHOD (smtp, sendmail, or file)MAIL_TO_FILE (when MAIL_METHOD=file)MAIL_SERVERMAIL_PORTMAIL_USE_TLSMAIL_USERNAMEMAIL_PASSWORDMAIL_SENDERMAIL_RETURN_PATHREFERRER_POLICYPERMISSIONS_POLICYCSP_ALLOWED_SCRIPTCSP_ALLOWED_STYLECSP_ALLOWED_IMGCSP_ALLOWED_FONTCSP_ALLOWED_CONNECTCSP_ALLOWED_FRAMECSP_ALLOWED_SCRIPT_UNSAFE_INLINECSP_ALLOWED_SCRIPT_UNSAFE_EVALCSP_ALLOWED_STYLE_UNSAFE_INLINEKeep unsafe CSP flags disabled unless strictly necessary.
DEBUG_EXPIREDEBUG_FILEWSGI_DEBUG_ALLOWEDAUTO_BOOTSTRAP_DBNEUTRAL_CACHE_DISABLETEMPLATE_HTML_MINIFYFor production, keep debug-related flags disabled.
SITE_URL.DEV_ADMIN_* is set and login works.