A tiny, self-contained communication tool that doesn't require any internets
This was originally created to support the Occupy Wall Street protest in New York City. The motivation behind ows.offline is that the web offers a fantastic array of communication tools, but often the conversation suffers from certain trade-offs as the number of participants rises. Proximity could be a useful filter for those with the greatest need for better communication tools. The forum is an attempt to complement the existing deliberative process of the NYC General Assembly and offer its constituents a text-based forum to hash out their ideas with greater subtlety.
This forum software was designed for the Linksys WRT54GL router running OpenWRT Linux and uhttpd. But I've also successfully run it on Mac OS X and Debian/Ubuntu with thttpd.
- Get a root shell:
sudo -i
- Install Lua and Luarocks:
apt-get install lua luarocks
- Install LuaFileSystem:
luarocks install lfs
- Install dependencies: Lua + LuaFileSystem
- Unpack the zip file in a public web folder
- Copy
forum.cgi.example
toforum.cgi
(or plainforum
, if your webserver doen't enforce extensions for CGIs) - Move
forum.cgi
to your webserver's CGI directory (e.g./www/cgi-bin
) - Modify the configuration settings in
forum.cgi
:- Set your location name and coordinates (for future p2p functionality)
- Point
forum_base
to the forum's directory in the filesystem - Point
public_root
to the forum's URL as seen from the "web"
- Adjust file permissions if necessary:
- Base and subdirectories accessible (executable) and readable by the httpd user
data
directory writable by the httpd user- Some webservers don't like executable static files (css, javascript)
- Try it out in a browser by calling the CGI script!
These instructions assume that you're experienced with basic Unix tools like ssh, scp and vi.
- If you're running the default Linksys-provided OS, you'll first need to flash your router with the OpenWRT system image
- Download and scp the LuaFileSystem package to the router
(place the file in
/tmp
) - Install the package using:
opkg install /tmp/luafilesystem_1.5.0-1_brcm-2.4.ipk
- Use scp to put all the forum's files in
/www
on the router - Copy
forum.cgi.example
toforum.cgi
(you can also rename it to plainforum
, since uhttpd doesn't require a special file extension to execute CGIs) - Move
forum.cgi
to/www/cgi-bin
- Modify the configuration settings in
forum.cgi
:- Set your location name and coordinates (for future p2p functionality)
- Set the
forum_title
- Update
forum_base
to'/www/'
- Update
public_root
to'/'
- Try it out in a browser! (something like
http://192.168.1.1/cgi-bin/forum.cgi
)
There are a couple things you can do to modify your router to make it to help guide users to the right place.
- Edit
/www/index.html
to redirect to the forum URL (with the wildcard DNS below, you can choose a non-standard URL likehttp://ows.offline/cgi-bin/forum.cgi
)
It's a good idea to resolve all domains to 192.168.1.1
. This will make the router
behave as a kind of captive portal.
- Edit
/etc/dnsmasq.conf
and add the lineaddress=/#/192.168.1.1
- Restart the DNS daemon with
/etc/init.d/dnsmasq restart