OpenGist Icon icon OpenGist

Project website

Docker Image: ghcr.io/thomiceli/opengist
Description from SearXng results:

Go / Self-hosted pastebin powered by Git, open-source alternative to Github Gist.

Model: qwen2.5:latest
Generation Time: 55.685s
#docker#gist#git#go#golang#pastebin#pastebin-service#self-hosted#tailwindcss#typescript#amd64#arm64#unknown

Introduction

ghcr.io/thomiceli/opengist is a self-hosted pastebin platform that stores snippets of code in a Git repository, offering an open-source alternative to GitHub Gists. This Docker image simplifies deployment and management, providing features such as public, unlisted, or private snippet creation, syntax highlighting, search functionality, and OAuth2 login support with multiple providers.

By using this Docker container, you can quickly set up a local instance of Opengist without the need for extensive configuration, making it accessible via http://localhost:6157. The setup is straightforward and ensures that your snippets remain secure and under your control.

Uses and Benefits

ghcr.io/thomiceli/opengist in Docker offers a self-hosted pastebin solution that is both open-source and easily deployable. Here are its primary use cases and benefits:

  • Self-Hosting: Unlike hosted services, Opengist can be self-hosted on your infrastructure, providing greater control over data privacy and security.

  • Open-Source Alternative: Being an open-source project, it allows for full transparency and community contributions, ensuring continuous improvement and flexibility.

  • Git Integration: Snippets are stored in a Git repository, making it easy to manage versions, collaborate, and integrate with other Git tools or workflows.

  • Multiple Access Methods: Supports both HTTP and SSH protocols for snippet management via Git commands, providing flexible access options.

  • User-Friendly Interface: Comes with an intuitive web interface that allows users to create, view, and interact with snippets easily.

  • Enhanced Features: Includes syntax highlighting, markdown support, CSV handling, and advanced features like user-based permissions and OAuth2 login for enhanced security and collaboration.

  • Docker Support: Simplifies deployment and management through Docker images, making it easy to run Opengist in a containerized environment.

By leveraging these benefits, users can host their own robust pastebin service with the flexibility and control that comes from self-hosting.

Docker Setup

To quickly set up ghcr.io/thomiceli/opengist using Docker, follow these steps:

  1. Pull the Docker Image:

    docker pull ghcr.io/thomiceli/opengist:1.7
  2. Create a Docker Compose File: Create a docker-compose.yml file with the following content:

    services:
      opengist:
        image: ghcr.io/thomiceli/opengist:1.7
        container_name: opengist
        restart: unless-stopped
        ports:
          - "6157:6157"  # HTTP port
          - "2222:2222"  # SSH port, can be removed if not used
        volumes:
          - "$HOME/.opengist:/opengist"
        environment:
          UID: 1001   # Optional: Set the user ID to own files
          GID: 1001   # Optional: Set the group ID to own files
  3. Run Docker Compose:

    docker compose up -d

    Opengist will now be running on port 6157. You can access it via http://localhost:6157.

Common Issues

  • Port Conflict: If you encounter a port conflict, change the port numbers in your Docker Compose file and rerun docker compose up -d.

  • Volume Permissions: Ensure that the user running Docker has write permissions to the mounted volume directory ($HOME/.opengist).

By following these steps, you should have a basic setup of Opengist using Docker. For more advanced configurations or troubleshooting, refer to the official documentation.

Security Essentials

To ensure the security of ghcr.io/thomiceli/opengist when running it in Docker, follow these essential measures:

  1. Use a Trusted Image: Always pull images from trusted repositories like ghcr.io/thomiceli/opengist to avoid vulnerabilities.

  2. Run as Non-Root User: When setting up your Docker container, use the UID and GID environment variables to run Opengist as a non-root user. This minimizes potential damage if the application is compromised.

    environment:
      UID: 1001
      GID: 1001
  3. Secure SSH Port: If you enable SSH access, ensure it’s properly secured by using strong passwords or keys and limiting access to trusted sources.

  4. Volume Permissions: Use the volume mapping v "$HOME/.opengist:/opengist" to persist data while ensuring that only necessary permissions are granted.

    volumes:
      - "$HOME/.opengist:/opengist"
  5. Network Isolation: Run your Docker container in a secure network environment and limit access to the exposed ports, especially HTTP and SSH.

  6. Regular Updates: Keep your Docker image up-to-date with the latest security patches by regularly pulling the latest version from the repository.

    docker pull ghcr.io/thomiceli/opengist:latest
  7. Firewall Rules: Configure your firewall to allow only necessary incoming traffic on the exposed ports.

By following these guidelines, you can significantly enhance the security posture of running ghcr.io/thomiceli/opengist in a Docker environment.