# Hosting A Processing.net server

**URL:** <https://discourse.processing.org/t/hosting-a-processing-net-server/5578>\
**Category:** Libraries\
**Created:** [November 16, 2018, 2:44am UTC](https://discourse.processing.org/t/hosting-a-processing-net-server/5578 "2018-11-16T02:44:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [November 16, 2018, 2:44am UTC](https://discourse.processing.org/t/hosting-a-processing-net-server/5578/1 "2018-11-16T02:44:34Z")

</div>

I have a program that uses [processing.net](http://processing.net) to send and receive data. I was wondering if there is a website where i could host this server for free. For the sake of example, I will use Shiffman’s basic chat server.  
Server: [http://learningprocessing.com/examples/chp19/example-19-01-simple-server](http://learningprocessing.com/examples/chp19/example-19-01-simple-server)  
Client: [http://learningprocessing.com/examples/chp19/example-19-02-simple-client](http://learningprocessing.com/examples/chp19/example-19-02-simple-client)

---

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [November 16, 2018, 1:05pm UTC](https://discourse.processing.org/t/hosting-a-processing-net-server/5578/2 "2018-11-16T13:05:54Z")

</div>

BUMP  
Meeting Character Minimum

---

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [November 16, 2018, 2:02pm UTC](https://discourse.processing.org/t/hosting-a-processing-net-server/5578/3 "2018-11-16T14:02:32Z")

</div>

Hi! Your question totally confused me, specially because of the first link you have there, which is a domain totally unrelated to the Processing project (I even thought this was spam) 🙂

What you want is actually to have a Processing program using the [networking](https://processing.org/reference/libraries/net/index.html) library running somewhere on a server, so you can connect to it from client Processing programs.

Finding a server where you can host Java programs for free is not trivial. Most servers run PHP, some servers run Nodejs, Ruby or Python. For small scale testing you might find a free Amazon AWS server that runs Java (not sure if that exists). But even if you found one, the program may need adjustments to run without a screen attached to the server.

I think a better approach would be to write a nodejs websockets server, and connect to it from Processing using a websockets library. That probably needs some learning and experimentation…

Maybe someone else can suggest a different approach?

---

<div class="post-metadata">

**Author:** ![Quillbert1](https://avatars.discourse-cdn.com/v4/letter/q/f475e1/32.png) [@Quillbert1](https://discourse.processing.org/u/Quillbert1)\
**Post date:** [November 16, 2018, 5:06pm UTC](https://discourse.processing.org/t/hosting-a-processing-net-server/5578/4 "2018-11-16T17:06:16Z")

</div>

Do you know how i would even begin to learn that?

---

<div class="post-metadata">

**Author:** ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)\
**Post date:** [November 17, 2018, 9:38am UTC](https://discourse.processing.org/t/hosting-a-processing-net-server/5578/5 "2018-11-17T09:38:02Z")

</div>

Step 1. I see there is a websockets library for Processing, with both server and client examples. You could start by switching from the networking library to the websockets library. Play a bit with it. So far it will be just local, in your computer.

Step 2. When you get that part, you can try switch to nodejs. If you’ve never done JavaScript, you will have to learn a bit. It’s not soo different from Processing/Java, but it is a different language. Try read watch/read simple tutorials for nodejs. Nodejs has a package manager called npm. It allows you to install packages, which is the equivalent to Processing libraries. You do that from the terminal with a simple command like

```
npm install somethingCool

```

That’s one reason nodejs is popular, because there are thousands of packages to do things. One of those packages is called [socket.io](http://socket.io) which makes it easy to do websockets. This is a tutorial for creating a simple chat with [socket.io](http://socket.io): [Get started | Socket.IO](https://socket.io/get-started/chat/)

So the idea is to replace the Processing websockets server (which runs only locally) with a nodejs websockets server, because that can be run on many servers online.

Ha! Looking for free nodejs servers you could use I found this list: [https://www.hostingadvice.com/blog/where-to-find-free-node-js-hosting/#free](https://www.hostingadvice.com/blog/where-to-find-free-node-js-hosting/#free) and they list 3 options that can run Java. So that can be a different approach to try, together with [Running without a Display · processing/processing Wiki · GitHub](https://github.com/processing/processing/wiki/Running-without-a-Display)

Learning about nodejs and sockets can be valuable, but I don’t know how much time and effort you can afford in this project 🙂

One more resource, this time using p5.js:

[![](https://img.youtube.com/vi/bjULmG8fqc8/hqdefault.jpg "12.1: Introduction to Node - WebSockets and p5.js Tutorial") ](https://www.youtube.com/watch?v=bjULmG8fqc8)
