Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self Hosted Server? #2

Closed
adamgoose opened this issue Jul 11, 2017 · 18 comments
Closed

Self Hosted Server? #2

adamgoose opened this issue Jul 11, 2017 · 18 comments
Labels

Comments

@adamgoose
Copy link

I'd love to use this tool internally, but we won't be able to use the hosted solution. Is your server source code open-sourced?

@anishathalye
Copy link
Owner

anishathalye commented Jul 11, 2017

The server code is not open-source, at least as of now.

There will be client-side encryption eventually, probably in the next release, so that may make it okay for your use case.

Also, there are similar tools that are open-source that are meant to be self-hosted, e.g. http://rtail.org/

@ghost
Copy link

ghost commented Jul 19, 2017

+1 would love to see something we can host internally. Open source ideally, but something containerized or that can be installed on a server would work too.

erik added a commit to erik/hermit that referenced this issue Jul 25, 2017
@miguelmota
Copy link

miguelmota commented Aug 28, 2017

+1 for rtail

Here's also something very similar and open source: streamhut (disclosure: I'm the author)

@ssbarnea
Copy link

@anishathalye Any chance of open-sourcing seashells? I can bet that you will not get rich making it into a business but at least you could get some fame by making the server open-source.

Otherwise I am afraid that there is a high chance that this would join the other pile of abandonware solutions.

@berkant
Copy link

berkant commented Jan 24, 2019

I agree with @ssbarnea. It would be awesome to see Seashells open-sourced.

@anishathalye
Copy link
Owner

It's on the to-do list, now. There is some cleanup that needs to be done with the server-side code before release. And documentation needed too.

@anishathalye anishathalye reopened this Jan 24, 2019
@ssbarnea
Copy link

@anishathalye You got yourself a supporter before you ever released the code!

Don't worry too much about code style stuff, it can be fixed later. I will be happy to help especially in areas like CI (Travis, alike), packaging as container (best way to distribute it).

I do even have few cool features in mind, like server discovery based on your local DNS so you would not be forced to have a config file (or environment variable) that would tell it where to upload to.

@ssbarnea
Copy link

ssbarnea commented Feb 5, 2019

I hope that the open-source license would be a liberal one which would allow it to be reused in other projects, like Apache. I am asking this because I already have in mind potential use on project like https://www.zuul-ci.org/

@anishathalye
Copy link
Owner

I was thinking AGPL (which I generally use for web-apps, e.g. see Gavel).

@berkant
Copy link

berkant commented Apr 19, 2019

Any updates on this?

@ssbarnea
Copy link

I do not have any plans to start a hosting project and to build a business around sharing console outputs. I also doubt anyone sane woudl desire the same as they are unlikely to ever reach a profit.

For these reasons I am inclined to look from a different perspective: avoid using any lincense that could deter others from using the library/tool, regardless their intentions (even including in commercial products). I seen too much s*** around these days around free-software no longer be free (mongo,...) and for this reason I would personally avoid using controversial licensing, ones that are incompatible with others because my aim was to make my code freely available to anyone. Wikipedia states the AGPL is incompatible even with GPL,... so maybe is not ideal. Probably LGPL,MPL,Apache,BSD being more relaxed.

Meanwhile I should order a second candle for the upcoming birthday of this ticket.

@miguelmota
Copy link

miguelmota commented Apr 19, 2019

It's simple enough to create your own gotty/seashells clone.

Install websocat:

$ brew install websocat

In terminal 1: Start a websocket server to receive piped data:

$ websocat -t ws-l:127.0.0.1:9000 broadcast:mirror:

In terminal 2: pipe your terminal to the websocket:

$ exec > >(tee >(websocat -n ws://127.0.0.1:9000/)) 2>&1

Here's the HTML page with the websocket listener. Serve this page up and you'll see your terminal output being streamed:

<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="UTF-8">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.12.2/xterm.css" rel="stylesheet" />
  </head>
  <div id="terminal"></div>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.12.2/xterm.js"></script>
  </body>
  <script>
    var term = new Terminal({
      convertEol: true,
      disableStdin: true,
      drawBoldTextInBrightColors: true,
    })
    term.open(document.getElementById('terminal'))
    var mySocket = new WebSocket ('ws://localhost:9000/')
    mySocket.onopen = event => console.log('open')
    mySocket.onmessage = event => term.write(event.data)
    mySocket.onclose = event => console.log('close')
  </script>
</body>
</html>

Instead of websocat, you can do the same with your favorite programming language and store the streamed data for persistency where on each connection you respond with the stored data. You can also generate a random id for each connection request and map them to a path.


Alternatively, you can also use streamhut which is similar to seashells

@ssbarnea
Copy link

@miguelmota Your last stetement if far from true. Streamhut stream a terminal, is has not support for uploading console log to a web server where it can be accessed by anyone at a later time. Only solutions that generate an unique URL when you start would be able to do that.

@miguelmota
Copy link

@ssbarnea ?

exec > >(nc stream.ht 1337) 2>&1

streamhut_demo_1 (1)

@ssbarnea
Copy link

@miguelmota ok, so I can share a terminal. Still, I am unable to figure out how to share only the console output from a command as "live log", not the terminal itself. The terminal itself is useful only for some TUI apps, but user cannot really scroll it as a web page.

@miguelmota
Copy link

miguelmota commented Jul 23, 2019

@ssbarnea I see, so like:

tail -F file.log | nc stream.ht 1337

Btw here's a gist I put together containing a [wip] table comparison of all web-based terminal sharing applications I could find.

@osmboy
Copy link

osmboy commented Aug 22, 2021

Hi guys, you may consider using gotty,choose your os release version ,unpack it, and cp to /usr/bin or /usr/local/bin
then perform the following operation:

mkcert <your server ip> # generate pem and key file for https
alias gow ="gotty -r -c 'user:password' -a <your server ip>--reconnect --max-connection 10000 --title-format <your title> --close-signal 1 --close-timeout 1 \
-t --tls-crt /path/to/<your server ip>.pem --tls-key /path/to/<your server ip>-key.pem" # you can put it in ~/.bashrc

now just use gow <your command> ,it will output http server listenning: http:///xxxx, just access it on browser,same results as seashell

@anishathalye
Copy link
Owner

Finally got around to doing this: https://github.com/anishathalye/seashells-server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants