Skip to main content

Get started in 5 minutes

This guide will walk you through installing oForum, setting up your database, and starting your forum.
Before you begin, make sure you have PostgreSQL installed and running on your system.
1

Install oForum

Run the installation script to download the latest version:
curl -fsSL https://raw.githubusercontent.com/arcten/oforum/main/install.sh | sudo sh
This installs the oforum binary to /usr/local/bin and makes it available system-wide.
The script:
  • Detects your OS and architecture (macOS/Linux, amd64/arm64)
  • Downloads the latest pre-built binary from GitHub releases
  • Installs it to /usr/local/bin/oforum
  • Optionally installs the man page to /usr/local/share/man/man1
Verify the installation:
oforum version
Expected output:
oforum v0.0.2
Run 'oforum update' to check for updates
2

Initialize configuration

Run the interactive setup to generate your .env file:
oforum init
You’ll be prompted for:
  • Database URL - Your PostgreSQL connection string
  • Port - The port to run the server on (default: 8080)
Example interaction:
  oforum init

  Database URL (default: postgres://localhost:5432/oforum?sslmode=disable)
  > postgres://localhost:5432/oforum?sslmode=disable

  Port (default: 8080)
  > 8080

  ✓ Created .env

  DATABASE_URL=postgres://localhost:5432/oforum?sslmode=disable
  PORT=8080

  Run oforum to start the server.
Make sure your PostgreSQL database exists before continuing. Create it with:
createdb oforum
3

Run database migrations

Apply the database schema:
oforum migrate
Expected output:
  ⟳ Running migrations...
  ✓ Migrations applied
Migrations also run automatically when you start the server, so this step is optional. However, running migrations separately is useful for debugging or when deploying.
4

Start the server

Launch oForum:
oforum
You’ll see:
2026/03/04 10:30:15 Migrations applied successfully
2026/03/04 10:30:15 Starting server on :8080
[GIN-debug] Listening and serving HTTP on :8080
Open http://localhost:8080 in your browser. You should see the oForum homepage!

Seed demo data (optional)

Want to explore oForum with sample content? Seed the database with demo users, posts, and comments.
Stop the server (Ctrl+C), then run:
oforum seed
This creates:
  • 30 users with usernames like alice, bob, charlie, etc.
  • 20 posts with realistic titles and content
  • 200 comments across the posts
Output:
  ⟳ Seeding database...

  ✓ 30 users created
  ✓ admin: alice
  ✓ 20 posts created
  ✓ 200 comments created

  ✓ Seed complete

  Default login: alice / password123
Restart the server and log in with:
  • Username: alice
  • Password: password123
The first seeded user (alice) is automatically an admin, so you can access the admin panel at http://localhost:8080/admin.

Quick reference

Here are the essential oForum commands:
oforum

Environment variables

oForum configuration is minimal:
VariableRequiredDefaultDescription
DATABASE_URLYesPostgreSQL connection string
PORTNo8080Server port
You can override variables when starting:
PORT=3000 oforum
Or set them directly without a .env file:
DATABASE_URL="postgres://user:pass@host:5432/oforum" oforum

What’s next?

Installation guide

Explore alternative installation methods and platform-specific instructions

Self-hosting

Learn how to deploy oForum to production environments

Environment variables

Understand all configuration options and environment variables

Admin guide

Manage users, roles, and forum settings

Troubleshooting

Make sure you’ve run oforum init or set the DATABASE_URL environment variable:
export DATABASE_URL="postgres://localhost:5432/oforum?sslmode=disable"
oforum
Ensure PostgreSQL is running:
# macOS (Homebrew)
brew services start postgresql

# Linux (systemd)
sudo systemctl start postgresql
And that the database exists:
createdb oforum
Change the port:
PORT=3000 oforum
Or find and stop the process using port 8080:
lsof -i :8080
kill <PID>

Build docs developers (and LLMs) love