Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kamal-proxy and systemd #75

Open
mccuskk opened this issue Dec 2, 2024 · 1 comment
Open

kamal-proxy and systemd #75

mccuskk opened this issue Dec 2, 2024 · 1 comment

Comments

@mccuskk
Copy link

mccuskk commented Dec 2, 2024

Hi

I'm trying to run kamal-proxy as a systemd service on Fedora 41.
I can run it on the command line and communicate with it from another command line fine. I can see it has created the socket /run/user/0/kamal-proxy.sock

If I start it using a systemd service file like:
[Unit]
Description=kamal-proxy service
After=NetworkManager.service

[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/root
ExecStart=/usr/sbin/kamal-proxy run

The server starts and works until I try to issue command line commands where I get:
Error: dial unix /run/user/0/kamal-proxy.sock: connect: no such file or directory and it's true there is no kamal-proxy.sock

We are looking to migrate to rails 8 for our web apps but this makes it difficult to use kamal-proxy in our environment.

Any help would be appreciated

Many thanks

Kieran

@mccuskk
Copy link
Author

mccuskk commented Dec 17, 2024

I've modified SocketPath() as follows. Any thoughts?

func (c Config) SocketPath() string {
return path.Join(cmp.Or(os.Getenv("KAMAL_PROXY_SOCKET_PATH"), c.runtimeDirectory()), "kamal-proxy.sock")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant