These instructions are designed for someone starting from scratch for a Ubuntu Installation. You can skip to any point that is useful for you.
1. Login to Hetzner Cloud Console (https://console.hetzner.cloud/projects) and Create a new Ubuntu 20 Project with 4GB Ram. Do not worry about SSH keys yet.
Hetzner will email you the root password.
ssh root@<yourserverip>
adduser <yourusername>
usermod -aG sudo <yourusername>
getent group sudo | cut -d: -f4
Now, quit the terminal connection.
ssh-keygen -t ed25519
Copy the key from your local computer to the server:
ssh-copy-id -i <locationto>/id_rsa.pub <yourusername>@<yourserverip>
And then login to the server with that key:
ssh <yourusername>@<yourserverip>
When you login, now and going forward, it will ask you for the password for your ssh key now, not your user password. Sudo commands will always want your user password.
- Run
sudo ufw allow OpenSSH
- Run
sudo ufw enable
sudo apt install docker
sudo apt install docker-compose
sudo apt update
sudo apt upgrade
sudo reboot
Ok, now that you have set up the SERVER, you will need to get all your tokens/apis/etc in order:
- Make sure you have all the needed variables for the following before moving forward
Get Your API keys and Tokens (Required)
- You must set up at least one of these tokens or APIs to run the app.
User/Auth System (Optional)
- How to set up the user/auth system and Google login.
- Optional plugins available to enhance the application.
1. Recommended: Docker Install
From the server commandline (as your user, not root):
git clone https://github.com/danny-avila/LibreChat.git
Edit your docker-compose.yml to endure you have the correct environment variables:
nano docker-compose.yml
VITE_APP_TITLE: LibreChat # default, change to your desired app >
VITE_SHOW_GOOGLE_LOGIN_OPTION: 'false' # default, change to true if you want to show google login
2. Create a global environment file and open it up to begin adding the tokens/keys you prepared in the PreReqs section.
cp .env.example .env
nano .env
HOST=Localhost
to
HOST=<yourserverip>
SEARCH=true
MEILI_HOST=meilisearch
MEILI_HTTP_ADDR=meilisearch
NOTE: You may need to run these commands with sudo permissions.
Once the app is running, you can access it at http://yourserverip:3080
It is safe to close the terminal -- the docker app will continue to run.
*To disable external signups, after you have created your admin account, make sure you set
ALLOW_REGISTRATION:False