# Jimmy B. - Hosting Your Own Ghostbin in 2019

**URL:** <https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000>\
**Category:** jimmyb.ninja Posts\
**Created:** [March 22, 2022, 3:52pm UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000 "2022-03-22T15:52:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmy](https://discourse.jimmyb.ninja/user_avatar/discourse.jimmyb.ninja/jimmy/32/20_2.png) [@jimmy](https://discourse.jimmyb.ninja/u/jimmy)\
**Post date:** [March 22, 2022, 3:52pm UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000/1 "2022-03-22T15:52:55Z")

</div>

I used a basic VM to get this going. You can likely do it with less. It has 2GBs of RAM, 80GBs of disk space and 2x 2.4GHz CPU cores. It was actually pretty easy to install, actually quite a bit easier then I remember.

 Installing GhostBin 
1. Install your operating system. I used Ubuntu 18.04 Server.

2. Install Go:

3. Install Mercurial and Python Pygments:

4. Install ansi2html:

5. Install Git:

6. I recommend creating a new user to run your GhostBin code under:

7. You should also set a password on the new user account using `passwd ghostbin`.

8. Login as your new user account and add the following to your `~/.bashrc` file:

9. Save and exit the file and run `source ~/.bashrc`.

10. Next obtain the source code for GhostBin (login as your new user first):

11. At this point your full path should be something like - `/home/ghostbin/go/src/github.com/ghostbin`.

12. Run `go get`.

13. Run `go build`.

14. Run `which pygmentize`. It should return `/usr/bin/pygmentize`. If not, no problem, just copy the path.

15. You'll also want to run `which ansi2html` which should return `/usr/local/bin/ansi2html`. Again, if it doesn't no big deal, just copy the path.

16. Now exit the `languages.yml` file and update the path for `pygmentize` which should be on line 6. Also update the path for `ansi2html` which should be on line 23. Save and exit. Here's my `languages.yml` up to line 25 to give you an example:

17. Next we'll need to build a CSS file which will give color to the pastes:

18. If all went well all that is left to do is to start the service:

19. Here's an screenshot of my install: ![](upload://jgHTiQe0w99mcMWjz0T1hNdkWB7.jpeg)

20. I would also recommend running the binary with the --help flag:

 Setting Up GhostBin w/ Nginx 
1. Install Nginx:

2. Create a Nginx configuration file for GhostBin:

3. Next we need to make a symlink so Nginx knows to load the configuration:

4. Restart the Nginx service:

 Other Notes 
- Whenever I start up the binary I see:

- It looks like the GhostBin repository has been renamed to 'spectre'. It looks like this was done to "de-brand" it for people who want to run it themselves and separate it from [GhostBin.com](http://ghostbin.com) where I believe the developer run their own copy. See [this commit](https://github.com/DHowett/spectre/commit/7c12db4bb766e26c6dcef80d95e7e113ede7a4f2).

- You should **definitely** set up your install with Let's Encrypt for SSL.

* * *
This is a companion discussion topic for the original entry at [https://jimmyb.ninja/post/1565901741](https://jimmyb.ninja/post/1565901741)

---

<div class="post-metadata">

**Author:** ![tntom4](https://discourse.jimmyb.ninja/letter_avatar_proxy/v4/letter/t/858c86/32.png) [@tntom4](https://discourse.jimmyb.ninja/u/tntom4)\
**Post date:** [June 4, 2020, 12:00am UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000/2 "2020-06-04T00:00:00Z")

</div>

Hello, i’ve a problem when i type go get it’s say go: gopath entry is relative : must be absolute path : « home/go ». When i type export -p | grep GO, it said declare -x GOPATH=« HOME/go ». So i’m lose. I have go 1.13.3 on a 32 bit system

---

<div class="post-metadata">

**Author:** ![Tom](https://discourse.jimmyb.ninja/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@Tom](https://discourse.jimmyb.ninja/u/Tom)\
**Post date:** [June 4, 2020, 12:00am UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000/3 "2020-06-04T00:00:00Z")

</div>

Im on 16.04 lts and i have a problem when i do sudo go get on the [ghostbin.com/spectre](http://ghostbin.com/spectre "ghostbin.com/spectre") and its not work

---

<div class="post-metadata">

**Author:** ![jimmybrancaccio](https://discourse.jimmyb.ninja/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@jimmybrancaccio](https://discourse.jimmyb.ninja/u/jimmybrancaccio)\
**Post date:** [June 5, 2020, 12:00am UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000/4 "2020-06-05T00:00:00Z")

</div>

Sounds like you didn't export it probably. Make sure to re-read the guide, you can even copy and paste these commands for the most part (if not all). Probably time to get off the 32-bit system as well...

---

<div class="post-metadata">

**Author:** ![jimmybrancaccio](https://discourse.jimmyb.ninja/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@jimmybrancaccio](https://discourse.jimmyb.ninja/u/jimmybrancaccio)\
**Post date:** [June 5, 2020, 12:00am UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000/5 "2020-06-05T00:00:00Z")

</div>

This guide is actually a little out of date I noticed when I setup Ghostbin again the other day. I will try to put a new/update guide together later today.

---

<div class="post-metadata">

**Author:** ![tntom4](https://discourse.jimmyb.ninja/letter_avatar_proxy/v4/letter/t/858c86/32.png) [@tntom4](https://discourse.jimmyb.ninja/u/tntom4)\
**Post date:** [June 5, 2020, 12:00am UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000/6 "2020-06-05T00:00:00Z")

</div>

Hello, it’s finally done but when i do the ./spectre command i’ve a message. It is : « -bash: ./spectre: Aucun fichier ou dossier de ce type (i’m a french guy that means there is no this file or something like that ). And when i’m restart the nginx thing, it’s do jot work too. I have copy word per word your ghostbin.conf. Am i dumb ?

---

<div class="post-metadata">

**Author:** ![jimmybrancaccio](https://discourse.jimmyb.ninja/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@jimmybrancaccio](https://discourse.jimmyb.ninja/u/jimmybrancaccio)\
**Post date:** [June 5, 2020, 12:00am UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000/7 "2020-06-05T00:00:00Z")

</div>

You shouldn't need to use 'sudo'.

---

<div class="post-metadata">

**Author:** ![speadk888](https://discourse.jimmyb.ninja/user_avatar/discourse.jimmyb.ninja/speadk888/32/24_2.png) [@speadk888](https://discourse.jimmyb.ninja/u/speadk888)\
**Post date:** [April 22, 2021, 3:16pm UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000/8 "2021-04-22T15:16:38Z")

</div>

hi sir:  
I have a question, why can’t I create an account when I install it

 ![image](https://d1h8ejht05wb2s.cloudfront.net/original/1X/592315cde3a72676c68ea063d662cd8bff1ba93a.png)

---

<div class="post-metadata">

**Author:** ![jimmy](https://discourse.jimmyb.ninja/user_avatar/discourse.jimmyb.ninja/jimmy/32/20_2.png) [@jimmy](https://discourse.jimmyb.ninja/u/jimmy)\
**Post date:** [April 22, 2021, 3:17pm UTC](https://discourse.jimmyb.ninja/t/jimmy-b-hosting-your-own-ghostbin-in-2019/1000/9 "2021-04-22T15:17:35Z")

</div>

As noted in your screenshot, account creation has been disabled. As far as I know the account creation component has been removed in the latest Ghostbin code.
