2015-09-15 00:40:49 +00:00
|
|
|
---
|
|
|
|
layout: "docs"
|
2018-03-22 17:56:06 +00:00
|
|
|
page_title: "Commands: server join"
|
2015-09-22 18:08:36 +00:00
|
|
|
sidebar_current: "docs-commands-server-join"
|
2015-09-15 00:40:49 +00:00
|
|
|
description: >
|
2018-03-22 17:56:06 +00:00
|
|
|
The server join command is used to join the local server to one or more Nomad servers.
|
2015-09-15 00:40:49 +00:00
|
|
|
---
|
|
|
|
|
2018-03-22 17:56:06 +00:00
|
|
|
# Command: server join
|
2015-09-15 00:40:49 +00:00
|
|
|
|
2018-03-22 17:56:06 +00:00
|
|
|
The `server join` command joins the local server to one or more Nomad servers.
|
2015-09-15 01:04:56 +00:00
|
|
|
Joining is only required for server nodes, and only needs to succeed against
|
|
|
|
one or more of the provided addresses. Once joined, the gossip layer will
|
|
|
|
handle discovery of the other server nodes in the cluster.
|
2015-09-15 00:40:49 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```
|
2018-03-22 17:56:06 +00:00
|
|
|
nomad server join [options] <addr> [<addr>...]
|
2015-09-15 00:40:49 +00:00
|
|
|
```
|
|
|
|
|
2015-09-15 01:04:56 +00:00
|
|
|
One or more server addresses are required. If multiple server addresses are
|
|
|
|
specified, then an attempt will be made to join each one. If one or more nodes
|
|
|
|
are joined successfully, the exit code will be 0. Otherwise, the exit code will
|
|
|
|
be 1.
|
|
|
|
|
2015-09-15 00:40:49 +00:00
|
|
|
## General Options
|
|
|
|
|
2016-10-28 00:46:20 +00:00
|
|
|
<%= partial "docs/commands/_general_options" %>
|
2015-09-15 03:24:04 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Join the local server to a remote server:
|
|
|
|
|
|
|
|
```
|
2018-03-22 17:56:06 +00:00
|
|
|
$ nomad server join 10.0.0.8:4648
|
2015-09-22 18:08:36 +00:00
|
|
|
Joined 1 servers successfully
|
2015-09-15 03:24:04 +00:00
|
|
|
```
|