Host yo' self from your browser, your phone, your toaster.

Overview

hostyoself
Version

A hosting service from the browser, because why not. Try it at hostyoself.com.

See it in action

Here's an example where I use hostyoself.com to host itself. I use wget to download hostyoself.com and then host hostyoself.com from hostyoself.com: hostyoself.com/hostyoself/. Happy 9th Anniversary Inception 🍰 !

Inception

Host from the browser

Open hostyoself.com and drag and drop a folder, or select a file. Your browser will host the files!

Host from the command line

You can host files directly from the terminal!

$ hostyoself host
https://hostyoself.com/confidentcat/

Now if you have a file in your folder README.md you can access it with the public URL https://hostyoself.com/confidentcat/README.md, directly from your computer!

If you're on a Mac, you can install with Homebrew:

brew tap schollz/homebrew https://github.com/schollz/homebrew-tap.git
brew install hostyoself

Or you can host your current directory using Docker:

$ docker run -v `pwd`:/data schollz/hostyoself

Run your own relay

Want to run your own relay? Its easy.

$ hostyoself relay --url https://yoururl

FAQ

How do I start web hosting? You will need to setup port forwarding, a dynamic DNS, name registration, MySQL, PHP, Apache and take a online course in Javascript.

Just kidding! You don't need any of that crap. Just goto hostyoself.com drag and drop a folder, or select a file. That's literally it. Now you can host a website from your laptop or your phone or your smartwatch or your toaster.

How is this possible? When the server you point at gets a request for a webpage, the server turns back and asks you for that content and will use what you provide for the original request.

Seriously, how is this possible? The relay uses websockets in your browser to process GET commands.

Won't my website disappear when I close my browser? Yep! There is a command-line tool that doesn't require a browser so it can run in the background if you need that. But yes, if your computer turns off then your site is down. Welcome to the joys of hosting a site on the internet.

Won't I have to reload my browser if I change a file? Yep! Welcome to the joys of Javascript.

What's the largest file I can host using this? ¯\_(ツ)_/¯

Should I use this to host a website? Dear god yes.

Does this use AI or blockchain? Sure, why not.

Does it scale? Horizontally, or vertically? Probably neither!

What inspired this? beaker browser, ngrok, localhost.run, inlets.dev, Parks and Recreation.

What's the point of this? You can host a website! You can share a file! Anything you want, directly from your browser!

Develop

$ git clone https://github.com/schollz/hostyoself
$ cd hostyoself
$ go generate -v -x
$ go build -v

License

MIT

