GoHost is a powerful HTTP server tool for Debian Linux, written in Go. It allows you to host websites, serve files, and optionally enable downloads for non-web files. With built-in support for Serveo and Cloudflared tunnels, you can expose your server to the internet and make it accessible from anywhere.
-
Host websites and serve any folder as an HTTP server on Linux.
-
Render
.html
,.htm
,.css
, and.js
files as websites. -
When download mode is off, files can only be viewed in the browser by clicking on them.
-
When download mode is on, non-web files can be downloaded by clicking on them.
-
Access your server from anywhere using Serveo or Cloudflared tunnels.
-
Automatically installs SSH (for Serveo) and Cloudflared if missing.
- Linux (Debian)
-
Make sure you have Go installed
-
Clone the GoHost repository:
git clone https://github.com/s-r-e-e-r-a-j/GoHost.git
- Navigate to the GoHost folder:
cd GoHost
- Run the installer:
sudo bash install.sh
After installation, you can use gohost
from anywhere.
gohost [options]
Option | Description | Default Value |
---|---|---|
-port |
Port to run the HTTP server | 8000 |
-path |
Folder path to serve | Current directory |
-tunnel |
Tunnel method for internet access (serveo or cloudflared ) |
None (local only) |
-download |
Enable download mode (true or false ) |
false |
- Host the current directory on port 8000 (default, view only)
gohost
- Host the current directory on a custom port (view only)
gohost -port 8080
- Host a specific folder on a custom port (view only)
gohost -port 8080 -path /home/user/files
- Host a folder with download mode enabled (non-web files downloadable)
gohost -port 8080 -path /home/user/files -download true
- Expose a folder on the internet
# Expose using Serveo
gohost -port 8080 -path /home/user/files -tunnel serveo
# Expose using Cloudflared
gohost -port 8080 -path /home/user/files -tunnel cloudflared
# Expose using Cloudflared and enable download mode for non-web files
gohost -port 8080 -path /home/user/files -tunnel cloudflared -download true
Requirement: Your folder must contain only .html
, .css
, and .js
files
(e.g., index.html
, style.css
, script.js
). No other file types.
# Default port 8000
gohost -path /home/user/website
# Custom port
gohost -port 8080 -path /home/user/website
Expose the website on the internet:
# Serveo
gohost -port 8080 -path /home/user/website -tunnel serveo
# Cloudflared
gohost -port 8080 -path /home/user/website -tunnel cloudflared
Run uninstall.sh script:
sudo bash uninstall.sh
This project is licensed under the MIT License