Skip to content

Commit

Permalink
[draft] Docs for self hosting ente without docker (#3831)
Browse files Browse the repository at this point in the history
## Description

in draft 

## Tests
  • Loading branch information
mngshm authored Oct 29, 2024
1 parent fd4de8b commit 85ae97c
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/docs/.vitepress/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,11 @@ export const sidebar = [
collapsed: true,
items: [
{ text: "Getting started", link: "/self-hosting/" },
{ text: "System requirements", link: "/self-hosting/guides/system-requirements", },
{
text: "Guides",
items: [
{ text: "Introduction", link: "/self-hosting/guides/" },
{ text: "Introduction", link: "/self-hosting/guides/" },
{
text: "Connect to custom server",
link: "/self-hosting/guides/custom-server/",
Expand All @@ -248,10 +249,6 @@ export const sidebar = [
text: "Mobile build",
link: "/self-hosting/guides/mobile-build",
},
{
text: "System requirements",
link: "/self-hosting/guides/system-requirements",
},
{
text: "Configuring S3",
link: "/self-hosting/guides/configuring-s3",
Expand All @@ -264,6 +261,10 @@ export const sidebar = [
text: "DB migration",
link: "/self-hosting/guides/db-migration",
},
{
text: "Hosting Ente without Docker",
link: "/self-hosting/guides/standalone-ente",
},
],
},
{
Expand Down
89 changes: 89 additions & 0 deletions docs/docs/self-hosting/guides/standalone-ente.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Installing Ente Standalone (without Docker)
description: Installing and setting up Ente standalone without docker.
---

# Installing and Deploying Ente Standalone (without Docker)

## Running Museum (Ente's server) without Docker

First, start by installing all the dependencies to get your machine ready for development.

```sh
# For MacOS
brew tap homebrew/core
brew update
brew install go

# For Ubuntu based distros
sudo apt update && sudo apt upgrade
sudo apt install golang-go
```

Alternatively, you can also download the latest binaries from ['All Release'](https://go.dev/dl/) page from the official website.

```sh
brew install postgres@15
# Link the postgres keg
brew link postgresql@15

brew install libsodium

# For Ubuntu based distros
sudo apt install postgresql
sudo apt install libsodium23 libsodium-dev
```

The package `libsodium23` might be installed already in some cases.

Installing pkg-config

```sh
brew install pkg-config

# For Ubuntu based distros
sudo apt install pkg-config
```

## Starting Postgres

### With pg_ctl

```sh
pg_ctl -D /usr/local/var/postgres -l logfile start
```

Dependeing on the Operating System type the path for postgres binary or configuration file might be different, please check if the command keeps failing for you.

Ideally, if you are on a Linux system with systemd as the init. You can also start postgres as a systemd service. After Installation execute the following commands:

```sh
sudo systemctl enable postgresql
sudo systemctl daemon-reload && sudo systemctl start postgresql
```

### Create user

```sh
createuser -s postgres
```

## Start Museum

```
export ENTE_DB_USER=postgres
cd ente/server
go run cmd/museum/main.go
```

For live reloads, install [air](https://github.com/air-verse/air#installation). Then you can just call air after declaring the required environment variables. For example,

```
ENTE_DB_USER=ente_user
air
```

Once you are done with setting and running Museum, all you are left to do is run the web app and reverse_proxy it with a webserver. You can check the following resources for Deploying your web app.

1. [Hosting the Web App](https://help.ente.io/self-hosting/guides/web-app).
2. [Running Ente Web app as a systemd Service](https://gist.github.com/mngshm/72e32bd483c2129621ed0d74412492fd)

0 comments on commit 85ae97c

Please sign in to comment.