selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

habitat logo

Self-host habitat

1.7.1

Decentralized social platform for local communities

ReleaseOpen SourceAGPL-3.0
Updated10 hours ago
LanguagePHP
Setup difficultyModerate
MobileResponsive
ThemeDark mode
Stars
150
Ports
80 (HTTP (redirects to HTTPS via Caddy)), 443 (HTTPS (Caddy reverse proxy))
Requires
PostgreSQL
Docker
carlnewton/habitat
Home feed on desktopHome feed on mobileNearby feed on mobileCreating a post on mobileRegistration challenge on sign up pageExample announcement on post pageUser moderation indexPost moderation indexSetting location on admin settings pageCategories management index

What is habitat?

Habitat is a free and open-source self-hosted social platform designed for local communities. Each instance serves a specific geographic area where residents can discuss local places, events, and topics through location-aware feeds. Users can create posts with categories, photos, and map locations, while moderators and administrators have tools for user management, content moderation, announcements, and registration challenges as an alternative to CAPTCHA. The platform is built with PHP/Symfony and runs via Docker Compose with a PostgreSQL database and Caddy for HTTPS. It supports dark mode, responsive mobile layouts, and optional S3 storage for uploads. There are no ads, tracking, or central authority — each instance is independently operated.

Should you self-host habitat?

habitat scores 46/100 on selfhost.directory (how scoring works) and ranks #55 of 69 in Social Networks & Forums. It has 150 GitHub stars.

It shipped 11 stable releases in the past year. The latest, 1.7.1, came out on 21 October 2026. New versions land roughly every 3 weeks.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in PHP.

Its closest alternative on selfhost.directory is Discourse (83/100, 48 024 stars). It scores higher overall, so compare the two before you pick. See habitat vs Discourse side by side.

Features

  • Announcements
  • Blocked email addresses
  • Category Management
  • Comments and reactions
  • Customizable sidebar content
  • Location-based feeds
  • Multi-language Support
  • Post and comment moderation
  • Post creation with categories, photos, and map locations
  • Registration challenge (CAPTCHA alternative)
  • Report handling
  • S3 or local storage for uploadsOne-time choice at initial setup, cannot be changed later
  • User moderation (freeze/ban)
  • User registration with verification

habitat README

How to configure habitat

  • APP_SECRETA 32 character string unique to your Habitat instance, kept secret

    A 32 character string unique to your Habitat instance, kept secret

  • DATABASE_URLFull PostgreSQL connection string

    Full PostgreSQL connection string

  • DOMAINThe domain of your Habitat instance

    The domain of your Habitat instance

  • ENCRYPTION_KEYA 32 character string unique to your Habitat instance, kept secret, never changed

    A 32 character string unique to your Habitat instance, kept secret, never changed

  • POSTGRES_CHARSETutf8PostgreSQL charset

    PostgreSQL charset

  • POSTGRES_DBhabitatPostgreSQL database name

    PostgreSQL database name

  • POSTGRES_PASSWORDPostgreSQL database password

    PostgreSQL database password

  • POSTGRES_USERPostgreSQL database username

    PostgreSQL database username

  • POSTGRES_VERSION16PostgreSQL version

    PostgreSQL version

  • RUN_MIGRATIONSfalseWhether to run database migrations on startup

    Whether to run database migrations on startup

  • SERVER_NAMEFull URL of the Habitat instance (e.g. https://example.com)

    Full URL of the Habitat instance (e.g. https://example.com)

habitat releases & version history

More in Community

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…