Issues
  • Folder dropping doesn't work

    Folder dropping doesn't work

    I dropped a folder and the list of files served was correct but navigating to the charmingly named url returned a 404 response.

    Worked perfectly for a single file from the same folder.

    How does this work? Does all the traffic go through your server? If so, surely it will cost you a fortune in bandwidth charges if anyone seriously uses the idea.

    Anyway, it's a cool demo.

    Edit: forgot to mention that I'm running Firefox 67.0.4, 64 bit, on Windows 10.

    bug 
    opened by kwhitefoot 5
  • Dockerization

    Dockerization

    I'd like to propose a Dockerized version of hostyoself so that the CLI version can be run via a docker run command.

    I'll be happy to contribute a Dockerfile and push the Docker image to Docker Hub. Just say the word! :-)

    opened by dmuth 5
  • 502 bad gateway on website...

    502 bad gateway on website...

    opened by karanganesan 4
  • Does not work on Firefox 68.0 on Android 5.1.1

    Does not work on Firefox 68.0 on Android 5.1.1

    Hi. After selecting a document on Firefox 68.0 on Android 5.1.1, the "Your file is available at:" text never appears.

    bug help wanted 
    opened by daveloyall 4
  • How do I host from command line?

    How do I host from command line?

    I was wondering if someone could tell me how I host from the command line? Thanks in advance!

    opened by griffin-larson 3
  • Homebrew install script

    Homebrew install script

    Would like to see this available as a Homebrew install script for OS/X.

    If you like, I'd be willing to take a crack at that this weekend. :-)

    -- Doug

    opened by dmuth 2
  • Fix a typo.

    Fix a typo.

    opened by 0x333333 2
  • Fix typos

    Fix typos

    "What's" instead of "Whats"

    opened by DavidePastore 1
  • Added Homebrew installation instructions

    Added Homebrew installation instructions

    Change to README.md for #3

    opened by dmuth 1
  • Update readme

    Update readme

    You don't need MySQL, PHP, or Apache for a website. In fact I wouldn't use any one of those, especially not MySQL. Not to mention that 'dynamic DNS' is not needed if your IP only changes once in a millennium.

    And port forwarding isn't hard, and isn't even needed if you get a cloud server with its own dedicated IP for like $5/mo from DigitalOcean or somewhere else. And right now Hosting24 is offering their highest tier of shared hosting for $4 a month, which includes SSH access, and sure yeah MySQL and PHP if you insist.

    image

    :>

    Shared access is no root access but VPSes aren't expensive :p

    opened by LoganDark 1
  • Failed with special file names

    Failed with special file names

    When there's a # in filename, it seems that it's not escaped in URL thus parsed as hash, causes not found error.

    Should be escaped as %23

    opened by lekoOwO 0
  • Update CLI library

    Update CLI library

    This PR updates urfave/cli to v2. :slightly_smiling_face:

    Thanks for this ~~ancient magic~~ really cool project!

    opened by jolheiser 0
  • Relay SSL Support

    Relay SSL Support

    Hello,

    When I using the relay option:

    $ hostyoself relay
    [info]	2019/10/13 11:44:41 listening on :8010
    [info]	2019/10/13 11:44:41 127.0.0.1:60028 GET /ws 2.406ms
    [info]	2019/10/13 11:44:49 [::1]:60031 GET / 1.123ms
    

    The localhost the connection does not appear to be using SSL (https); I can only connect via (http). Is there some trick getting it to work via SSL?

    ~ Thank you

    opened by ParityError 0
  • Are there instructions on how to set this up on a linux server?

    Are there instructions on how to set this up on a linux server?

    This is very cool. I have an aws ubuntu server and I'd like the students to drop their files on www.mydomainname.com. How would I set that up?

    opened by whimsica 0
  • difficulties to install it (gp-path?) linux mint

    difficulties to install it (gp-path?) linux mint

    go build -v main.go:14:2: cannot find package "github.com/schollz/hostyoself/pkg/client" in any of: /usr/lib/go-1.10/src/github.com/schollz/hostyoself/pkg/client (from $GOROOT) /home/marsiho/go/src/github.com/schollz/hostyoself/pkg/client (from $GOPATH) main.go:15:2: cannot find package "github.com/schollz/hostyoself/pkg/server" in any of: /usr/lib/go-1.10/src/github.com/schollz/hostyoself/pkg/server (from $GOROOT) /home/marsiho/go/src/github.com/schollz/hostyoself/pkg/server (from $GOPATH) main.go:16:2: cannot find package "github.com/schollz/logger" in any of: /usr/lib/go-1.10/src/github.com/schollz/logger (from $GOROOT) /home/marsiho/go/src/github.com/schollz/logger (from $GOPATH) main.go:17:2: cannot find package "github.com/urfave/cli" in any of: /usr/lib/go-1.10/src/github.com/urfave/cli (from $GOROOT) /home/marsiho/go/src/github.com/urfave/cli (from $GOPATH)

    opened by marsiho 0
  • Documentation bug: what is the `inputKey` field for?

    Documentation bug: what is the `inputKey` field for?

    Hi again, Mark.

    What is the inputKey field for?

    (You can spawn multiple hosts with this key).

    Ok, where do I put the input key? What does 'multiple hosts' mean here? Does that mean I can spawn up multiple copies of hostyoself that serve up the same files at the same address and are available via the same sharable URL?

    documentation 
    opened by daveloyall 2
  • Logo proposal for hostyoself

    Logo proposal for hostyoself

    Hello @schollz Good morning, I am creating my design portfolio and I would like to contribute to the project by providing a logo without commitment. Let me know if you want me to send you a proposal.

    Cheers!

    opened by Miguimonti 1
  • Some Dockerization changes

    Some Dockerization changes

    As mentioned in #10, this is some work I did which makes the container be a little more generic, so that I can run hostyoself in relay mode in a container, and also tweaks COPY in the Dockerfile so that things like editing the Dockerfile itself don't trigger a full reubild.

    And it's less a PR and more a "pull only if you want to" or "pick and choose individual things from this PR instead".

    -- Doug

    opened by dmuth 0
  •  main.go:4: running

    main.go:4: running "go-bindata": exec: "go-bindata": executable file not found in %PATH%

    Cloned the repo.

    Tried running

    go generate -v -x
    

    in a cmd window on Win 10 in the hostyoself directory.

    Got this response:

    ... go: finding github.com/jteeuwen/go-bindata/go-bindata latest go: downloading github.com/jteeuwen/go-bindata v3.0.7+incompatible go: extracting github.com/jteeuwen/go-bindata v3.0.7+incompatible github.com/jteeuwen/go-bindata github.com/jteeuwen/go-bindata/go-bindata go-bindata -pkg server -o pkg/server/assets.go templates/ static/ main.go:4: running "go-bindata": exec: "go-bindata": executable file not found in %PATH%

    opened by kwhitefoot 9
