A web-hosting control panel written in Go.
Note: This software currently only runs on Linux systems.
Backend: Go (1.9.2+)
Database: Bolt
CSS Toolkit(s): Bootstrap 4 & Font Awesome
JS Toolkit(s): jQuery
To get the repo...
# Go get the repo and append it to your $GOPATH
go get github.com/kentonh/gPanel
# Navigate to the directory (replace $GOPATH with your actual $GOPATH)
cd $GOPATH/github.com/kentonh/gPanel
To set your repo up to contribute...
# Fork the repo and add it to the list of remotes (replace your-username with your github username)
git remote add fork https://github.com/your-username/gPanel.git
# OPTIONAL: Change the names of the remotes
git remote rename origin upstream
git remote rename fork origin
To deploy...
# Build the binary
go build gpanel.go
# Execute binary as root (root access is needed for functions within the system package)
sudo ./gpanel
- Linux
- adduser command (already installed on most debian-based Linux systems)
- deluser command (already installed on most debian-based linux systems)
- ssh-keygen command (already installed on most debian-based linux systems)
- openssh-server installed (installation guide below)
- golang (installation guide below)
- php-cgi IF you want to be able to serve .php files
- OSX
- Currently there is no support for OSX, but it is planned for the future.
- sudo apt-get purge golang*
- Download latest version from https://www.golang.org/dl/
- sudo tar -C /usr/local -xzf go[VERSION].[OS]-[ARCH].tar.gz
- For system-wide installation (reccommended) a. vim /etc/profile b. Add "export PATH=$PATH:/usr/local/go/bin"
- For local installation a. If ~/.profile doesn't exist then create it (touch ~/.profile) b. Add "export PATH=$PATH:/usr/local/go/bin" to said file
- Logout and login for changes to /etc/profile or ~/.profile to take effect
- mkdir ~/go && mkdir ~/go/bin && mkdir ~/go/src && mkdir ~/go/pkg
- GOROOT=~/go
- sudo apt-get install openssh-server
- sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.default
- sudo vim /etc/ssh/sshd_config
- Uncomment (no # before line) and/or set the following lines in /etc/ssh/sshd_config
- PermitRootLogin no
- AuthorizedKeysFile %h/.ssh/authorized_keys
- PasswordAuthentication no
- PermitEmptyPasswords no
- RSAAuthentication yes
- PubkeyAuthentication yes
- sudo systemctl restart ssh
- ssh-keygen -t rsa -N "PASSWORD" -f ~/.ssh/id_rsa [change PASSWORD]
- To check permissions a. cd ~/.ssh b. ls -l -a (look at ls -l -a dump below)
- To change permissions a. chmod [PERMISSIONS NUMBER] [FILE]
- To change ownership a. chown [USER]: [FILE]
.ssh [700 && owned by correct user]
id_rsa [600 && owned by correct user]
id_rsa.pub [644 && owned by correct user]
authorized_keys [644 && owned by correct user]
known_hosts [644 && owned by the correct user]
Correct output of ls -l -a of ~/.ssh
drwx------ 2 root root 4096 Jan 17 14:49 .
drwx------ 7 root root 4096 Jan 17 14:42 ..
-rw-r--r-- 1 root root 0 Jan 17 14:49 authorized_keys
-rw------- 1 root root 1766 Jan 17 14:43 id_rsa
-rw-r--r-- 1 root root 401 Jan 17 14:43 id_rsa.pub
-rw-r--r-- 1 root root 444 Oct 10 2016 known_hosts
- go get github.com/kentonh/gPanel
- cd ~/go/src/github.com/kentonh/gPanel
- go build gpanel.go
- sudo ./gpanel