Skip to content

Commit dbc5ee8

Browse files
committed
Merge pull request #6621
e04b0b6 added OS X documentation to doc/init.md (Kevin Cooper) d4aa54c added org.bitcoin.bitcoind.plist for launchd (OS X) (Kevin Cooper)
2 parents c8322ff + e04b0b6 commit dbc5ee8

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

contrib/init/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Upstart: bitcoind.conf
55
OpenRC: bitcoind.openrc
66
bitcoind.openrcconf
77
CentOS: bitcoind.init
8+
OS X: org.bitcoin.bitcoind.plist
89

910
have been made available to assist packagers in creating node packages here.
1011

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>Label</key>
6+
<string>org.bitcoin.bitcoind</string>
7+
<key>ProgramArguments</key>
8+
<array>
9+
<string>/usr/local/bin/bitcoind</string>
10+
<string>-daemon</string>
11+
</array>
12+
<key>RunAtLoad</key>
13+
<true/>
14+
</dict>
15+
</plist>

doc/init.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ can be found in the contrib/init folder.
1313
1. Service User
1414
---------------------------------
1515

16-
All three startup configurations assume the existence of a "bitcoin" user
16+
All three Linux startup configurations assume the existence of a "bitcoin" user
1717
and group. They must be created before attempting to use these scripts.
18+
The OS X configuration assumes bitcoind will be set up for the current user.
1819

1920
2. Configuration
2021
---------------------------------
@@ -48,6 +49,8 @@ see `contrib/debian/examples/bitcoin.conf`.
4849
3. Paths
4950
---------------------------------
5051

52+
3a) Linux
53+
5154
All three configurations assume several paths that might need to be adjusted.
5255

5356
Binary: `/usr/bin/bitcoind`
@@ -62,6 +65,13 @@ reasons to make the configuration file and data directory only readable by the
6265
bitcoin user and group. Access to bitcoin-cli and other bitcoind rpc clients
6366
can then be controlled by group membership.
6467

68+
3b) Mac OS X
69+
70+
Binary: `/usr/local/bin/bitcoind`
71+
Configuration file: `~/Library/Application Support/Bitcoin/bitcoin.conf`
72+
Data directory: `~/Library/Application Support/Bitcoin`
73+
Lock file: `~/Library/Application Support/Bitcoin/.lock`
74+
6575
4. Installing Service Configuration
6676
-----------------------------------
6777

@@ -97,6 +107,17 @@ Using this script, you can adjust the path and flags to the bitcoind program by
97107
setting the BITCOIND and FLAGS environment variables in the file
98108
/etc/sysconfig/bitcoind. You can also use the DAEMONOPTS environment variable here.
99109

110+
4e) Mac OS X
111+
112+
Copy org.bitcoin.bitcoind.plist into ~/Library/LaunchAgents. Load the launch agent by
113+
running `launchctl load ~/Library/LaunchAgents/org.bitcoin.bitcoind.plist`.
114+
115+
This Launch Agent will cause bitcoind to start whenever the user logs in.
116+
117+
NOTE: This approach is intended for those wanting to run bitcoind as the current user.
118+
You will need to modify org.bitcoin.bitcoind.plist if you intend to use it as a
119+
Launch Daemon with a dedicated bitcoin user.
120+
100121
5. Auto-respawn
101122
-----------------------------------
102123

0 commit comments

Comments
 (0)