Robert Cudmore    archive    tags    search    software

particle cloud server

This is not working … as of 12/3/2015 I will just wait for the particle people to update the particle-server with better support for the photon (it is really designed for the particle.

The paticle photon is a great little wifi enabled arduino. The only problem I have is that all read/write using its REST API requires internet acces to a account. To get around this, you can run a particle cloud server locally.

I am doing all of this on a Debian Jessie server.

install git

sudo apt-get install git

install nodejs (use su to enter su/root)


curl -sL | bash -
apt-get install -y nodejs

Install particle cli


sudo npm install -g particle-cli

Install particle cloud server


git clone
cd spark-server
npm install
node main.js

‘node main.js’ produced

No users exist, you should create some users!
connect.multipart() will be removed in connect 3.0
visit for alternatives
connect.limit() will be removed in connect 3.0
Starting server, listening on 8080
static class init!
core keys directory didn't exist, creating... /home/cudmore/spark-server/core_keys
Creating NEW server key
Loading server key from default_key.pem
set server key
server public key is:  -----BEGIN PUBLIC KEY-----
-----END PUBLIC KEY-----

Your server IP address is:
server started { host: 'localhost', port: 5683 }

Continue setting up particle server

Install dfu-utils

	# git clone git://
	sudo apt-get build-dep dfu-util
	sudo apt-get install libusb-1.0-0-dev

But that did not work so i did

sudo apt-get upgrade dfu-util

This updated a boat load of things including jre and owncloud (leaving it in maintenance mode). To turn owncloud maintenance mode off, follow this and edit /var/www/owncloud/config/config.php and set ‘maintenance’ => false,’. The next time I logged into my owncloud server it triggered an update to 8.2.1

Try again with particle photon plugged in via usb

Still following:

particle keys server


cudmore@debian:~/spark-server$ sudo particle keys server
running dfu-util -l
Found DFU device 2b04:d006
checking file  default_key.pub192_168_1_200.der
spawning dfu-util -d 2b04:d006 -a 1 -i 0 -s 2082 -D default_key.pub192_168_1_200.der
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting # 1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash   "
Downloading to address = 0x00000822, size = 1024
Download	[=========================] 100%         1024 bytes
Download done.
File downloaded successfully
Okay!  New keys in place, your device will not restart.
Tags: osx, linux, arduino

©2018. Robert Cudmore.