mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-30 04:31:39 +02:00
Renamed to ipfs-server and ipfs-publish
This commit is contained in:
19
Scripts/ipfs-server
Executable file
19
Scripts/ipfs-server
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Syntax: ./ipfs-server
|
||||
# Description: starts an IPFS server
|
||||
# Author: Markus Fleschutz
|
||||
# Source: github.com/fleschutz/PowerShell
|
||||
# License: CC0
|
||||
|
||||
ipfs init --profile server
|
||||
|
||||
ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001
|
||||
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8765
|
||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://pi:5001", "http://127.0.0.1:5001", "https://webui.ipfs.io"]'
|
||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
|
||||
|
||||
echo "NOTE: Make sure port 4001 for IPv4/v6 is open by your router!"
|
||||
ipfs daemon --enable-pubsub-experiment &
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user