Back to articles
Technology Insight

Building an Internal Tech Community: Deploying Forem on Docker VPS

June 2, 2026

Introduction: Why Your Tech Team Needs an Internal Social Network

In modern enterprise environments, engineering teams often face information silo issues. While traditional communication tools like Slack, Microsoft Teams, or Discord excel at real-time chatting and immediate operations, they frequently fail at retaining long-form knowledge. Valuable technical insights, architectural decisions, and deep-dive tutorials often get buried in the endless scroll of chat history.

To solve this, organizations are turning to community-driven knowledge platforms. Forem, the robust open-source software that powers global developer communities like DEV.to, offers the perfect solution. By deploying a self-hosted instance of Forem within your organization, you can establish an internal niche social network specifically tailored for your tech talent. This platform enables engineers to publish articles, discuss technical stacks, share code snippets, and collaborate in a structured, searchable, and highly engaging manner.

In this comprehensive guide, we will walk you through the end-to-end process of deploying a self-hosted Forem platform on a Virtual Private Server (VPS) using Docker, ensuring your organization can build a resilient, scalable, and secure internal knowledge hub.


1. System Architecture and Prerequisites

Before diving into the installation, it is crucial to understand the architectural requirements of Forem. Because Forem is a feature-rich platform built on Ruby on Rails, PostgreSQL, Redis, and Elasticsearch, it requires a robust hosting environment to ensure smooth performance.

Hardware Recommendations

  • CPU: Minimum 2 vCPUs (4 vCPUs recommended for production environments).
  • RAM: Minimum 4GB RAM (8GB RAM recommended to handle Elasticsearch and background workers efficiently).
  • Storage: 40GB+ SSD or NVMe storage, depending on the volume of media uploads and log retention.

Software and Network Requirements

  1. A clean VPS running a modern Linux distribution (e.g., Ubuntu 22.04 LTS or Ubuntu 24.04 LTS).
  2. A fully qualified domain name (FQDN) pointed to your VPS IP address (e.g., community.yourcompany.com).
  3. Docker Engine (version 20.10+) and Docker Compose (version 2.0+) installed on the host machine.
  4. SMTP credentials from a reliable provider (SendGrid, AWS SES, or internal SMTP) for user authentication and notifications.

2. Preparing the VPS Environment

First, access your VPS via SSH and update the system packages to the latest stable versions to guarantee security and compatibility.

sudo apt update && sudo apt upgrade -y

Next, ensure that Docker and Docker Compose are installed correctly. If they are not already present on your system, you can set them up using the official Docker convenience script:

curl -fsSL [https://get.docker.com](https://get.docker.com) -o get-docker.sh
sudo sh get-docker.sh

Verify the installation by checking the versions:

docker --version
docker compose version

Note: Ensure that ports 80 (HTTP) and 443 (HTTPS) are open on your cloud provider's firewall or security groups, as these are necessary for serving the platform and generating SSL certificates.


3. Configuring the Forem Docker Deployment

Forem provides an official containerized setup workflow, typically managed via container orchestration. For a simplified single-node VPS setup, we will use a structured Docker Compose configuration that orchestrates the core components: the Rails application web server, sidekiq background workers, PostgreSQL database, Redis cache, and Elasticsearch for powerful community search capabilities.

Step 3.1: Directory Setup and Environment Files

Create a dedicated directory for your Forem installation and navigate into it:

mkdir -p /opt/forem && cd /opt/forem

Forem relies heavily on environment variables for security keys, database credentials, and third-party integrations. Create an .env file in your directory and populate it with your specific configuration details:

# Core Configuration
APP_DOMAIN=community.yourcompany.com
SECRET_KEY_BASE=your_generated_long_secure_random_string

# Database Configurations
POSTGRES_PASSWORD=your_secure_db_password
REDIS_URL=redis://redis:6379/1

# Mailer Settings
SMTP_ADDRESS=smtp.sendgrid.net
SMTP_PORT=587
SMTP_USER_NAME=apikey
SMTP_PASSWORD=your_smtp_password
[email protected]

Ensure you generate strong random strings for your SECRET_KEY_BASE and POSTGRES_PASSWORD to prevent unauthorized database access or session tampering.


4. Deploying and Initializing the Services

With your environment variables defined and your configuration file ready, you can now launch the entire stack using Docker Compose. Execute the following command to download the necessary images and start the containers in detached mode:

docker compose up -d

Because Forem requires initial database schemas, seeds, and search indices to operate, you must run the database migration scripts inside the running application container. Execute this command to initialize your database structure:

docker compose exec web rails db:setup

Monitor the startup sequence and logs to ensure that all background processes, including Elasticsearch and Redis connectivity, are functioning without errors:

docker compose logs -f --tail=100

5. Configuring Reverse Proxy and SSL Certificates

To expose your internal tech social network securely to your team over HTTPS, it is highly recommended to implement a reverse proxy such as Nginx or Caddy. Below is a standard Nginx server block configuration acting as an SSL termination proxy:

server {
    listen 80;
    server_name community.yourcompany.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    server_name community.yourcompany.com;

    ssl_certificate /etc/letsencrypt/live/[community.yourcompany.com/fullchain.pem](https://community.yourcompany.com/fullchain.pem);
    ssl_certificate_key /etc/letsencrypt/live/[community.yourcompany.com/privkey.pem](https://community.yourcompany.com/privkey.pem);

    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Utilize Certbot to generate free, automated Let's Encrypt SSL certificates to guarantee that all internal enterprise traffic, credentials, and technical data remain encrypted during transit.


6. Post-Deployment Administration and Best Practices

Once the platform is accessible via your secure domain, navigating to the URL will prompt you to create the initial administrator account. This primary admin user will have full access to Forem's powerful admin portal, allowing you to customize the community experience.

Key Configuration Checklist for Tech Communities

  • Authentication Settings: For enterprise security, configure OAuth integrations with platforms your team already uses, such as GitHub, GitLab, or Google Workspace, ensuring seamless single sign-on (SSO).
  • Custom Tags and Categories: Set up tags specific to your engineering stacks (e.g., #devops, #architecture, #frontend, #security) to encourage organized posting from day one.
  • Internal Moderation Policies: Even within an internal community, establishing clear guidelines for code reviews, architectural feedback, and respectful technical discourse ensures a healthy engineering culture.

Additionally, remember to set up standard cron jobs on your VPS host to take automated nightly backups of your PostgreSQL database volume and uploaded media files, preventing critical corporate knowledge loss.


Conclusion

Deploying Forem on a Docker VPS provides your enterprise with a self-hosted, sovereign space where technical knowledge can thrive organically. Unlike fragmented chat logs, Forem preserves long-form technical discussions, tutorials, and post-mortems in an accessible and engaging social format. By taking full ownership of your engineering community platform, you enhance internal collaboration, streamline onboarding for new developers, and cultivate a stronger, more transparent DevOps culture within your organization.

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