on 3a197af help sign in
urbit.org/docs/using/admin.md
165 lines 5.7 kB history raw
1---
2navhome: /docs/
3navuptwo: true
4next: true
5sort: 3
6title: Administration and operation
7---
9# Administration and operation
11Your Urbit is a persistent Unix process that you mainly control from the
12console. For some things, a browser will also work.
14## Shutdown
16You can turn your Urbit off with `Ctrl-d` from the Talk or Dojo prompts.
18## Restart
20To restart your Urbit simply pass the name of your pier:
22```
23$ urbit some-planet
24```
26or
28```
29$ urbit comet
30```
32## Logging
34To log Urbit's command line output to a file, use `script`:
36```
37$ script urbit.log urbit your-urbit
38```
40## Moving your pier
42Piers are designed to be portable, but it _must_ be done while the Urbit
43is turned off. Urbit networking is stateful, so you can't run two copies
44of the same Urbit in two places.
46To move a pier, simply move the contents of the directory it lives in.
47To keep these files as small as possible we usually use the `--sparse`
48option in `tar`. With a pier `your-urbit/` something like this (from
49inside `urbit/`) should work:
51```
52tar -Scvzf ~/your-urbit.tar.gz ~/your-urbit/
53scp your-old-server:~/your-urbit.tar.gz your-new-server:~
54```
56Then to unzip it, on your other Unix server, run:
58```
59tar xfvz your-urbit.tar.gz
60```
62Delete the tar file, and, after installing Urbit on your new server,
63start your urbit back up with:
65```
66urbit your-urbit
67```
69## Console
71Your Urbit terminal is separated into two parts: the prompt (the bottom
72line) and the record (everything above that). The record is shared; all
73the output from all the apps in your command set appears in it. The
74prompt is multiplexed.
76In the CLI Urbit apps can process your input before you hit return. To
77see this in action try entering `)` as the first character at the Dojo
78prompt. Since there is no Dojo command or Hoon expression that starts
79with ')', the Dojo rejects it.
81`Ctrl-x` - Switches the prompt between running console apps
83`Ctrl-c` - Crash current event. Processed at the Unix layer and prints a stack trace.
85`Ctrl-d` - From Talk or Dojo stops your Urbit process.
87`↑` / `↓` - History navigation
89The following emacs-style key bindings are available:
91```
92Ctrl-a Cursor to beginning of the line (Home)
93Ctrl-b Cursor one character backward (left-arrow)
94Ctrl-e Cursor to the end of the line (End)
95Ctrl-f Cursor one character forward (right-arrow)
96Ctrl-g Beep; cancel reverse-search
97Ctrl-k Kill to end of line
98Ctrl-l Clear the screen
99Ctrl-n Next line in history (down-arrow)
100Ctrl-p Previous line in history (up-arrow)
101Ctrl-r Reverse-search
102Ctrl-t Transpose characters
103Ctrl-u Kill to beginning of line
104Ctrl-y Yank from kill buffer
105```
107Full coverage of the Urbit shell, the Dojo is covered in the
108[Shell walkthrough](../shell/).
110## Web
112On startup Urbit tries to bind to `localhost:8080`. If you're already
113running something on `8080` you'll find your Urbit on `8081`, and so on.
114For planets only, we also proxy web domains through Urbit's own servers.
115Any planet `~your-urbit` is also at `your-urbit.urbit.org`.
117Your Urbit serves a simple homepage from `http://localhost:8080` or
118`https://your-urbit.urbit.org` that should be self-explanatory. Since
119our HTTPS isn't audited / battle tested we just call it "secure" HTTPS.
120You can find that on `8443`. Or `8444` (and so on) if you're already
121running something on `8443`.
123A complete walkthrough of the Urbit web interface is
124[here](../web/).
126## Moons
128Urbit namespace is distributed by having parent nodes sign the keys for child nodes. If you have a planet, your parent star issued your ticket. As a planet you, in turn, can sign the keys for moons. The basic idea is: your planet runs permanently in a data center somewhere and moons run on all your devices. Each planet can issue ~4 billion (`2^32`) moons.
130To generate a random moon from your planet run:
132 ~your-urbit:dojo> +moon
134You can use the resulting output in the same installation flow from [install](/docs/using/install) and [setup](/docs/using/setup).
136Moons are automatically synced to their parent `%kids` desk, and can control applications on their parent planet using `|link`. You can read more about those things in the [filesystem](/docs/using/filesystem) and [console](/docs/using/shell) walkthroughs.
139## Continuity breaches
141While the Urbit network is in this alpha state we sometimes have to
142reboot the whole network. This happens either when major changes need
143to be shipped or we hit a bug that can't be fixed over the air.
145Because Urbit networking is stateful we call this a _continuity breach_.
146Everything has to be restarted from scratch. Your pier will continue to
147function after we have breached, but it wont connect to the rest of the
148Urbit network.
150When this happens, back up any files you'd like to save, shut down your
151Urbit and recreate it (as if you were starting for the first time).
153## Creating SSL certificates
155It is possible to create SSL certificates so that you serve files through your ship's webserver using https.
156To do that you, would need a machine that has OpenSSL installed.
157In order to create a new private key and a self-signed certificate for your localhost, valid for a year, you can issue the following commands:
159```
160$ openssl req -x509 -sha256 -newkey rsa:4096 -keyout private.pem -out certificate.pem -subj '/CN=localhost' -days 365
161$ mkdir -p your-urbit/.urb/tls
162$ mv private.pem certificate.pem your-urbit/.urb/tls
163```
164These certificates would have to be manually trusted by your browser, and it's advisable that they are used only for your localhost.
165For public-facing webservers, it would be better to create certificates for your fully qualified domain name using a trusted certificate authority like Let's Encrypt.