Back to articles
Technology Insight

Building an Internal Tech Community: Deploying Forem on Docker VPS

June 3, 2026

Introduction: The Case for an Internal Tech Community

In modern enterprise environments, knowledge siloization represents a significant barrier to innovation and agility. While traditional communication tools like Slack or Microsoft Teams excel at real-time, ephemeral chat, they often fail to capture long-form technical insights, architectural decisions, and structured tutorials. Email newsletters and static intranets rarely spark the active peer-to-peer engagement that engineering teams thrive on.

To bridge this gap, forward-thinking organizations are turning to self-hosted, dedicated social networks. Forem, the robust open-source software that powers massive global developer communities like DEV.to, offers an exceptional solution. By deploying a private instance of Forem on a Virtual Private Server (VPS) using Docker, your organization can establish a secure, scalable, and highly engaging internal knowledge hub. This article provides a comprehensive, production-grade guide to executing this deployment strategy.

---

Why Forem? The Perfect Blueprint for Tech Teams

Forem is uniquely suited for technical audiences. Unlike generalized corporate social networks, its feature set aligns perfectly with the workflows and preferences of developers, system administrators, and data scientists.

  • Markdown Native: Technical professionals prefer writing in Markdown. Forem provides a seamless writing and reading experience tailored for code snippets and technical documentation.
  • Structured Discussion: Through customizable tags, listings, and robust comment threads, critical technical discussions remain organized and easily searchable over time.
  • High Engagement Mechanics: Built-in features such as followable tags, user profiles, notifications, and reactions (like, unicorn, save) mimic public developer ecosystems, organically driving internal adoption.
  • Open Source & Self-Hosted: Total ownership over data ensures compliance with strict enterprise privacy standards and intellectual property protections.
---

Prerequisites and Infrastructure Planning

Before initiating the deployment process, ensuring your infrastructure meets Forem's operational demands is critical for a smooth production experience. Forem is a powerful, multi-component application built on Ruby on Rails, requiring adequate compute resources to manage its background workers, database, and caching layers.

1. Hardware Specifications (VPS)

For a small to medium-sized internal community (up to 1,000 active users), we recommend the following minimum virtual machine specifications:

  • CPU: 4 vCPUs (Dedicated vCPUs are highly recommended over shared threads to handle spikes in background processing).
  • RAM: 8 GB Minimum (Forem utilizes Sidekiq for background jobs, Elasticsearch for search, and PostgreSQL, which collectively demand substantial memory).
  • Storage: 50 GB+ NVMe or SSD storage.
  • OS: Ubuntu 22.04 LTS or Ubuntu 24.04 LTS (Clean installation).

2. Networking and DNS Requirements

Ensure you have access to your enterprise DNS provider to configure the following records:

  • An A Record pointing your chosen subdomain (e.g., community.internal.company.com) to the public IP address of your VPS.
  • Properly configured firewall rules (Security Groups) allowing traffic on ports 80 (HTTP), 443 (HTTPS), and 22 (SSH).
---

Step-by-Step Deployment Guide via Docker

Forem provides official self-hosting blueprints primarily utilizing containerization. We will leverage Docker and Docker Compose to orchestrate the core services, alongside an Nginx reverse proxy secured by Let's Encrypt TLS certificates.

Step 1: System Preparation and Docker Installation

Connect to your VPS via SSH and update the core system packages to their latest versions:

sudo apt update && sudo apt upgrade -y

Next, install the Docker engine along with the Docker Compose plugin:

sudo apt install -y docker.io docker-compose-plugin
sudo systemctl enable --now docker

Step 2: Cloning the Forem Container Repository

Forem maintains a dedicated repository for self-hosted container configurations. Clone this structure into your preferred installation directory, typically /opt/forem:

sudo git clone [https://github.com/forem/selfhost.git](https://github.com/forem/selfhost.git) /opt/forem
cd /opt/forem

Step 3: Configuring Environment Variables

Forem relies extensively on environment variables for its configuration. Duplicate the provided template file to create your active production environment file:

cp .env.sample .env

Open the .env file with a text editor (such as nano or vim) and configure the essential parameters:

  • FOREM_COMMUNITY_NAME: The name of your internal community (e.g., "Acme Corp Tech Hub").
  • DEFAULT_EMAIL: The administrator's primary email address.
  • APP_DOMAIN: Your fully qualified domain name (e.g., community.internal.company.com).
  • COMMUNITY_LOG_LEVEL: Set to info or warn for production deployment.

Additionally, you must configure SMTP settings to enable the platform to send invitation emails, notifications, and password resets. Example variables include SMTP_ADDRESS, SMTP_PORT, SMTP_USERNAME, and SMTP_PASSWORD.

Step 4: Initializing Infrastructure and Containers

Forem utilizes an automated setup script within their self-hosted repository to handle initial database migrations, asset compilation, and seed data generation. Run the initialization routine:

sudo ./setup

Once the setup completes successfully, start the core application containers in detached mode:

sudo docker compose up -d

Verify that all containers—including the Rails application server, Sidekiq worker, PostgreSQL database, Redis cache, and OpenSearch/Elasticsearch engine—are running smoothly by executing sudo docker compose ps.

Step 5: Implementing Reverse Proxy and SSL

To ensure secure end-to-end communication, route external traffic through Nginx acting as a reverse proxy, paired with an automated Let's Encrypt SSL configuration via Certbot.

sudo apt install -y nginx certbot python3-certbot-nginx

Configure an Nginx server block pointing to [http://127.0.0.1:3000](http://127.0.0.1:3000) (the port exposed by the Forem container setup), and secure it by running:

sudo certbot --nginx -d community.internal.company.com
---

Post-Deployment and Day-Two Operations

With the platform accessible via HTTPS, navigate to your domain to complete the initial wizard setup, where you will register the primary administrator account.

Authentication Strategies for Enterprise

Because this platform serves an internal corporate community, allowing open, public registration is highly discouraged. Within the Forem Admin Dashboard (/admin), navigate to authentication settings to align registration workflows with your corporate security postures:

  • OAuth Integration: Connect Forem to corporate authentication providers such as GitHub Enterprise, GitLab, or Google Workspace to allow single-click logins.
  • Domain Restrictions: Restrict account creation exclusively to users holding corporate email domains (e.g., @company.com).
  • Invitation-Only Mode: Explicitly close registration and rely entirely on admin-generated invite links.

Backup and Maintenance Best Practices

To guarantee business continuity, establish automated cron jobs to handle database backups and volume persistence. Regularly back up the PostgreSQL database container utilizing pg_dump and capture uploaded media assets stored within local Docker volumes or synced to an internal AWS S3-compatible object storage container.

---

Conclusion: Cultivating the Community Ecosystem

Successfully deploying Forem on a Docker VPS is merely the technical foundation. The true success of an internal technical social network depends heavily on community cultivation. Encourage tech leads, architects, and senior engineers to lead by example—publishing post-mortems, sharing prototyping breakthroughs, and hosting virtual hackathons on the platform.

By migrating fragmented technical conversations out of volatile chat apps and into a structured, searchable, and social ecosystem like Forem, your engineering organization establishes an evergreen knowledge repository that accelerates onboarding, cross-department collaboration, and overall engineering excellence.

Building an Internal Tech Community: Deploying Forem on Docker VPS | DPTCloud