Skip to content
darrell-dPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Noise

A self-hosted personal journal and microblog, extracted from _glitch. Text, Markdown, photos, videos, links, year archives, visibility buckets, an animated Game of Life background, and a tiny Tetris game. Django administration and a session-authenticated REST API are included.

One-command install

Requires Python 3.10+ with pip and venv, on macOS or Linux. From your clone:

./install.sh

This creates a virtual environment, installs dependencies, creates .env with a unique secret, migrates an empty SQLite database, collects static assets, asks you to create an administrator, and starts Gunicorn in the foreground. Open http://localhost:8000/noise/. Log in, then use the + button to post. Manage users and permissions at http://localhost:8000/admin/. / redirects to /noise/.

Stop with Ctrl-C; subsequent starts use ./start.sh. Rerun ./install.sh after upgrading to install dependencies and apply migrations. Existing accounts, the secret, and content are preserved. No AWS account, Node build, Google key, or external database is required. Fonts and jQuery are loaded from public CDNs; social embeds also require internet access.

Copy .env.example to .env before installation if you want custom settings. Real environment variables override .env. For unattended installation, set DJANGO_SUPERUSER_USERNAME, DJANGO_SUPERUSER_EMAIL, and DJANGO_SUPERUSER_PASSWORD; remove the password after the account exists. The installer does not reset existing accounts.

See running locally for native Python and Docker workflows, custom ports, development mode, and local backups. For public hosting, follow the AWS deployment guide: EC2, Docker Compose, automatic HTTPS, and optional S3 uploads or RDS PostgreSQL.

Configuration

Variable Purpose
SECRET_KEY Unique signing secret; generated by the installer if missing
ALLOWED_HOSTS Comma-separated server hostnames, without schemes or ports
PUBLIC_URL Public origin including scheme and optional port
CSRF_TRUSTED_ORIGINS Comma-separated trusted origins including schemes
BIND_ADDRESS, PORT Listener; defaults to 127.0.0.1:8000
SITE_TITLE, SITE_TAGLINE, TIME_ZONE Branding and IANA timezone
DATA_DIR Database and uploads directory; defaults to ./data
NOISE_MAX_UPLOAD_BYTES Request/upload limit, default 95 MiB
DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD, DB_SSLMODE Optional PostgreSQL; DB_HOST selects it
AWS_STORAGE_BUCKET_NAME, AWS_S3_REGION_NAME, AWS_S3_ENDPOINT_URL Optional private S3/S3-compatible uploads
GOOGLE_MAPS_KEY Optional reverse geocoding
TRACK_VISITS Opt-in private visitor metadata collection; default false

Never commit .env, database files, uploads, or credentials. Back up data/ (or the PostgreSQL database and S3 bucket). New installations start empty; this repository contains no original posts, database, uploads, or production config.

Permissions

This is a single-owner journal. Active superusers see and post to every bucket, including Personal. Staff can author and edit posts; signed-in readers can read Public and G posts, plus restricted buckets granted through Django groups (PG-13, R, MA, Paramour). Assign groups in the admin. There are no built-in email grants or owner email addresses. Create reader accounts in admin; public signup/password reset email are not configured.

Anonymous visitors see Public posts; earlier years have blurred archive previews in the feed. As in the original, a Public post's direct link remains public even when its year is blurred in the feed. Use a restricted bucket for private posts. Local uploads are served through a permission check; S3 uploads use short-lived signed URLs. Keep S3 Block Public Access enabled. Uploaded active content is downloaded rather than rendered inline by the local media route.

The API is at /api/noise/; readers can read visible posts, while writes require staff and session/CSRF authentication. /api/noise/buckets/ lists accessible buckets. The original assistant/Android bearer-token upload endpoint is omitted; clients should use the standalone authenticated API.

Docker

Copy .env.example to .env, set a unique SECRET_KEY and the three initial administrator variables, then:

docker compose up --build -d

SQLite and uploads persist in the noise-data volume. Do not remove that volume unless you intend to delete your content. The app runs as a non-root user.

.env.example contains local HTTP defaults. .env.aws.example contains public HTTPS defaults for compose.aws.yaml; fill in your domain, certificate contact, secret, and initial administrator credentials. Secrets intentionally have no shared default. The environment files are templates, not shell scripts.

Hosting

Put a reverse proxy with HTTPS in front of Gunicorn. Configure ALLOWED_HOSTS, PUBLIC_URL, and CSRF_TRUSTED_ORIGINS for your domain. Set COOKIE_SECURE=true and SECURE_SSL_REDIRECT=true. Set TRUST_PROXY_HTTPS=true only if your trusted proxy replaces X-Forwarded-Proto and direct access to Gunicorn is restricted. Set the proxy body limit to match NOISE_MAX_UPLOAD_BYTES. Static assets are served by WhiteNoise; do not expose the media directory directly through the proxy, because that bypasses bucket permissions. One worker is the default for SQLite; use PostgreSQL for larger deployments and configure WEB_CONCURRENCY. Review Django's deployment checklist.

Optional social login uses your own Cognito public app client (without a client secret), authorization-code flow, and openid email profile phone scopes. Set the NOISE_AUTH_COGNITO_* variables and enable your configured provider names in .env. Register ${PUBLIC_URL}/noise/auth/callback/ as the callback and ${PUBLIC_URL}/noise/ as the logout URL. Cognito identities do not automatically become staff; grant author permissions in admin.

Development

.venv/bin/python manage.py test
.venv/bin/python manage.py check
.venv/bin/python manage.py makemigrations --check --dry-run

Migrations are a fresh baseline for this standalone application. Do not point it at an existing _glitch database; migrating existing content needs a separate, reviewed export/import procedure.

License and credit

MIT licensed. Use, fork, modify, and redistribute Noise, including commercially; keep the license notice with copies. If you build something with it, a link back to the original Noise GitHub repository would be appreciated, but is optional.

Blockrain.js retains its bundled MIT license in assets/noise/vendor/BLOCKRAIN-LICENSE.txt. The shared base stylesheet contains normalize.css (MIT; see assets/base/css/NORMALIZE-LICENSE.txt). jQuery (MIT) and Google Fonts are loaded from their respective CDNs and retain their own licenses.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages