on 82b1773 help sign in
urbit.org/docs/using/install.md
332 lines 9.5 kB history raw
1---
2navhome: /docs/
3navuptwo: true
4next: true
5sort: 1
6title: Install
7---
9# Install
11Installing Urbit is easy. It just takes a few minutes to get an
12instance up and running on the network.
14Urbit is designed to run on any Unix box with an internet connection.
15macOS, Ubuntu/Debian, FreeBSD, and Fedora all work well.
17If you run into trouble installing Urbit, please let us know via
18email, [questions@urbit.org](mailto:questions@urbit.org), or on the
19forum: [fora.urbit.org](https://fora.urbit.org). You can also chat
20with us at [urbit.org/stream](https://urbit.org/stream).
22> Urbit is alpha software. It’s not yet completely stable, its crypto
23> hasn’t been audited, and there are plenty of rough edges. Urbit is
24> lots of fun to play with, but not quite ready for your important or
25> sensitive data.
27## Build from source
29### Dependencies
31Urbit depends on:
33```
34autoconf
35automake
36C compiler (gcc or clang)
37cmake
38curses
39git
40gmp
41libcurl
42libsigsegv
43libtool
44libuv
45meson
46ninja
47openssl
48pkg-config
49python2
50ragel
51re2c
52```
54### Instructions
56First, you'll install the required dependencies to build Urbit from source. Then, you'll clone the Urbit source code, hosted on Github. Next, you'll bootstrap the Git submodules needed for the build. Lastly, you'll run a [Meson](https://github.com/mesonbuild/meson) build on the Urbit source to create your Urbit binary for your host operating system. Then, finally, you'll be able to boot your urbit.
58For your host OS platform and relevant package installer, run the respective Bash shell commands listed below in a fresh terminal window to get Urbit installed:
60> For those new to the command line, see:
62> - Mac: [Introduction to the Mac OS X Command Line](http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line)
63> - Linux: [An Introduction to the Linux Terminal](https://www.digitalocean.com/community/tutorials/an-introduction-to-the-linux-terminal)
65#### macOS
67##### Homebrew
69> [Homebrew installation guide](https://treehouse.github.io/installation-guides/mac/homebrew)
71```
72# Bash
74brew update
75brew install autoconf automake cmake gcc git gmp libsigsegv libtool meson ninja pkg-config python2 openssl re2c
76git clone https://github.com/urbit/urbit
77cd urbit
78./scripts/bootstrap
79./scripts/build
80sudo ninja -C ./build/ meson-install
81urbit
82```
84##### Macports
86```
87# Bash
89sudo port selfupdate
90sudo port install autoconf automake cmake gmp libsigsegv meson openssl
91git clone https://github.com/urbit/urbit
92cd urbit
93./scripts/bootstrap
94./scripts/build
95sudo ninja -C ./build/ meson-install
96urbit
97```
99#### Linux
101##### Linuxbrew
103> [Linuxbrew](http://linuxbrew.sh/)
105```
106# Bash
108brew update
109brew install autoconf automake cmake gcc git gmp libsigsegv libtool meson ninja pkg-config python2 openssl re2c
110git clone https://github.com/urbit/urbit
111cd urbit
112./scripts/bootstrap
113./scripts/build
114sudo env "PATH=$PATH" ninja -C ./build/ meson-install
115urbit
116```
118##### Ubuntu or Debian
120```
121# Bash
123sudo apt-get update
124sudo apt-get install autoconf automake cmake exuberant-ctags g++ git libcurl4-gnutls-dev libgmp3-dev libncurses5-dev libsigsegv-dev libssl-dev libtool make ninja-build openssl pkg-config python python3 python3-pip ragel re2c zlib1g-dev
125sudo -H pip3 install --upgrade pip
126sudo -H pip3 install meson
127git clone https://github.com/urbit/urbit
128cd urbit
129./scripts/bootstrap
130./scripts/build
131sudo ninja -C ./build/ install
132urbit
133```
135N.B. if the step `./scripts/build` fails when attempting to
136build libh2o, it could be caused by a bug in version 0.46 of meson (the bug
137is not present in 0.45 and is fixed in 0.47).
139If the command `meson -v` returns a version starting with 0.46, try these steps:
141```
142brew uninstall meson
143pip install meson=0.47.0
144rm -rf build
145build/scripts
146```
148If that is successful, resume the above instructions after the `build` step.
152##### Fedora / Redhat
154```
155# Bash
157sudo yum upgrade
158sudo 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
160# meson requires python 3.5; RHEL supplies wrong version
161pushd /usr/src
162 sudo wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tgz
163 sudo tar xzf Python-3.5.5.tgz
164 cd Python-3.5.5
165 sudo ./configure --enable--optimizations
166 sudo make altinstall
167 which python3.5
168 cd /usr/local/bin
169 sudo ln -s python3.5 python3
170 hash python3
171popd
173curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
174sudo /usr/local/bin/python3 get-pip.py
175# downgrade meson to avoid dependencies that redhat can't meet
176sudo /usr/local/bin/pip3 install meson==0.29
179git clone git://github.com/ninja-build/ninja.git && cd ninja
180git checkout release
181./configure.py --boostrap
182sudo cp ./ninja /usr/local/bin
184git clone https://github.com/urbit/urbit
185cd urbit
186./scripts/bootstrap
187./scripts/build
188sudo /usr/local/bin/ninja -C ./build/ meson-install
189urbit
191```
193(tested on Google Cloud Platform Red Hat Enterprise Linux 6.1 and 7.1 on 5 July 2018)
196##### FreeBSD
198```
199# Bash or Sh
201pkg upgrade
202sudo pkg install autoconf automake cmake curl gcc git gmake gmp libsigsegv libtool python python3 ragel re2c ncurses openssl gmp
203curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
204sudo python3 get-pip.py
205sudo -H pip install --upgrade pip
206sudo -H pip install meson
207sudo pkg install ninja
208git clone https://github.com/urbit/urbit
209cd urbit
210sh ./scripts/bootstrap
211sh ./scripts/build
212sudo ninja -C ./build/ meson-install
213urbit
214```
216(tested on Google Cloud Platform FreeBSD 10.4 and 11.2 on 4 July 2018)
218##### Arch
220```
221# Bash
223pacman -Syu
224pacman -S autoconf automake cmake curl gcc git gmp libsigsegv libtool ncurses ninja openssl python ragel re2c
225sudo -H pip3 install --upgrade pip
226sudo -H pip3 install meson
227git clone https://github.com/urbit/urbit
228cd urbit
229./scripts/bootstrap
230./scripts/build
231sudo ninja -C ./build/ meson-install
232urbit
233```
235##### AWS
237```
238# Bash
240sudo yum update
241sudo yum install --enablerepo epel autoconf automake cmake ctags gcc gcc-c++ git gmp-devel libcurl-devel libsigsegv-devel libtool meson ncurses-devel openssl-devel pkgconfig python re2c
242git clone https://github.com/urbit/urbit
243cd urbit
244./scripts/bootstrap
245./scripts/build
246sudo ninja -C ./build/ meson-install
247urbit
248```
250### Test for successful installation
252After running your installed `urbit` command, check to see if the following output was printed:
254```
255$ urbit
256Urbit: a personal server operating function
257https://urbit.org
258Version 0.5.1
260Usage: urbit [options...] ship_name
261where ship_name is a @p phonetic representation of an urbit address
262without the leading '~', and options is some subset of the following:
264-A dir Use dir for initial galaxy sync
265-b Batch create
266-B pill Bootstrap from this pill
267-c pier Create a new urbit in pier/
268-d Daemon mode
269-D Recompute from events
270-F Fake keys; also disables networking
271-f Fuzz testing
272-g Set GC flag
273-H domain Set ames bootstrap domain (default urbit.org)
274-I galaxy Start as ~galaxy
275-k stage Start at Hoon kernel version stage
276-l port Initial peer port
277-M Memory madness
278-n host Set unix hostname
279-N Enable networking in fake mode (-F)
280-p ames_port Set the HTTP port to bind to
281-P Profiling
282-q Quiet
283-r host Initial peer address
284-R Report urbit build info
285-s Pill URL from arvo git hash
286-t ticket Use ~ticket automatically
287-u url URL from which to download pill
288-v Verbose
289-w name Immediately upgrade to ~name
290-x Exit immediately
291-Xwtf Skip last event
293Development Usage:
294 To create a development ship, use a fakezod:
295 urbit -FI zod -A /path/to/arvo/folder -B /path/to/pill -c zod
297 For more information about developing on urbit, see:
298 https://github.com/urbit/urbit/blob/master/CONTRIBUTING.md
300Simple Usage:
301 urbit -c <mycomet> to create a comet (anonymous urbit)
302 urbit -w <myplanet> -t <myticket> if you have a ticket
303 urbit <myplanet or mycomet> to restart an existing urbit
304```
306If so, then you're ready to boot your urbit. If not, check that you entered each Bash command correctly for your host OS platform. If you're still experiencing issues, feel free to drop into [Urbit chat](https://urbit.org/stream) for troubleshooting help.
308### Boot your urbit
310You've now installed the Urbit binary. If you're running Urbit on a normal modern PC or Mac, or
311on a large cloud instance, move onto the next [setup](../setup/) section.
313If you're running Urbit in the cloud on a small instance, read
314the below section, as you may need to additionally configure swap space, then continue.
316### (Set up swap)
318Urbit wants to map 2GB of memory when it boots up. We won’t necessarily
319use all this memory, we just want to see it. On a normal modern PC or Mac,
320or on a large cloud virtual machine, this is not an issue. On some small
321cloud virtual machines (Amazon or Digital Ocean), the default memory
322configuration is smaller than this, and you need to manually configure a
323swapfile.
325Digital Ocean has a post on adding swap
326[here](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04).
327For Amazon there’s a StackOverflow thread
328[here](http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance).
330Don’t spend a lot of time tweaking these settings; the simplest
331thing is fine.