p5.party sketches need to connect to a server in order to synchronize their data.
You don’t necessarily need to set up your own server. You can get started with p5.party using the p5.party example server. If you are new to p5.party take a look at connecting to the server before you consider setting up your own.
If you are running a class or want to ensure long term availability you can set up your own server pretty easily. You don't need to set up a server for each sketch, a single server can support many sketches at once. If you are teaching a class or running a workshop with p5.party, you can set up a single server ahead of time for everyone to share. If you are using p5.party on your own, you'll need to set up your own server.
<aside> 🧟 Currently, p5.party uses a deepstream server for the backend. Be aware that deepstream is in maintenance mode and may receive minimal updates moving forward. I'm unsure what this might mean for p5.party. It might mean that migrating to p5.party to another backend will be needed down the road. For now though, deepstream has proven to be a reliable, stable back end.
</aside>
The easiest way to set up your own server for p5.party is to fork the p5.party repo—which includes a preconfigured deepstream server—and use Heroku to host it. Heroku is a cloud platform that supports multiple languages and makes the process of deploying apps easier. With Heroku you don't need to set up your own server hardware or software, you can run an app in a software container right from a Github repo.
<aside> 🧟 Heroku is phased out their free hosting tier near the end of 2022. As of 2024, hosting on heroku is around $8/month
</aside>
To set up your own server follow the directions below. These directions assume you are somewhat familiar with Git and Github already.
New » Create New App
App name
You'll need to pick your own, unique name.App owner
field.Create app
.Deploy
tab for the project.
Github
as the Deployment method
Search
. You should see your fork in the resulting list.Connect
button next to your fork.Manual deploy
, verify that the master
branch is selected and then click Deploy Branch
.Open app
to open the server in the browser.
yourserver.herokuapp.com
—when you call partyConnect()
in your sketch.That's it! Hopefully your sketch is now working with your new server!