Deploy Swagger Editor on Linux with Docker and Enable Remote Collaborative Editing Without a Public IP

Swagger Editor is an open source editor for creating and editing OpenAPI-based API documentation. Its built-in visual preview and real-time validation make it much easier to write and maintain API specifications compared to plain text editing.

Enabling remote access to a self-hosted Swagger Editor allows team members to access and edit API documentation from any location, eliminates the need for local installation on every developer's machine, and makes it easy to collaborate and keep documentation consistent and up to date.

This workflow deploys Swagger Editor with Docker on Linux, then uses cpolar intranet penetration to expose the local editor to the public internet for remote colllaboration, no public static IP required. This method also works for Swagger Editor instances already integrated into local projects.

Deploy Swagger Editor with Docker

Docker simplifies deployment by eliminating manual dependency management. First, pull the official Swagger Editor image from Docker Hub:

docker pull swaggerapi/swagger-editor

Next, start a detached container, mapping the container's default 8080 port to an available port on your Linux host. This example uses host port 8088, which you can change to any unused port:

docker run -p 8088:8080 -d swaggerapi/swagger-editor

Once the container starts, verify the deployment by accessing http://<your-linux-local-ip>:8088 in a browser connected to the same local network. If the Swagger Editor interface loads correctly, local deployment is complete.

Install Cpolar Intranet Penetration Tool

Cpolar creates a secure tunnel between your local service and the public internet, so you don't need to purchase a public cloud server or configure a public static IP to enable remote access. Install Cpolar on Linux with the following steps:

Run the one-click installation script:

curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash

Add Cpolar to systemd to enable auto-start on system boot:

sudo systemctl enable cpolar

Start the Cpolar service:

sudo systemctl start cpolar

After installation completes, access the Cpolar web admin dashboard at http://<your-linux-local-ip>:9200. Log in with your Cpolar account (you can register a free account directly from the page if you don't have one).

Configure Public Access Tunnel for Swagger Editor

From the left sidebar of the Cpolar admin dashboard, navigate to Tunnel Management > Create Tunnel to create a public tunnel for your local Swagger Editor:

  • Tunnel Name: Use any custom name (ensure it does not match existing tunnel names)
  • Protocol: Select http
  • Local Address: Enter 8088 (the local host port you mapped for Swagger Editor)
  • Domain Type: Select Random Domain for free usage
  • Region: Select China

Click the Create button to generate the tunnel. Once created, navigate to Status > Online Tunnel List to view your generated public access URLs; both HTTP and HTTPS are available.

Remote Collaborative Editing via Public URL

Open the generated HTTPS public URL in any browser on any device, you will see the Swagger Editor interface. You can share this URL with your team members to allow collaborative API document editing from anywhere.

Configure a Fixed Permanent Public URL

The random domain generated for free tunnels changes every 24 hours, which is not suitable for long-term use. You can reserve a fixed secondary subdomain that will never change (this requires upgrading to a Cpolar basic or higher plan, all domains on cpolar.cn are already ICP registered):

  1. Log in to the Cpolar official website, navigate to Reserve > Reserve Second Level Subdomain, enter your desired subdomain name, and click Reserve. Copy the reserved subdomain after successful creation.
  2. Return to the Cpolar web admin dashboard on your Linux server, navigate to Tunnel Management > Tunnel List, find your Swagger Editor tunnel and click Edit.
  3. Update the tunnel configuration: change Domain Type to Second Level Subdomain, paste your reserved subdomain into the Sub Domain input field.
  4. Click Update to save the configuration changes.

Refresh the Online Tunnel List, you will now see your new fixed public address that can be used for long-term remote access.

Tags: Linux docker Swagger Editor Intranet Penetration API Documentation

Posted on Mon, 07 Sep 2026 16:09:53 +0000 by seularts