Releases(v1.0.0)
Shows your recent browser history in tree style. 树状展示浏览器历史 (For Edge / Chromium / Chrome)

Tree Style Histyle This extension shows your recent browser history in tree style. When you browser pages from internet, you always jump from one page

null 107 Nov 22, 2021
GoLang Library for Browser Capabilities Project

Browser Capabilities GoLang Project PHP has get_browser() function which tells what the user's browser is capable of. You can check original documenta

Maksim N. 39 Nov 13, 2021
An OBS overlay (browser source) for mumble

Mumble UI An attempt at creating an overlay that could be used inside of OBS to show who is speaking for the DAY[0] Podcast. It is meant to be reasona

DAY[0] 1 Nov 20, 2021
Purpose: dump slack messages, users and files using browser token and cookie.

Slack Dumper Purpose: dump slack messages, users and files using browser token and cookie. Typical usecase scenarios: You want to archive your private

Rustam 7 Nov 21, 2021
Alfred 4 workflow to easily search and launch bookmarks from the Brave Browser

Alfred Brave Browser Bookmarks A simple and fast workflow for searching and launching Brave Browser bookmarks. Why this workflow? No python dependency

Josh Newman 1 Nov 1, 2021
GoLang Library for Browser Capabilities Project

Browser Capabilities GoLang Project PHP has get_browser() function which tells what the user's browser is capable of. You can check original documenta

Star Inc. 0 Nov 23, 2021
Enable your Golang applications to self update with S3

s3update Enable your Golang applications to self update with S3. Requires Go 1.8+ This package enables our internal tools to be updated when new commi

Heetch 104 Jun 22, 2021
Embedded, self-hosted swagger-ui for go servers

swaggerui Embedded, self-hosted Swagger Ui for go servers This module provides swaggerui.Handler, which you can use to serve an embedded copy of Swagg

Andy Walker 24 Nov 16, 2021
Universal code search (self-hosted)

Sourcegraph OSS edition is a fast, open-source, fully-featured code search and navigation engine. Enterprise editions are available. Features Fast glo

Sourcegraph 5.4k Dec 6, 2021
Self hosted search engine for data leaks and password dumps

Self hosted search engine for data leaks and password dumps. Upload and parse multiple files, then quickly search through all stored items with the power of Elasticsearch.

Davide Pataracchia 22 Aug 2, 2021
A framework for constructing self-spreading binaries

A framework that aids in creation of self-spreading software Requirements go get -u github.com/redcode-labs/Coldfire go get -u github.com/yelinaung/go

Red Code Labs 844 Nov 26, 2021
James is your butler and helps you to create, build, debug, test and run your Go projects

go-james James is your butler and helps you to create, build, debug, test and run your Go projects. When you often create new apps using Go, it quickl

Pieter Claerhout 45 Oct 26, 2021
An easy way to add useful startup banners into your Go applications

Try browsing the code on Sourcegraph! Banner Add beautiful banners into your Go applications Table of Contents Motivation Usage API Command line flags

Claudemiro 363 Nov 17, 2021
:mailbox_closed: Your own local SMS gateway in Go

gosms Your own local SMS gateway What's the use ? Can be used to send SMS, where you don't have access to internet or cannot use Web SMS gateways or w

null 1.4k Nov 30, 2021
:guardsman: A teeny tiny and somewhat opinionated generator for your next golang project

A Yeoman Golang Generator We are very sorry Gophers, but other names for the generator where taken, so we choose go-lang. But we have gocreate as an a

Axel Springer SE 23 Feb 20, 2021
GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way to say thanks to the maintainers of the modules you use and the contributors of Go itself.

Give thanks (in the form of a GitHub ★) to your fellow Go modules maintainers. About GoThanks performs the following operations Sends a star to Go's r

psampaz 107 Nov 25, 2021
Automatically generate Go test boilerplate from your source code.

gotests gotests makes writing Go tests easy. It's a Golang commandline tool that generates table driven tests based on its target source files' functi

Charles Weill 3.6k Dec 7, 2021
Yubigo is a Yubikey client API library that provides an easy way to integrate the Yubico Yubikey into your existing Go-based user authentication infrastructure.

yubigo Yubigo is a Yubikey client API library that provides an easy way to integrate the Yubikey into any Go application. Installation Installation is

Geert-Johan Riemer 117 Nov 17, 2021
An HTTP service for customizing import path of your Go packages.

Go Packages A self-host HTTP service that allow customizing your Go package import paths. Features Reports. Badges. I18N. Preview I launch up a free H

Razon Yang 18 Nov 18, 2021