urbit/README.md

233 lines
7.1 KiB
Markdown
Raw Normal View History

2015-10-20 21:40:29 +03:00
Urbit
2013-09-29 00:21:18 +04:00
=====
2015-10-20 21:40:29 +03:00
Urbit is a clean-slate system software stack defined as a
deterministic computer. An encrypted P2P network, `%ames`, runs on a
functional operating system, Arvo, written in a strict, typed
functional language, Hoon, which compiles itself to a combinator
interpreter, Nock, whose spec gzips to 340 bytes.
2014-06-10 01:56:56 +04:00
2015-10-20 21:40:29 +03:00
What is this for? Most directly, Urbit is designed as a personal
cloud server for self-hosted web apps. It also uses HTTP APIs to
manage data stuck in traditional web applications.
2015-09-23 00:04:11 +03:00
2015-10-20 21:40:29 +03:00
More broadly, Urbit's network tackles identity and security problems
which the Internet can't easily address. Programming for a
deterministic single-level store is also a different experience from
Unix programming, regardless of language.
2015-06-17 04:27:28 +03:00
2015-10-20 21:40:29 +03:00
Getting involved
----------------
If you're interested in following Urbit, you can:
- Read our documentation at [urbit.org](http://urbit.org/docs)
- Subscribe to our newsletter at [urbit.org](http://urbit.org).
- Check out the
2015-06-17 04:27:28 +03:00
[urbit-dev](https://groups.google.com/forum/#!forum/urbit-dev)
mailing list.
- Follow [@urbit_](https://twitter.com/urbit\_) on Twitter.
2016-03-03 22:52:42 +03:00
- Email us: [`urbit@urbit.org`](mailto:urbit@urbit.org). We're happy to answer questions and chat.
2013-09-29 00:21:18 +04:00
2015-10-20 21:40:29 +03:00
Code of conduct
---------------
2014-12-19 22:09:07 +03:00
2015-10-20 21:40:29 +03:00
Everyone involved in the Urbit project needs to understand and
respect our code of conduct, which is: "don't be rude."
2013-09-29 07:16:11 +04:00
2015-10-20 21:46:25 +03:00
Install
=======
2015-10-20 21:40:29 +03:00
Urbit can be installed on most Unix systems. There is no Windows
port. Windows is a wonderful OS, we just haven't gotten to it yet.
Use a VM.
2015-11-17 06:29:27 +03:00
Configure swap if needed
------------------------
Urbit wants to map 2GB of memory when it boots up. We won't
necessarily use all this memory, we just want to see it. On a
normal modern PC or Mac, this is not an issue. On some small
cloud virtual machines (Amazon or Digital Ocean), the default
memory configuration is smaller than this, and you need to
manually configure a swapfile.
2016-03-03 22:52:42 +03:00
To add swap to a DO droplet, [read this](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04). To add swap on an Amazon instance, [read this](http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance)
2015-11-17 06:29:27 +03:00
Don't spend a lot of time tweaking these settings; the simplest
thing is fine.
2015-10-20 21:40:29 +03:00
Install as a package
--------------------
2016-03-03 22:52:42 +03:00
<!--
waiting on makefile changes.
2015-10-20 21:40:29 +03:00
### OS X - Homebrew
2016-03-03 22:52:42 +03:00
brew install --HEAD homebrew/head-only/urbit
-->
2015-10-20 21:40:29 +03:00
### Ubuntu or Debian
Third-party packages are available, at:
https://github.com/yebyen/urbit-deb
2015-10-20 21:44:53 +03:00
Urbit is only supported on Jessie onward (but outbound HTTPS requests only work on Stretch; I wish we knew why; help us!)
2015-10-20 21:40:29 +03:00
Hand-build from source
----------------------
First, install all external dependencies. Then, make.
### Dependencies
2015-10-06 00:01:41 +03:00
2015-06-17 04:27:28 +03:00
urbit depends on:
2014-06-10 01:56:56 +04:00
2015-10-20 21:40:29 +03:00
gcc (or clang)
2014-06-10 01:56:56 +04:00
gmp
libsigsegv
openssl
2014-08-26 21:31:38 +04:00
automake
autoconf
2014-12-06 00:55:27 +03:00
ragel
cmake
2014-12-06 00:55:27 +03:00
re2c
2014-08-26 21:31:38 +04:00
libtool
2014-06-10 01:56:56 +04:00
libssl-dev (Linux only)
ncurses (Linux only)
2015-06-17 04:25:32 +03:00
#### Ubuntu or Debian
2014-06-10 01:56:56 +04:00
2014-12-06 00:55:27 +03:00
sudo apt-get install libgmp3-dev libsigsegv-dev openssl libssl-dev libncurses5-dev git make exuberant-ctags automake autoconf libtool g++ ragel cmake re2c
2014-06-10 01:56:56 +04:00
2015-07-14 21:46:58 +03:00
#### Fedora
2014-06-10 01:56:56 +04:00
sudo dnf install gcc gcc-c++ git gmp-devel openssl-devel openssl ncurses-devel libsigsegv-devel ctags automake autoconf libtool ragel cmake re2c
2014-06-10 01:56:56 +04:00
2015-06-17 04:25:32 +03:00
#### AWS
2014-06-10 01:56:56 +04:00
2015-06-17 21:34:25 +03:00
sudo yum --enablerepo epel install gcc gcc-c++ git gmp-devel openssl-devel ncurses-devel libsigsegv-devel ctags automake autoconf libtool cmake re2c
2014-06-10 01:56:56 +04:00
2015-06-17 04:27:28 +03:00
#### OS X - Homebrew
2014-06-10 01:56:56 +04:00
2015-06-17 04:56:58 +03:00
brew install git gmp libsigsegv openssl libtool autoconf automake cmake
2014-06-10 01:56:56 +04:00
2015-06-17 04:27:28 +03:00
#### OS X - Macports
2014-06-10 01:56:56 +04:00
2015-06-17 04:27:28 +03:00
sudo port install git gmp libsigsegv openssl autoconf automake cmake
Although `automake`/`autoconf`/`libtool` are generally installed by
default, some have reported needing to uninstall and reinstall those
three packages, at least with Homebrew. Your mileage may vary.
2014-06-10 01:56:56 +04:00
2015-06-19 06:52:38 +03:00
#### FreeBSD
pkg install git gmake gmp libsigsegv openssl automake autoconf ragel cmake re2c libtool
2015-06-19 06:52:38 +03:00
2015-10-20 21:40:29 +03:00
### Download and make
2014-08-26 21:31:38 +04:00
2015-06-17 04:27:28 +03:00
Clone the repo:
2014-06-10 01:56:56 +04:00
git clone https://github.com/urbit/urbit.git
2014-06-10 01:56:56 +04:00
2015-06-17 04:27:28 +03:00
`cd` to the directory you just created:
2014-06-10 01:56:56 +04:00
cd urbit
2015-10-20 21:40:29 +03:00
Run `make`:
2014-06-10 01:56:56 +04:00
2015-06-17 04:27:28 +03:00
make
2014-06-10 01:56:56 +04:00
2015-06-19 06:52:38 +03:00
(On FreeBSD, use `gmake` instead.)
The executable is `bin/urbit`.
Fetch the latest bootstrapping pill:
curl -o urbit.pill http://bootstrap.urbit.org/latest.pill
You can use your preferred way to fetch things from the web here.
Urbit looks for a pill named `urbit.pill` in the current directory
by default, so if you have anything different, you'll need to tell
Urbit where it is (on first launch only) with the `-B` command-line
option.
2014-06-10 01:56:56 +04:00
2016-03-03 22:52:42 +03:00
Start
=====
2015-10-06 00:01:41 +03:00
2015-10-20 21:40:29 +03:00
An urbit is a persistent server on the `%ames` P2P network. You'll
create one of these servers now.
2014-06-10 01:56:56 +04:00
2015-10-20 21:40:29 +03:00
If you have an invitation, it's a planet like `~fintud-macrep` and a
ticket like `~fortyv-tombyt-tabsen-sonres`. Run
2014-06-10 01:56:56 +04:00
2015-10-20 21:40:29 +03:00
urbit -w fintud-macrep -t fortyv-tombyt-tabsen-sonres
2014-06-10 01:56:56 +04:00
2015-10-20 21:40:29 +03:00
(You can leave the `~` on, but it annoys some Unix shells.)
2015-10-06 00:01:41 +03:00
2015-10-20 21:40:29 +03:00
If you don't have an invitation, pick a nickname for your comet, like
`mycomet`. Urbit will randomly generate a 128-bit plot:
2015-09-25 02:34:01 +03:00
2015-10-20 21:40:29 +03:00
urbit -c mycomet
2014-06-10 01:56:56 +04:00
2015-10-20 21:40:29 +03:00
Either way, creating your urbit will take some time. Some of this
time involves creating keys; some of it involves downloading code
over Urbit itself. Go get a cup of coffee. Or a beer.
2014-06-10 01:56:56 +04:00
2015-10-20 21:43:56 +03:00
Wait until you see a prompt, something like
2014-06-10 01:56:56 +04:00
~fintud-macrep:dojo>
2014-06-10 01:56:56 +04:00
2015-10-20 21:40:29 +03:00
Your urbit is launched! Ladies and gentlemen, we are floating in
2016-03-04 00:27:05 +03:00
space.
In either case you'll notice that we created a directory in unix called either `mycomet` or `fintud-macrep`. All of your state (a log and checkpoint) lives in that directory. You can move it around, but don't delete it!
2015-09-25 02:34:01 +03:00
2016-03-03 22:52:42 +03:00
### Restarting
2016-03-03 22:52:42 +03:00
If you want to shut your Urbit down you can `^d` from the `dojo>` prompt. To use Urbit normally after creating your planet or comet there's no need for the `-w -t` or `-c` options.
Instead:
urbit fintud-macrep
or
urbit mycomet
2016-03-04 00:27:05 +03:00
### Continuity breaches / network reboots
Urbit is still young, and we reboot the network from time to time. Urbit can upgrade itself over the air, but at this stage it's easier to bring in breaking api changes this way. Since our crypto is stateful we call this a 'continuity breach'.
If you have files in your Urbit you'd like to backup first make a copy of your pier. Then you'll need to shut down your urbit (with `^d`) and:
git pull origin master
make clean; make
curl -o urbit.pill http://bootstrap.urbit.org/latest.pill
Then start over at the top of this section.
2016-03-03 22:52:42 +03:00
Talk
2015-10-20 21:46:25 +03:00
====
2014-06-10 01:56:56 +04:00
2016-03-03 22:52:42 +03:00
We use Urbit to talk to each other and coordinate about building the system. To join the main Urbit talk station use `^x` to switch to the `talk()` prompt, then run:
2014-06-10 01:56:56 +04:00
2016-03-03 22:52:42 +03:00
;join ~doznec/urbit-meta
2014-06-10 01:56:56 +04:00
2016-03-03 22:52:42 +03:00
Learn more
==========
2014-06-10 01:56:56 +04:00
2016-03-03 22:52:42 +03:00
Urbit's own official planet `~winsen-pagdel` hosts the public docs
[here](http://urbit.org/docs). The docs also live in their own repo, [`urbit/docs`](http://github.com/urbit/docs).
2014-06-10 01:56:56 +04:00
2016-03-03 22:52:42 +03:00
If this is your first time using Urbit, we'd recommend starting [here](http://urbit.org/docs/user/basic#-basic-operation).
2013-09-29 00:21:18 +04:00
2015-06-17 04:27:28 +03:00
Contributing
2015-10-20 21:40:29 +03:00
============
2013-09-29 00:21:18 +04:00
2015-10-06 00:01:41 +03:00
The first step in contributing to urbit is to come and join us on
`:talk`.
2015-09-02 21:32:15 +03:00
2015-10-06 00:01:41 +03:00
For more detailed instructions check out
[`CONTRIBUTING.md`](https://github.com/urbit/urbit/blob/master/CONTRIBUTING.md).