CHECKING STATUS
I AM LISTENING TO
|

Day 13: OpenGist – Self-Hosted Pastebin Service Powered by Git – 7 Days of Docker

3. March 2025
.SHARE

Table of Contents

This guide will show you how to set up OpenGist – an open-source alternative to GitHub Gist – using Portainer for easy deployment and management.

What is OpenGist?

OpenGist is a self-hosted pastebin service powered by Git, designed as an open-source alternative to GitHub Gist. All snippets are stored in a Git repository and can be read and/or modified using standard Git commands or through the intuitive web interface.

Unlike traditional pastebin services, OpenGist leverages Git’s version control capabilities, making it ideal for developers who want to track changes to their code snippets over time. The Git integration means you can clone, pull, and push changes to your snippets using familiar Git workflows, making collaboration and code management seamless.

OpenGist was developed by Thomas Miceli and released under the AGPL-3.0 license, ensuring it remains free and open-source. It’s built using Go for the backend and utilizes modern web technologies for the frontend, resulting in a lightweight yet powerful application.

Key Features

  • Visibility Control: Create public (visible to everyone), unlisted (accessible only via direct link), or private (visible only to you) snippets
  • Git Integration: Initialize, clone, pull, and push snippets via Git over HTTP or SSH
  • Syntax Highlighting: Support for numerous programming languages with automatic language detection
  • Markdown & CSV Support: Rich rendering of markdown files and formatted display of CSV data
  • Search Functionality: Search code within snippets and browse by user, likes, or forks
  • Organization: Add topics to snippets for better categorization
  • Embedding: Embed snippets in other websites with a simple iframe code
  • Version Control: Track changes with a comprehensive revision history
  • Social Features: Like and fork snippets from other users
  • Export Options: Download raw files or entire snippets as ZIP archives
  • Authentication Options: Support for OAuth2 login with GitHub, GitLab, Gitea, and OpenID Connect
  • Customization: Extensive configuration options for adapting to your specific needs
  • API Access: RESTful API for programmatic interaction with your OpenGist instance

With its focus on simplicity, performance, and Git integration, OpenGist provides a powerful yet easy-to-use platform for storing, sharing, and collaborating on code snippets.

Installing OpenGist with Portainer

Prerequisites

  • A server with Docker installed
  • Portainer CE/BE already set up and running

If you don’t have Portainer yet, you can install it with:

docker volume create portainer_data
docker run -d -p 8000:8000 -p 9443:9443 --name portainer \
  --restart=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce:latest

Access Portainer at https://your-server-ip:9443

Deployment Steps

  1. Log in to Portainer Access your Portainer instance and log in with your credentials.
  2. Create a Stack for OpenGist
version: '3'
services:
  opengist:
    image: ghcr.io/thomiceli/opengist:1.9
    container_name: opengist
    restart: unless-stopped
    ports:
      - "6157:6157" # HTTP port
      - "2222:2222" # SSH port, can be removed if you don't use SSH
    volumes:
      - opengist_data:/opengist
    environment:
      # Add any configuration options here
      # OG_LOG_LEVEL: info

volumes:
  opengist_data:
  1. Deploy the Stack Click on Deploy the stack button
  2. Access OpenGist After deployment completes, access OpenGist at http://your-server-ip:6157

Basic Configuration Options

You can add environment variables to customize your OpenGist installation:

environment:
  # General settings
  OG_BASE_URL: https://opengist.example.com
  
  # User permissions
  UID: 1001
  GID: 1001
  
  # Authentication options
  OG_DISABLE_REGISTRATION: false
  OG_OAUTH_GITHUB_ENABLED: true

For a complete list of configuration options, check the official documentation.

Managing Your OpenGist Deployment

Portainer makes it easy to:

  • View logs: Navigate to Containers → OpenGist → Logs
  • Update the container: Go to Stacks → OpenGist → Editor, update the image tag, click “Update the stack”
  • Monitor resources: Check real-time CPU, memory, and network usage

Useful Links

Let’s Talk!

Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.

Get in touch,
and let’s create something amazing together!

RELATED POSTS

Updated: 03/2026 When I first put together the open-source KPI roundup back in October 2025, the landscape was already impressive. Fast forward to early 2026 and things have moved fast — we’re talking major version releases, AI features landing in free tiers, and a couple of genuinely exciting new tools that deserve a spot on […]

A lot has evolved since I shared my top Docker picks in 2025. I’ve streamlined the whole setup, cut the noise, and focused on what I actually use — locally and externally. Better organised, better documented, and somehow more enjoyable than ever. Could not stick to 10, so its 10++++! My Top Universal Docker Solutions […]

Spam hasn’t gone anywhere. Keep coming back to it, as I hate cleaning up my INBOX and so do my clients! In fact, AI-generated spam has made the problem noticeably worse through 2025 and into 2026 — it’s more convincing, passes basic heuristic checks that would’ve flagged template spam instantly, and arrives in higher volumes. […]

Alexander

I am a full-stack developer. My expertise include:

  • Server, Network and Hosting Environments
  • Data Modeling / Import / Export
  • Business Logic
  • API Layer / Action layer / MVC
  • User Interfaces
  • User Experience
  • Understand what the customer and the business needs


I have a deep passion for programming, design, and server architecture—each of these fuels my creativity, and I wouldn’t feel complete without them.

With a broad range of interests, I’m always exploring new technologies and expanding my knowledge wherever needed. The tech world evolves rapidly, and I love staying ahead by embracing the latest innovations.

Beyond technology, I value peace and surround myself with like-minded individuals.

I firmly believe in the principle: Help others, and help will find its way back to you when you need it.