# Unable to setup discourse

**URL:** https://meta.discourse.org/t/unable-to-setup-discourse/238985
**Category:** Development
**Created:** [September 14, 2022, 12:09pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985 "2022-09-14T12:09:10Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ksavani](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@ksavani](https://meta.discourse.org/u/ksavani)
#### Post date: [September 14, 2022, 12:09pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985/1 "2022-09-14T12:09:10Z")

</div>

Hello, I am installing discourse on my Ubuntu machine and i am following this article [https://meta.discourse.org/t/install-discourse-on-ubuntu-for-development/14727](https://meta.discourse.org/t/install-discourse-on-ubuntu-for-development/14727) but i am gettine issue on below command:

`bundle exec rake db:create`

i am sharing screenshot issue with Redis as i have already install redis latest version 7 up version still asking me to upgrade.

 ![Screenshot from 2022-09-14 17-32-38](https://global.discourse-cdn.com/meta/original/4X/b/1/4/b14a6b2a725275ab74030f6a0c0828dfaf7420b6.png)

Thank you for advanced!

Best,  
krishna

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 14, 2022, 2:07pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985/2 "2022-09-14T14:07:15Z")

</div>

Is the Redis server running in the background? What’s the output of `rails runner "puts Discourse.redis.info['redis_version']"` ?

---

<div class="post-metadata">

### Author: ![ksavani](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@ksavani](https://meta.discourse.org/u/ksavani)
#### Post date: [September 14, 2022, 3:16pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985/3 "2022-09-14T15:16:16Z")

</div>

Hi @Falco ,

Thank you for coming back to me..very appreciated

I did sorted out the problem as you said we need to start the redis service so i did start and it was working good then i did add next all command as per documentation but on` db:migrate` command i got the issue as invalid access. Please see the screenshot. and i have attached another screenshot also please check and let me know if any privilege issue.

 ![b00be10c43a3240ad52946dfa1b3cc3d860aa61d-png-1536×864-](https://global.discourse-cdn.com/meta/original/4X/4/3/3/4337ef72976a5fb6d0769cb135ae85bb4c7d3a6a.png)

 ![bcdc2c8be4ac445f2ee4d7caaa801e420d1bb4bf-png-1536×864-](https://global.discourse-cdn.com/meta/original/4X/5/f/b/5fba51dc868b40fa753df5f7ae4a2cf0f6792d0d.png)

Please help me with this.

Best,  
krishna

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 15, 2022, 1:59pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985/4 "2022-09-15T13:59:50Z")

</div>

> [@ksavani](#):
>
> on` db:migrate` command i got the issue as invalid access.

Have you set your database access with [Install Discourse on Ubuntu or Debian for Development](https://meta.discourse.org/t/install-discourse-on-ubuntu-for-development/14727#setup-database-3) ?

---

<div class="post-metadata">

### Author: ![ksavani](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@ksavani](https://meta.discourse.org/u/ksavani)
#### Post date: [September 15, 2022, 2:04pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985/5 "2022-09-15T14:04:26Z")

</div>

Hi @Falco

Yes i did, I use the command `sudo -u postgres createuser -s "krishna.savani"` and you can check my second screenshot also. I did try my many ways but still saying invalid access.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 15, 2022, 2:07pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985/6 "2022-09-15T14:07:21Z")

</div>

> [@ksavani](#):
>
> I use the command `sudo -u postgres createuser -s "krishna.savani"`

But that not exactly the command the guide tells you to run, is it?

You need to create a PostgreSQL superuser with the same name as the Linux user that will run the migrations. You even went out of your way to blur the username of the linux user in the screenshots you shared, so I can only assume that you are running under a different user.

---

<div class="post-metadata">

### Author: ![ksavani](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@ksavani](https://meta.discourse.org/u/ksavani)
#### Post date: [September 15, 2022, 2:23pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985/7 "2022-09-15T14:23:18Z")

</div>

@Falco I am sorry about blur user name on screenshot,  
here is the screenshot you can check my username

 ![Screenshot from 2022-09-15 18-16-55 (1)](https://global.discourse-cdn.com/meta/original/4X/8/0/9/8094438c0bc7f10bb81e459241def88d7a1af40e.png)

you can see its the same name for both Linux user and PostgresSQL user.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [September 15, 2022, 2:37pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985/8 "2022-09-15T14:37:38Z")

</div>

Try

```plaintext
sudo su
su postgres
psql
ALTER USER "krishna.savani" WITH SUPERUSER;
\q
exit
exit
psql -d discourse_development

```

If that works, you can exit the psql repl and proceed with the migration.

---

<div class="post-metadata">

### Author: ![ksavani](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@ksavani](https://meta.discourse.org/u/ksavani)
#### Post date: [September 15, 2022, 3:11pm UTC](https://meta.discourse.org/t/unable-to-setup-discourse/238985/9 "2022-09-15T15:11:44Z")

</div>

@Falco I did try all the command..then i did add command of migration, but still showing as

rake aborted!  
Discourse::InvalidAccess: Discourse::InvalidAccess

here are both screenshot,

 ![Screenshot from 2022-09-15 20-35-13](https://global.discourse-cdn.com/meta/original/4X/d/6/5/d65451eb115bd9cb654080ae6652c010023f6811.png)

 ![Screenshot from 2022-09-14 20-41-00 (2)](https://global.discourse-cdn.com/meta/original/4X/2/7/f/27f062776eaf05d71a38293222e759c1f2311984.png)
