forked from urbit/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetting-started.udon
More file actions
474 lines (344 loc) · 14.1 KB
/
getting-started.udon
File metadata and controls
474 lines (344 loc) · 14.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
:- :~ navhome/'/docs/'
next/'true'
sort/'1'
title/'Getting Started'
==
;>
# Getting Started
This guide is broken into five parts:
+ [Acquiring an Urbit Identity](#acquire)
+ [Using Bridge](#bridge)
+ [Installing Arvo](#arvo)
+ [Booting Your Ship](#boot)
+ [Basic Operations](#operation)
_If you just want to install the Urbit OS, Arvo, and don't need to be on the
Urbit network, you can skip to [Installing Arvo](#arvo)._
;=
;h2
;div(id "acquire"): Acquiring an Urbit Identity
==
==
Urbit's identity layer, called Azimuth, is a suite of contracts on the Ethereum
blockchain. An Azimuth address, called a *point*, functions as an identity and
a network address for Arvo, the Urbit OS. An instance of Arvo is called a
*ship*. A ship can't use the Arvo network until it's combined with a point.
Throughout this guide, we'll refer to \"Urbit identities\" and \"points\"
interchangeably.
Points are generally not freely available, so you will need to either
purchase one or get one from a friend. This guide assumes you have found a way
to acquire a point.
If you went through the address registration process and used [Wallet Generator](https://github.com/urbit/urbit-wallet-generator),
then you should have have received a .zip file that contains an Ethereum address
and cryptographic secrets in the form of a PDF.
Your ownership PDF contains two secrets that must be kept safe.
- *Master Ticket*: This is a master key that allows you to manage every aspect of
your address.
- *Ownership Seed BIP39 Mnemonic*: The master ticket encoded as a BIP39 mnemonic
for compatibility with most Ethereum wallet software, including our own *Bridge*
client.
;=
;h2
;div(id "bridge"): Using Bridge
==
==
Bridge is a client that we built for accessing and managing your Urbit identities.
Like Wallet Generator, Bridge is a web application that can also be run in offline mode.
It can be run in Firefox on all platforms, and also in Chrome if you're using
a Mac.
Importantly, Bridge also allows you to generate a keyfile that
you will need to boot your ship on the Arvo network for the first time. Once you boot a ship
with a keyfile, you can restart it later without the keyfile.
*Note* Bridge allows you to make _writes_ to the blockchain, but we ask you to confirm
anything that will incur a transaction cost. If you plan to do anything heavy-duty, make
sure your Ethereum address has some pocket ETH.
Download Bridge [here](https://github.com/urbit/bridge/releases) and follow
the instructions below.
#### Step 1: Welcome
Click `Unlock a Wallet`.
#### Step 2: Select a Network
On the dropdown menu, make sure that `Main Network` is selected. Then click
`Continue ->`.
#### Step 3: Unlock a Wallet
On this dropdown menu, choose how you'd like to access your Ethereum wallet.
If you aren't using a hardware wallet (we support Ledger and Trezor), you'll
want to use your Ethereum wallet's BIP39 Mnemonic.
If you used Wallet Generator to generate an HD wallet, you have a few choices:
you can choose `Urbit Master Ticket,` which is high-value, but allows you unfettered
permissions to update your point. The mnemonic associated with your management
seed is also useful to perform everyday operations (such as boot your ship!).
Select the appropriate option and click `Continue ->`.
If you already have a point -- for example, if you are trying to boot a ship
from a pre-Ethereum-era network -- you should see a list of points associated with your
keys. If you are trying to boot a planet for the first time, click on the
`Details` link for that point. At the bottom on the Details page, there is
a section called `Urbit Networking`. If the fields in this section are filled out, proceed to step 6.
If you do not yet have a point and are getting one sent to you, proceed to step 4.
#### Step 4: Accept Your Transfer
If you were sent a point by a friend, then you should see a graphic under
`Incoming Transfers`. Click the `Details ->` link under that graphic.
Now you'll be on the management page of your point. The transfer isn't completed
yet, so click `Accept incoming transfer`. Then check both boxes and and click
their associated `Sign Transaction` and `Send Transaction` buttons.
If you already own a point, then click on the `Details ->` under your sigil in the
`Your Points` section.
#### Step 5: Set Your Networking Keys
If you just accepted a point, you'll be returned to your point screen. Notice that
that links and buttons are now clickable. You now own this point!
Click the link that says `Set Urbit networking keys`. Bridge will let you either
download a keyfile derived from your networking keys are you can paste in your own
network seed and derive a new keyfile. See our
[HD Wallet Spec](https://github.com/urbit/proposals/blob/master/8.udon)
for more information.
It should be noted that this is an event on the Ethereum network and will cost
a trivial, but non-zero, amount of [gas](https://github.com/ethereum/wiki/wiki/Design-Rationale#gas-and-fees) to complete.
#### Step 6: Generate Your Keyfile
From the detail page associated with your point, click the `Generate Arvo Keyfile`
button and you'll be taken to a page with a field titled `Network seed`. If you went
through the address registration process, this should be filled in already.
Click `Generate ->`, which will download a keyfile onto your machine.
With that keyfile in hand, you can now exit Bridge.
;=
;h2
;div(id "arvo"): Installing Arvo
==
==
Now you're ready to run Arvo. You're almost there!
But first, some terminology:
- `vere` or `urbit`: the interpreter that runs when you run a command like `urbit` or `/bin/urbit` in your command line
- `arvo`: the deterministic OS that lives in a directory whose name matches your Azimuth point, ie `~famreb-todmec` lives in `/famreb-todmec`
Arvo runs nicely on a Unix-like operating system -- Ubuntu,
Fedora, macOS, and FreeBSD, for example. If you're using Windows, you'll need
to get one of the aforementioned systems. Don't worry: most of them are free.
We have different installation instructions for different platforms. To install
and run Arvo, run the commands that are listed for your operating system.
On any platform, you can check your Arvo installation by running the `urbit`
command. Installation was successful if you get a block of output that begins
with the line below:
```
Urbit: a personal server operating function
```
### Dependencies
Urbit depends on:
```
C compiler (gcc or clang)
curses
git
gmp
libcurl
libsigsegv
libuv
meson
ninja
openssl
pkg-config
python2
zlib
```
### Instructions
#### MacOS
We recommend using the Homebrew package manager to run Arvo on MacOS.
```
# Bash
brew update
brew install gcc git gmp libsigsegv libtool meson ninja pkg-config python2 openssl
git clone https://github.com/urbit/urbit
cd urbit
./scripts/bootstrap
./scripts/build
sudo ninja -C ./build/ meson-install
urbit
```
#### Ubuntu or Debian
```
# Bash
sudo apt-get update
sudo apt-get install g++ git libcurl4-gnutls-dev libgmp3-dev libncurses5-dev libsigsegv-dev libssl-dev make openssl pkg-config python python3 python3-pip zlib1g-dev ninja-build
sudo -H pip3 install --upgrade pip
sudo -H pip3 install meson==0.29
git clone https://github.com/urbit/urbit
cd urbit
./scripts/bootstrap
./scripts/build
sudo ninja -C ./build/ install
urbit
```
#### Fedora
```
# Bash
sudo yum upgrade
sudo yum install autoconf automake cmake ctags gcc gcc-c++ git gmp-devel libcurl-devel libsigsegv-devel libtool ncurses-devel ninja-build openssl openssl-devel pkgconfig python2 python3 ragel re2c wget
# meson requires python 3.5; RHEL supplies wrong version
pushd /usr/src
sudo wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tgz
sudo tar xzf Python-3.5.5.tgz
cd Python-3.5.5
sudo ./configure --enable--optimizations
sudo make altinstall
which python3.5
cd /usr/local/bin
sudo ln -s python3.5 python3
hash python3
popd
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo /usr/local/bin/python3 get-pip.py
# downgrade meson to avoid dependencies that redhat can't meet
sudo -H /usr/local/bin/pip3 install meson==0.29
git clone git://github.com/ninja-build/ninja.git && cd ninja
git checkout release
./configure.py --boostrap
sudo cp ./ninja /usr/local/bin
git clone https://github.com/urbit/urbit
cd urbit
./scripts/bootstrap
./scripts/build
sudo /usr/local/bin/ninja -C ./build/ install
urbit
```
#### Arch Linux
```
# Bash
sudo pacman -Syu
sudo pacman -S curl gcc git gmp libsigsegv ncurses ninja openssl python
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py
git clone https://github.com/urbit/urbit
cd urbit
./scripts/bootstrap
./scripts/build
sudo ninja -C ./build/ meson-install
urbit
```
##### FreeBSD
```
# Bash or Sh
pkg upgrade
sudo pkg install curl gcc git gmake gmp libsigsegv python python3 ncurses openssl gmp
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py
sudo -H pip install --upgrade pip
sudo -H pip install meson
sudo pkg install ninja
git clone https://github.com/urbit/urbit
cd urbit
sh ./scripts/bootstrap
sh ./scripts/build
sudo ninja -C ./build/ meson-install
urbit
```
##### Amazon Web Services
```
# Bash
sudo yum update
sudo yum install gcc gcc-c++ git gmp-devel libcurl-devel libsigsegv-devel ncurses-devel openssl openssl-devel pkgconfig python2 python3 python3-pip wget git
sudo env "PATH=$PATH" pip3 install --upgrade pip
sudo env "PATH=$PATH" pip3 install meson
# we need libsigsegv
#
wget http://dl.fedoraproject.org/pub/fedora/linux/releases/25/Everything/x86_64/os/Packages/l/libsigsegv-2.10-10.fc24.x86_64.rpm
wget http://dl.fedoraproject.org/pub/fedora/linux/releases/25/Everything/x86_64/os/Packages/l/libsigsegv-devel-2.10-10.fc24.x86_64.rpm
sudo yum localinstall libsigsegv-2.10-10.fc24.x86_64.rpm
sudo yum localinstall libsigsegv-devel-2.10-10.fc24.x86_64.rpm
git clone git://github.com/ninja-build/ninja.git
pushd ninja
git checkout release
./configure.py --bootstrap
sudo cp ./ninja /usr/local/bin
popd
git clone https://github.com/urbit/urbit
cd urbit
./scripts/bootstrap
./scripts/build
sudo env "PATH=$PATH" ninja -C ./build/ install
urbit
```
### Using a Fake Ship
Perhaps you want to boot a ship without an identity. We recommend doing that
for development purposes, or if you just want to play around with an
un-networked ship without getting a point. You can now use
the command of the scheme below to boot a fake `~zod`.
```
urbit -F zod
```
If you want to get on the Arvo network with your point, then continue to the
next section.
;=
;h3
;div(id "swap"): Set Up Swap
==
==
If you're running Urbit in the cloud on a small instance, you may need to additionally configure swap space. If you're not, skip this section.
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, or on a large cloud virtual machine, 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.
Digital Ocean has a post on adding swap [here](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04). For Amazon there’s a StackOverflow thread [here](https://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance).
Don’t spend a lot of time tweaking these settings; the simplest thing is fine.
;=
;h2
;div(id "boot"): Booting Your Ship
==
==
Now the rubber meets the road. You'll be booting your ship with the keyfile
that you downloaded from Bridge.
#### Step 1: Find Your Point's Name
This will look something like `~lodleb-ritrul`. You can see the name of your
point(s) when you log into your wallet using the Bridge client.
;img@"http://media.urbit.org/site/bridge-0.png"(width "100%");
#### Step 2: Find the path to your keyfile
Find the absolute path to the keyfile that you downloaded from Bridge. Copy it.
#### Step 3: Run the boot command
Type `cd` in your terminal to return to your home directory. If you want to
store your ship somewhere besides your home directory, change the terminal's
working directory to the desired directory.
Run the command below, except with `~sample-planet` replaced by the name of your
Urbit identity, and `path/to/my-planet.key` replaced with the path to your
keyfile:
```
urbit -w ~sample-planet -k path/to/my-planet.key
```
Or, if you'd prefer to copy your key in, you can run:
```
urbit -w ~sample-planet -G rAnDoMkEy
```
Either command will create a directory called `sample-planet/` and begin
building your ship. It may take a few minutes.
When your ship is finished booting, you will see the `~sample-planet:dojo>`
prompt. At that point, you should permanently erase your keyfile from your
machine.
;=
;h2
;div(id "operation"): Basic Operations
==
==
Welcome to your urbit! There's a few things you should do to become oriented.
#### Dojo
Let's try out the Dojo, the Arvo command line and Hoon REPL:
```
~sample-planet:dojo> (add 2 2)
```
Should produce:
```
> (add 2 2)
4
```
Good.
#### Mounting
Clay, the Arvo filesystem, isn't mounted to Unix by default. Switch to the Dojo
prompt and run:
```
~sample-planet:dojo> |mount %
```
This should produce:
```
> |mount %
>=
```
which indicates that the command was processed.
`|mount %` will cause a `home/` directory to appear inside your _pier_ folder in
Unix (the "pier" is our shorthand for the directory whose name corresponds to your Azimuth point). Changes to these files are automatically synced into your ship.
#### Landscape
Landscape is web app we built for chatting and making posts. We are using Landscape to run a few experimental "cities" -- private discussion communities -- as a closed beta of sorts. If you have an Azimuth point, you’ll need to [email us](mailto:support@urbit.org) a request to gain access to one of these cities.
Once you're in a channel, you can also interact with it from the command line, if you so wish. Use `ctrl-x` in your ship's terminal window to toggle between the Dojo and the Talk prompts.
#### Shutting Down and Restarting
You can turn your ship off with `ctrl-d` from the Talk or Dojo prompts.
To restart your ship, simply pass the name of your pier:
```
$ urbit some-planet
```