Linked Data server for Go
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
goldis a reference Linked Data Platform server for the Solid platform.
Written in Go, based on initial work done by William Waites.
sudo docker pull linkeddata/gold sudo docker run -p ip:port:443 linkeddata/gold
portwith your host computer's IP address and port number.
To check the status of the container, type:
sudo docker ps
IMPORTANT: if you want to mount a host directory into the container, you can use the -v parameter:
sudo docker run -p ip:port:443 -v /home/user/data:/data linkeddata/gold
This will mount the host directory,
/home/user/data, into the container as the
/data/directory. Doing this will allow you to reuse the data directory without worrying about persistence inside the container.
* **Mac OS X**: `brew install go` * **Ubuntu**: `sudo apt-get install golang-go` * **Fedora**: `sudo dnf install golang`
GOPATHvariable (required by Go):
mkdir ~/go export GOPATH=~/go
(Optionally consider adding
export GOPATH=~/goto your
Check that you have the required Go version (Go 1.4 or later):
If you don't, please install a more recent version.
go getcommand to install the server and all the dependencies:
go get github.com/linkeddata/gold/server
brew install raptor libmagic
sudo apt-get install libraptor2-dev libmagic-dev
sudo dnf install raptor2-devel file-devel
(Optional) Install extra dependencies used by the tests:
go get github.com/stretchr/testify/assert
IMPORTANT: Among other things,
goldis a web server. Please consider running it as a regular user instead of root. Since gold treats all files equally, and even though uploaded files are not made executable, it will not prevent clients from uploading malicious shell scripts.
Pay attention to the data root parameter,
-root. By default, it will serve files from its current directory (so, for example, if you installed it from Github, its data root will be
$GOPATH/src/github.com/linkeddata/gold/). Otherwise, make sure to pass it a dedicated data directory to serve, either using a command-line parameter or the config file. Something like:
go get, you can run it by:
$GOPATH/bin/server -http=":8080" -https=":8443" -debug
cdinto the repo cloned by
And launch the server by:
go run server/*.go -http=":8080" -https=":8443" -debug -boltPath=/tmp/bolt.db
Alternatively, you can compile and run it from the source dir in one command:
go run $GOPATH/src/github.com/linkeddata/gold/server/*.go -http=":8080" -https=":8443" \ -root=/home/user/data/ -debug -boltPath=/tmp/bolt.db
You can use the provided
gold.conf-examplefile to create your own configuration file, and specify it with the
cd $GOPATH/src/github.com/linkeddata/gold/ cp gold.conf-example server/gold.conf
edit the configuration file
pass the config file when launching the gold server
To see a list of available options:
Some important options and defaults:
-conf- Optional path to a config file.
-debug- Outputs config parameters and extra logging. Default:
-root- Specifies the data root directory which
goldwill be serving. Default:
.(so, likely to be
-http- HTTP port on which the server listens. For local development, the default HTTP port,
80, is likely to be reserved, so pass in an alternative. Default:
-https- HTTPS port on which the server listens. For local development, the default HTTPS port,
443, is likely to be reserved, so pass in an alternative. Default:
To run the unit tests (assuming you've installed
go get github.com/stretchr/testify/assert):