..
Setup coraserver on a VPS
- Clone cora.
git clone https://github.com/deebakkarthi/coraserver - Install all the dependencies
- golang
- Mysql (I use mariadb)
- Setup mariadb
- After installing mariadb run the
mysql_secure_installation - Remove anon users, test db, disable remote root login, allow unix socket login
- Login or
sudo su - Run
mysql. You’ll be logged in without any password CREATE USER 'cora'@'localhost' IDENTIFIED BY '';GRANT ALL PRIVILEGES ON cora_db.* TO 'cora'@'localhost';- Edit
/etc/mysql/mariadb.conf.d/50-client.cnffor debian and addauto-rehashunderclient-mariadb.
- After installing mariadb run the
cdin tocoraserver/db/scriptsdir- Login to mysql as cora
mysql -u cora -p source ./create.sqlsource ./insert.sql- After creating the databases. Compile using
go build - Fill the
config.jsonaccording to 20250817T123235-cora-azure-instructions - For production use the
makecommand. This copies the config and the binary to the destination folder
Automating using systemd service
[Unit]
Description= Coraserver
After=nginx.service
[Service]
User=cora
Group=cora
Type=simple
WorkingDirectory=/opt/coraserver
ExecStart=/opt/coraserver/coraserver
[Install]
WantedBy=multi-user.target
- Create a system user named cora
sudo useradd --system -s /bin/false cora
- Give permission of the dir to cora
sudo chown -R cora:cora /opt/coraserver